diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md index 651f8577b78f..50d51875030f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2024-05-13) + +- Azure Resource Manager DesktopVirtualization client library for Java. This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-2024-04. 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 b875cc8927bb..c1122b477f68 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-2023-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-2024-04. 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.1.0 + 1.2.0-beta.1 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID 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. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md index 02e1653efaad..2802b41d5af6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/SAMPLE.md @@ -1,6 +1,19 @@ # Code snippets and samples +## AppAttachPackage + +- [CreateOrUpdate](#appattachpackage_createorupdate) +- [Delete](#appattachpackage_delete) +- [GetByResourceGroup](#appattachpackage_getbyresourcegroup) +- [List](#appattachpackage_list) +- [ListByResourceGroup](#appattachpackage_listbyresourcegroup) +- [Update](#appattachpackage_update) + +## AppAttachPackageInfo + +- [ImportMethod](#appattachpackageinfo_importmethod) + ## ApplicationGroups - [CreateOrUpdate](#applicationgroups_createorupdate) @@ -120,6 +133,213 @@ - [List](#workspaces_list) - [ListByResourceGroup](#workspaces_listbyresourcegroup) - [Update](#workspaces_update) +### AppAttachPackage_CreateOrUpdate + +```java +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageInfoProperties; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageProperties; +import com.azure.resourcemanager.desktopvirtualization.models.FailHealthCheckOnStagingFailure; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** + * Samples for AppAttachPackage CreateOrUpdate. + */ +public final class AppAttachPackageCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Create.json + */ + /** + * Sample code: AppAttachPackage_Create. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .define("msixpackagefullname") + .withRegion("southcentralus") + .withExistingResourceGroup("resourceGroup1") + .withProperties(new AppAttachPackageProperties() + .withImage(new AppAttachPackageInfoProperties().withPackageAlias("msixpackagealias") + .withImagePath("imagepath") + .withPackageName("MsixPackageName") + .withPackageFamilyName("MsixPackage_FamilyName") + .withPackageFullName("MsixPackage_FullName") + .withDisplayName("displayname") + .withPackageRelativePath("packagerelativepath") + .withIsRegularRegistration(false) + .withIsActive(false) + .withPackageDependencies( + Arrays.asList(new MsixPackageDependencies().withDependencyName("MsixPackage_Dependency_Name") + .withPublisher("MsixPackage_Dependency_Publisher") + .withMinVersion("packageDep_version"))) + .withVersion("packageversion") + .withLastUpdated(OffsetDateTime.parse("2008-09-22T14:01:54.9571247Z")) + .withPackageApplications(Arrays.asList(new MsixPackageApplications().withAppId("AppId") + .withDescription("PackageApplicationDescription") + .withAppUserModelId("AppUserModelId") + .withFriendlyName("FriendlyName") + .withIconImageName("Iconimagename") + .withRawIcon("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()) + .withRawPng("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()))) + .withCertificateName("certName") + .withCertificateExpiry(OffsetDateTime.parse("2023-01-02T17:18:19.1234567Z"))) + .withHostPoolReferences(Arrays.asList()) + .withKeyVaultUrl("fakeTokenPlaceholder") + .withFailHealthCheckOnStagingFailure(FailHealthCheckOnStagingFailure.NEEDS_ASSISTANCE)) + .create(); + } +} +``` + +### AppAttachPackage_Delete + +```java +/** + * Samples for AppAttachPackage Delete. + */ +public final class AppAttachPackageDeleteSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Delete.json + */ + /** + * Sample code: AppAttachPackage_Delete. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .deleteByResourceGroupWithResponse("resourceGroup1", "packagefullname", com.azure.core.util.Context.NONE); + } +} +``` + +### AppAttachPackage_GetByResourceGroup + +```java +/** + * Samples for AppAttachPackage GetByResourceGroup. + */ +public final class AppAttachPackageGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Get.json + */ + /** + * Sample code: AppAttachPackage_Get. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .getByResourceGroupWithResponse("resourceGroup1", "packagefullname", com.azure.core.util.Context.NONE); + } +} +``` + +### AppAttachPackage_List + +```java +/** + * Samples for AppAttachPackage List. + */ +public final class AppAttachPackageListSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_ListBySubscription.json + */ + /** + * Sample code: AppAttachPackage_ListBySubscription. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void appAttachPackageListBySubscription( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages().list("HostPoolName eq 'hostpool1'", com.azure.core.util.Context.NONE); + } +} +``` + +### AppAttachPackage_ListByResourceGroup + +```java +/** + * Samples for AppAttachPackage ListByResourceGroup. + */ +public final class AppAttachPackageListByResourceGroupSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_ListByResourceGroup.json + */ + /** + * Sample code: AppAttachPackage_ListByResourceGroup. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void appAttachPackageListByResourceGroup( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .listByResourceGroup("resourceGroup1", "HostPoolName eq 'hostpool1'", com.azure.core.util.Context.NONE); + } +} +``` + +### AppAttachPackage_Update + +```java +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackage; + +/** + * Samples for AppAttachPackage Update. + */ +public final class AppAttachPackageUpdateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Update.json + */ + /** + * Sample code: AppAttachPackage_Update. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + AppAttachPackage resource = manager.appAttachPackages() + .getByResourceGroupWithResponse("resourceGroup1", "msixpackagefullname", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### AppAttachPackageInfo_ImportMethod + +```java +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageArchitectures; +import com.azure.resourcemanager.desktopvirtualization.models.ImportPackageInfoRequest; + +/** + * Samples for AppAttachPackageInfo ImportMethod. + */ +public final class AppAttachPackageInfoImportMethodSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackageInfo_Import_Post.json + */ + /** + * Sample code: AppAttachPackageInfo_Import. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void appAttachPackageInfoImport( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackageInfoes() + .importMethod("resourceGroup1", "hostpool1", new ImportPackageInfoRequest().withPath("imagepath") + .withPackageArchitecture(AppAttachPackageArchitectures.X64), com.azure.core.util.Context.NONE); + } +} +``` + ### ApplicationGroups_CreateOrUpdate ```java @@ -127,20 +347,21 @@ import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupTy import java.util.HashMap; import java.util.Map; -/** Samples for ApplicationGroups CreateOrUpdate. */ +/** + * Samples for ApplicationGroups CreateOrUpdate. + */ public final class ApplicationGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() + public static void + applicationGroupCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applicationGroups() .define("applicationGroup1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") @@ -171,20 +392,21 @@ public final class ApplicationGroupsCreateOrUpdateSamples { ### ApplicationGroups_Delete ```java -/** Samples for ApplicationGroups Delete. */ +/** + * Samples for ApplicationGroups Delete. + */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() + public static void + applicationGroupDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applicationGroups() .deleteByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE); } } @@ -193,20 +415,21 @@ public final class ApplicationGroupsDeleteSamples { ### ApplicationGroups_GetByResourceGroup ```java -/** Samples for ApplicationGroups GetByResourceGroup. */ +/** + * Samples for ApplicationGroups GetByResourceGroup. + */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() + public static void + applicationGroupGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applicationGroups() .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE); } } @@ -215,18 +438,20 @@ public final class ApplicationGroupsGetByResourceGroupSamples { ### ApplicationGroups_List ```java -/** Samples for ApplicationGroups List. */ +/** + * Samples for ApplicationGroups List. + */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + applicationGroupList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.applicationGroups().list("applicationGroupType eq 'RailApplication'", com.azure.core.util.Context.NONE); } } @@ -235,26 +460,22 @@ public final class ApplicationGroupsListSamples { ### ApplicationGroups_ListByResourceGroup ```java -/** Samples for ApplicationGroups ListByResourceGroup. */ +/** + * Samples for ApplicationGroups ListByResourceGroup. + */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void applicationGroupListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() - .listByResourceGroup( - "resourceGroup1", - "applicationGroupType eq 'RailApplication'", - 10, - true, - 0, + manager.applicationGroups() + .listByResourceGroup("resourceGroup1", "applicationGroupType eq 'RailApplication'", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -267,25 +488,24 @@ import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroup; import java.util.HashMap; import java.util.Map; -/** Samples for ApplicationGroups Update. */ +/** + * Samples for ApplicationGroups Update. + */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupsUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ApplicationGroup resource = - manager - .applicationGroups() - .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + applicationGroupsUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + ApplicationGroup resource = manager.applicationGroups() + .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") @@ -312,20 +532,21 @@ public final class ApplicationGroupsUpdateSamples { ```java import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -/** Samples for Applications CreateOrUpdate. */ +/** + * Samples for Applications CreateOrUpdate. + */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Create.json */ /** * Sample code: Application_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() + public static void + applicationCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() .define("application1") .withExistingApplicationGroup("resourceGroup1", "applicationGroup1") .withCommandLineSetting(CommandLineSetting.ALLOW) @@ -344,22 +565,23 @@ public final class ApplicationsCreateOrUpdateSamples { ### Applications_Delete ```java -/** Samples for Applications Delete. */ +/** + * Samples for Applications Delete. + */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Delete.json */ /** * Sample code: Application_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() - .deleteWithResponse( - "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); + public static void + applicationDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() + .deleteWithResponse("resourceGroup1", "applicationGroup1", "application1", + com.azure.core.util.Context.NONE); } } ``` @@ -367,20 +589,21 @@ public final class ApplicationsDeleteSamples { ### Applications_Get ```java -/** Samples for Applications Get. */ +/** + * Samples for Applications Get. + */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Get.json */ /** * Sample code: Application_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() + public static void + applicationGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() .getWithResponse("resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); } } @@ -389,20 +612,21 @@ public final class ApplicationsGetSamples { ### Applications_List ```java -/** Samples for Applications List. */ +/** + * Samples for Applications List. + */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_List.json */ /** * Sample code: Applications_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationsList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() + public static void + applicationsList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() .list("resourceGroup1", "applicationGroup1", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -415,26 +639,24 @@ import com.azure.resourcemanager.desktopvirtualization.models.Application; import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -/** Samples for Applications Update. */ +/** + * Samples for Applications Update. + */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Update.json */ /** * Sample code: Application_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - Application resource = - manager - .applications() - .getWithResponse( - "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + applicationUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + Application resource = manager.applications() + .getWithResponse("resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withDescription("des1") .withFriendlyName("friendly") .withFilePath("path") @@ -452,20 +674,21 @@ public final class ApplicationsUpdateSamples { ### Desktops_Get ```java -/** Samples for Desktops Get. */ +/** + * Samples for Desktops Get. + */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void desktopGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .desktops() + public static void + desktopGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.desktops() .getWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", com.azure.core.util.Context.NONE); } } @@ -474,18 +697,20 @@ public final class DesktopsGetSamples { ### Desktops_List ```java -/** Samples for Desktops List. */ +/** + * Samples for Desktops List. + */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_List.json */ /** * Sample code: Desktop_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void desktopList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + desktopList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.desktops().list("resourceGroup1", "applicationGroup1", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -496,24 +721,22 @@ public final class DesktopsListSamples { ```java import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; -/** Samples for Desktops Update. */ +/** + * Samples for Desktops Update. + */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void desktopUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .desktops() - .updateWithResponse( - "resourceGroup1", - "applicationGroup1", - "SessionDesktop", + public static void + desktopUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.desktops() + .updateWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", new DesktopPatch().withDescription("des1").withFriendlyName("friendly"), com.azure.core.util.Context.NONE); } @@ -539,20 +762,21 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for HostPools CreateOrUpdate. */ +/** + * Samples for HostPools CreateOrUpdate. + */ public final class HostPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .hostPools() + public static void + hostPoolCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.hostPools() .define("hostPool1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") @@ -565,8 +789,7 @@ public final class HostPoolsCreateOrUpdateSamples { .withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType.AUTOMATIC) .withMaxSessionLimit(999999) .withRegistrationInfo( - new RegistrationInfoInner() - .withExpirationTime(OffsetDateTime.parse("2020-10-01T14:01:54.9571247Z")) + new RegistrationInfoInner().withExpirationTime(OffsetDateTime.parse("2020-10-01T14:01:54.9571247Z")) .withRegistrationTokenOperation(RegistrationTokenOperation.UPDATE)) .withVmTemplate("{json:json}") .withSsoadfsAuthority("https://adfs") @@ -574,16 +797,12 @@ public final class HostPoolsCreateOrUpdateSamples { .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .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)))) + .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(); } @@ -604,18 +823,20 @@ public final class HostPoolsCreateOrUpdateSamples { ### HostPools_Delete ```java -/** Samples for HostPools Delete. */ +/** + * Samples for HostPools Delete. + */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + hostPoolDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.hostPools().deleteWithResponse("resourceGroup1", "hostPool1", true, com.azure.core.util.Context.NONE); } } @@ -624,20 +845,21 @@ public final class HostPoolsDeleteSamples { ### HostPools_GetByResourceGroup ```java -/** Samples for HostPools GetByResourceGroup. */ +/** + * Samples for HostPools GetByResourceGroup. + */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .hostPools() + public static void + hostPoolGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.hostPools() .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } @@ -646,18 +868,20 @@ public final class HostPoolsGetByResourceGroupSamples { ### HostPools_List ```java -/** Samples for HostPools List. */ +/** + * Samples for HostPools List. + */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_List.json */ /** * Sample code: HostPool_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + hostPoolList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.hostPools().list(10, true, 0, com.azure.core.util.Context.NONE); } } @@ -666,14 +890,16 @@ public final class HostPoolsListSamples { ### HostPools_ListByResourceGroup ```java -/** Samples for HostPools ListByResourceGroup. */ +/** + * Samples for HostPools ListByResourceGroup. + */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void hostPoolListByResourceGroup( @@ -686,20 +912,21 @@ public final class HostPoolsListByResourceGroupSamples { ### HostPools_RetrieveRegistrationToken ```java -/** Samples for HostPools RetrieveRegistrationToken. */ +/** + * Samples for HostPools RetrieveRegistrationToken. + */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void hostPoolsRetrieveRegistrationTokenPost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .hostPools() + manager.hostPools() .retrieveRegistrationTokenWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } @@ -723,25 +950,24 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for HostPools Update. */ +/** + * Samples for HostPools Update. + */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - HostPool resource = - manager - .hostPools() - .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + hostPoolUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + HostPool resource = manager.hostPools() + .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withFriendlyName("friendly") .withDescription("des1") @@ -749,8 +975,7 @@ public final class HostPoolsUpdateSamples { .withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType.AUTOMATIC) .withLoadBalancerType(LoadBalancerType.BREADTH_FIRST) .withRegistrationInfo( - new RegistrationInfoPatch() - .withExpirationTime(OffsetDateTime.parse("2020-10-01T15:01:54.9571247Z")) + new RegistrationInfoPatch().withExpirationTime(OffsetDateTime.parse("2020-10-01T15:01:54.9571247Z")) .withRegistrationTokenOperation(RegistrationTokenOperation.UPDATE)) .withVmTemplate("{json:json}") .withSsoadfsAuthority("https://adfs") @@ -759,15 +984,12 @@ public final class HostPoolsUpdateSamples { .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) .withAgentUpdate( - new AgentUpdatePatchProperties() - .withType(SessionHostComponentUpdateType.SCHEDULED) + 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)))) + .withMaintenanceWindows(Arrays.asList( + new MaintenanceWindowPatchProperties().withHour(7).withDayOfWeek(DayOfWeek.FRIDAY), + new MaintenanceWindowPatchProperties().withHour(8).withDayOfWeek(DayOfWeek.SATURDAY)))) .apply(); } @@ -790,24 +1012,22 @@ public final class HostPoolsUpdateSamples { ```java import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; -/** Samples for MsixImages Expand. */ +/** + * Samples for MsixImages Expand. + */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void msixImageExpand( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixImages() - .expand( - "resourceGroup1", - "hostpool1", - new MsixImageUri().withUri("imagepath"), + public static void + msixImageExpand(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixImages() + .expand("resourceGroup1", "hostpool1", new MsixImageUri().withUri("imagepath"), com.azure.core.util.Context.NONE); } } @@ -821,20 +1041,21 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDepende import java.time.OffsetDateTime; import java.util.Arrays; -/** Samples for MsixPackages CreateOrUpdate. */ +/** + * Samples for MsixPackages CreateOrUpdate. + */ public final class MsixPackagesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixPackages() + public static void + mSIXPackageCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixPackages() .define("msixpackagefullname") .withExistingHostPool("resourceGroup1", "hostpool1") .withImagePath("imagepath") @@ -845,25 +1066,18 @@ public final class MsixPackagesCreateOrUpdateSamples { .withIsRegularRegistration(false) .withIsActive(false) .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("MsixTest_Dependency_Name") - .withPublisher("PublishedName") - .withMinVersion("version"))) + Arrays.asList(new MsixPackageDependencies().withDependencyName("MsixTest_Dependency_Name") + .withPublisher("PublishedName") + .withMinVersion("version"))) .withVersion("version") .withLastUpdated(OffsetDateTime.parse("2008-09-22T14:01:54.9571247Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("ApplicationId") - .withDescription("application-desc") - .withAppUserModelId("AppUserModelId") - .withFriendlyName("friendlyname") - .withIconImageName("Apptile") - .withRawIcon("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()) - .withRawPng("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()))) + .withPackageApplications(Arrays.asList(new MsixPackageApplications().withAppId("ApplicationId") + .withDescription("application-desc") + .withAppUserModelId("AppUserModelId") + .withFriendlyName("friendlyname") + .withIconImageName("Apptile") + .withRawIcon("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()) + .withRawPng("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()))) .create(); } } @@ -872,20 +1086,21 @@ public final class MsixPackagesCreateOrUpdateSamples { ### MsixPackages_Delete ```java -/** Samples for MsixPackages Delete. */ +/** + * Samples for MsixPackages Delete. + */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixPackages() + public static void + mSIXPackageDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixPackages() .deleteWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } @@ -894,20 +1109,21 @@ public final class MsixPackagesDeleteSamples { ### MsixPackages_Get ```java -/** Samples for MsixPackages Get. */ +/** + * Samples for MsixPackages Get. + */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixPackages() + public static void + mSIXPackageGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixPackages() .getWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } @@ -916,18 +1132,20 @@ public final class MsixPackagesGetSamples { ### MsixPackages_List ```java -/** Samples for MsixPackages List. */ +/** + * Samples for MsixPackages List. + */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + mSIXPackageList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.msixPackages().list("resourceGroup1", "hostpool1", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -938,23 +1156,23 @@ public final class MsixPackagesListSamples { ```java import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; -/** Samples for MsixPackages Update. */ +/** + * Samples for MsixPackages Update. + */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - MsixPackage resource = - manager - .msixPackages() - .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", com.azure.core.util.Context.NONE) - .getValue(); + public static void + mSIXPackageUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + MsixPackage resource = manager.msixPackages() + .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withIsActive(true).withIsRegularRegistration(false).withDisplayName("displayname").apply(); } } @@ -963,18 +1181,20 @@ public final class MsixPackagesUpdateSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void operationDescriptionList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + operationDescriptionList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } @@ -983,25 +1203,23 @@ public final class OperationsListSamples { ### PrivateEndpointConnections_DeleteByHostPool ```java -/** Samples for PrivateEndpointConnections DeleteByHostPool. */ +/** + * Samples for PrivateEndpointConnections DeleteByHostPool. + */ public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_DeleteByHostPool.json */ /** * Sample code: PrivateEndpointConnection_DeleteByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionDeleteByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .deleteByHostPoolWithResponse( - "resourceGroup1", - "hostPool1", - "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .deleteByHostPoolWithResponse("resourceGroup1", "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } ``` @@ -1009,25 +1227,23 @@ public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { ### PrivateEndpointConnections_DeleteByWorkspace ```java -/** Samples for PrivateEndpointConnections DeleteByWorkspace. */ +/** + * Samples for PrivateEndpointConnections DeleteByWorkspace. + */ public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_DeleteByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_DeleteByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionDeleteByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .deleteByWorkspaceWithResponse( - "resourceGroup1", - "workspace1", - "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .deleteByWorkspaceWithResponse("resourceGroup1", "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } ``` @@ -1035,24 +1251,22 @@ public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { ### PrivateEndpointConnections_GetByHostPool ```java -/** Samples for PrivateEndpointConnections GetByHostPool. */ +/** + * Samples for PrivateEndpointConnections GetByHostPool. + */ public final class PrivateEndpointConnectionsGetByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_GetByHostPool.json */ /** * Sample code: PrivateEndpointConnection_GetByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionGetByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .getByHostPoolWithResponse( - "resourceGroup1", - "hostPool1", - "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + manager.privateEndpointConnections() + .getByHostPoolWithResponse("resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } @@ -1061,25 +1275,23 @@ public final class PrivateEndpointConnectionsGetByHostPoolSamples { ### PrivateEndpointConnections_GetByWorkspace ```java -/** Samples for PrivateEndpointConnections GetByWorkspace. */ +/** + * Samples for PrivateEndpointConnections GetByWorkspace. + */ public final class PrivateEndpointConnectionsGetByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_GetByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_GetByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionGetByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .getByWorkspaceWithResponse( - "resourceGroup1", - "workspace1", - "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .getByWorkspaceWithResponse("resourceGroup1", "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } ``` @@ -1087,20 +1299,21 @@ public final class PrivateEndpointConnectionsGetByWorkspaceSamples { ### PrivateEndpointConnections_ListByHostPool ```java -/** Samples for PrivateEndpointConnections ListByHostPool. */ +/** + * Samples for PrivateEndpointConnections ListByHostPool. + */ public final class PrivateEndpointConnectionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_ListByHostPool.json */ /** * Sample code: PrivateEndpointConnection_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } @@ -1109,20 +1322,21 @@ public final class PrivateEndpointConnectionsListByHostPoolSamples { ### PrivateEndpointConnections_ListByWorkspace ```java -/** Samples for PrivateEndpointConnections ListByWorkspace. */ +/** + * Samples for PrivateEndpointConnections ListByWorkspace. + */ public final class PrivateEndpointConnectionsListByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_ListByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_ListByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .listByWorkspace("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } @@ -1135,30 +1349,27 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointCon import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -/** Samples for PrivateEndpointConnections UpdateByHostPool. */ +/** + * Samples for PrivateEndpointConnections UpdateByHostPool. + */ public final class PrivateEndpointConnectionsUpdateByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_UpdateByHostPool.json */ /** * Sample code: PrivateEndpointConnection_UpdateByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionUpdateByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .updateByHostPoolWithResponse( - "resourceGroup1", - "hostPool1", + manager.privateEndpointConnections() + .updateByHostPoolWithResponse("resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - new PrivateEndpointConnection() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by admin@consoto.com") - .withActionsRequired("None")), + new PrivateEndpointConnection().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), com.azure.core.util.Context.NONE); } } @@ -1171,30 +1382,27 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointCon import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -/** Samples for PrivateEndpointConnections UpdateByWorkspace. */ +/** + * Samples for PrivateEndpointConnections UpdateByWorkspace. + */ public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_UpdateByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_UpdateByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionUpdateByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .updateByWorkspaceWithResponse( - "resourceGroup1", - "workspace1", + manager.privateEndpointConnections() + .updateByWorkspaceWithResponse("resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - new PrivateEndpointConnection() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by admin@consoto.com") - .withActionsRequired("None")), + new PrivateEndpointConnection().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), com.azure.core.util.Context.NONE); } } @@ -1203,20 +1411,21 @@ public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { ### PrivateLinkResources_ListByHostPool ```java -/** Samples for PrivateLinkResources ListByHostPool. */ +/** + * Samples for PrivateLinkResources ListByHostPool. + */ public final class PrivateLinkResourcesListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateLinkResources_ListByHostPool.json */ /** * Sample code: PrivateLinkResources_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateLinkResourcesListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateLinkResources() + manager.privateLinkResources() .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } @@ -1225,20 +1434,21 @@ public final class PrivateLinkResourcesListByHostPoolSamples { ### PrivateLinkResources_ListByWorkspace ```java -/** Samples for PrivateLinkResources ListByWorkspace. */ +/** + * Samples for PrivateLinkResources ListByWorkspace. + */ public final class PrivateLinkResourcesListByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateLinkResources_ListByWorkspace.json */ /** * Sample code: PrivateLinkResources_ListByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateLinkResourcesListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateLinkResources() + manager.privateLinkResources() .listByWorkspace("resourceGroup1", "workspace1", null, null, null, com.azure.core.util.Context.NONE); } } @@ -1254,26 +1464,25 @@ import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; -/** Samples for ScalingPlanPersonalSchedules Create. */ +/** + * Samples for ScalingPlanPersonalSchedules Create. + */ public final class ScalingPlanPersonalSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Create.json */ /** * Sample code: ScalingPlanPersonalSchedules_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesCreate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() + manager.scalingPlanPersonalSchedules() .define("scalingPlanScheduleWeekdays1") .withExistingScalingPlan("resourceGroup1", "scalingPlan1") - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .withDaysOfWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, + DayOfWeek.FRIDAY)) .withRampUpStartTime(new Time().withHour(6).withMinute(0)) .withRampUpAutoStartHosts(StartupBehavior.ALL) .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) @@ -1307,22 +1516,23 @@ public final class ScalingPlanPersonalSchedulesCreateSamples { ### ScalingPlanPersonalSchedules_Delete ```java -/** Samples for ScalingPlanPersonalSchedules Delete. */ +/** + * Samples for ScalingPlanPersonalSchedules Delete. + */ public final class ScalingPlanPersonalSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Delete.json */ /** * Sample code: ScalingPlanPersonalSchedules_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() - .deleteWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + manager.scalingPlanPersonalSchedules() + .deleteWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE); } } ``` @@ -1330,24 +1540,22 @@ public final class ScalingPlanPersonalSchedulesDeleteSamples { ### ScalingPlanPersonalSchedules_Get ```java -/** Samples for ScalingPlanPersonalSchedules Get. */ +/** + * Samples for ScalingPlanPersonalSchedules Get. + */ public final class ScalingPlanPersonalSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Get.json */ /** * Sample code: ScalingPlanPersonalSchedules_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() - .getWithResponse( - "resourceGroup1", - "PersonalScalingPlan1", - "PersonalScalingPlanSchedule", + manager.scalingPlanPersonalSchedules() + .getWithResponse("resourceGroup1", "PersonalScalingPlan1", "PersonalScalingPlanSchedule", com.azure.core.util.Context.NONE); } } @@ -1356,20 +1564,21 @@ public final class ScalingPlanPersonalSchedulesGetSamples { ### ScalingPlanPersonalSchedules_List ```java -/** Samples for ScalingPlanPersonalSchedules List. */ +/** + * Samples for ScalingPlanPersonalSchedules List. + */ public final class ScalingPlanPersonalSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_List.json */ /** * Sample code: ScalingPlanPersonalSchedules_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() + manager.scalingPlanPersonalSchedules() .list("resourceGroup1", "scalingPlan", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -1383,26 +1592,25 @@ import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOpe import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; import com.azure.resourcemanager.desktopvirtualization.models.Time; -/** Samples for ScalingPlanPersonalSchedules Update. */ +/** + * Samples for ScalingPlanPersonalSchedules Update. + */ public final class ScalingPlanPersonalSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Update.json */ /** * Sample code: ScalingPlanPersonalSchedules_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesUpdate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ScalingPlanPersonalSchedule resource = - manager - .scalingPlanPersonalSchedules() - .getWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + ScalingPlanPersonalSchedule resource = manager.scalingPlanPersonalSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withPeakStartTime(new Time().withHour(8).withMinute(0)) .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) .withPeakMinutesToWaitOnDisconnect(10) @@ -1432,26 +1640,25 @@ import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBal import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; -/** Samples for ScalingPlanPooledSchedules Create. */ +/** + * Samples for ScalingPlanPooledSchedules Create. + */ public final class ScalingPlanPooledSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/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() + manager.scalingPlanPooledSchedules() .define("scalingPlanScheduleWeekdays1") .withExistingScalingPlan("resourceGroup1", "scalingPlan1") - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .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) @@ -1475,22 +1682,23 @@ public final class ScalingPlanPooledSchedulesCreateSamples { ### ScalingPlanPooledSchedules_Delete ```java -/** Samples for ScalingPlanPooledSchedules Delete. */ +/** + * Samples for ScalingPlanPooledSchedules Delete. + */ public final class ScalingPlanPooledSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Delete.json */ /** * Sample code: ScalingPlanPooledSchedules_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPooledSchedulesDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPooledSchedules() - .deleteWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + manager.scalingPlanPooledSchedules() + .deleteWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE); } } ``` @@ -1498,22 +1706,23 @@ public final class ScalingPlanPooledSchedulesDeleteSamples { ### ScalingPlanPooledSchedules_Get ```java -/** Samples for ScalingPlanPooledSchedules Get. */ +/** + * Samples for ScalingPlanPooledSchedules Get. + */ public final class ScalingPlanPooledSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Get.json */ /** * Sample code: ScalingPlanPooledSchedules_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPooledSchedulesGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPooledSchedules() - .getWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + manager.scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE); } } ``` @@ -1521,20 +1730,21 @@ public final class ScalingPlanPooledSchedulesGetSamples { ### ScalingPlanPooledSchedules_List ```java -/** Samples for ScalingPlanPooledSchedules List. */ +/** + * Samples for ScalingPlanPooledSchedules List. + */ public final class ScalingPlanPooledSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/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() + manager.scalingPlanPooledSchedules() .list("resourceGroup1", "scalingPlan1", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -1549,30 +1759,27 @@ import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBal import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; -/** Samples for ScalingPlanPooledSchedules Update. */ +/** + * Samples for ScalingPlanPooledSchedules Update. + */ public final class ScalingPlanPooledSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Update.json */ /** * Sample code: ScalingPlanPooledSchedules_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPooledSchedulesUpdate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ScalingPlanPooledSchedule resource = - manager - .scalingPlanPooledSchedules() - .getWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + ScalingPlanPooledSchedule resource = manager.scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDaysOfWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, + DayOfWeek.FRIDAY)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) .withRampUpCapacityThresholdPct(80) .withPeakStartTime(new Time().withHour(8).withMinute(0)) @@ -1597,20 +1804,21 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for ScalingPlans Create. */ +/** + * Samples for ScalingPlans Create. + */ public final class ScalingPlansCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + public static void + scalingPlansCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.scalingPlans() .define("scalingPlan1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") @@ -1620,41 +1828,28 @@ public final class ScalingPlansCreateSamples { .withFriendlyName("Scaling Plan 1") .withHostPoolType(ScalingHostPoolType.POOLED) .withExclusionTag("value") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("schedule1") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.MONDAY, - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.WEDNESDAY, - ScalingScheduleDaysOfWeekItem.THURSDAY, - ScalingScheduleDaysOfWeekItem.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))) - .withHostPoolReferences( - Arrays - .asList( - new ScalingHostPoolReference() - .withHostPoolArmPath( - "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1") - .withScalingPlanEnabled(true))) + .withSchedules(Arrays.asList(new ScalingSchedule().withName("schedule1") + .withDaysOfWeek(Arrays.asList(ScalingScheduleDaysOfWeekItem.MONDAY, + ScalingScheduleDaysOfWeekItem.TUESDAY, ScalingScheduleDaysOfWeekItem.WEDNESDAY, + ScalingScheduleDaysOfWeekItem.THURSDAY, ScalingScheduleDaysOfWeekItem.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))) + .withHostPoolReferences(Arrays.asList(new ScalingHostPoolReference().withHostPoolArmPath( + "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1") + .withScalingPlanEnabled(true))) .create(); } @@ -1675,20 +1870,21 @@ public final class ScalingPlansCreateSamples { ### ScalingPlans_Delete ```java -/** Samples for ScalingPlans Delete. */ +/** + * Samples for ScalingPlans Delete. + */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + public static void + scalingPlansDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.scalingPlans() .deleteByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE); } } @@ -1697,20 +1893,21 @@ public final class ScalingPlansDeleteSamples { ### ScalingPlans_GetByResourceGroup ```java -/** Samples for ScalingPlans GetByResourceGroup. */ +/** + * Samples for ScalingPlans GetByResourceGroup. + */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + public static void + scalingPlansGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.scalingPlans() .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE); } } @@ -1719,14 +1916,16 @@ public final class ScalingPlansGetByResourceGroupSamples { ### ScalingPlans_List ```java -/** Samples for ScalingPlans List. */ +/** + * Samples for ScalingPlans List. + */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlansListBySubscription( @@ -1739,20 +1938,21 @@ public final class ScalingPlansListSamples { ### ScalingPlans_ListByHostPool ```java -/** Samples for ScalingPlans ListByHostPool. */ +/** + * Samples for ScalingPlans ListByHostPool. + */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + manager.scalingPlans() .listByHostPool("resourceGroup1", "hostPool1", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -1761,14 +1961,16 @@ public final class ScalingPlansListByHostPoolSamples { ### ScalingPlans_ListByResourceGroup ```java -/** Samples for ScalingPlans ListByResourceGroup. */ +/** + * Samples for ScalingPlans ListByResourceGroup. + */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlansListByResourceGroup( @@ -1783,23 +1985,23 @@ public final class ScalingPlansListByResourceGroupSamples { ```java import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlan; -/** Samples for ScalingPlans Update. */ +/** + * Samples for ScalingPlans Update. + */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ScalingPlan resource = - manager - .scalingPlans() - .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE) - .getValue(); + public static void + scalingPlansUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + ScalingPlan resource = manager.scalingPlans() + .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } } @@ -1808,22 +2010,23 @@ public final class ScalingPlansUpdateSamples { ### SessionHosts_Delete ```java -/** Samples for SessionHosts Delete. */ +/** + * Samples for SessionHosts Delete. + */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .sessionHosts() - .deleteWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, com.azure.core.util.Context.NONE); + public static void + sessionHostDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.sessionHosts() + .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, + com.azure.core.util.Context.NONE); } } ``` @@ -1831,22 +2034,23 @@ public final class SessionHostsDeleteSamples { ### SessionHosts_Get ```java -/** Samples for SessionHosts Get. */ +/** + * Samples for SessionHosts Get. + */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .sessionHosts() - .getWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", com.azure.core.util.Context.NONE); + public static void + sessionHostGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.sessionHosts() + .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", + com.azure.core.util.Context.NONE); } } ``` @@ -1854,18 +2058,20 @@ public final class SessionHostsGetSamples { ### SessionHosts_List ```java -/** Samples for SessionHosts List. */ +/** + * Samples for SessionHosts List. + */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + sessionHostList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.sessionHosts().list("resourceGroup1", "hostPool1", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -1876,27 +2082,23 @@ public final class SessionHostsListSamples { ```java import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; -/** Samples for SessionHosts Update. */ +/** + * Samples for SessionHosts Update. + */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .sessionHosts() - .updateWithResponse( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - true, - new SessionHostPatch() - .withAllowNewSession(true) + public static void + sessionHostUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.sessionHosts() + .updateWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, + new SessionHostPatch().withAllowNewSession(true) .withAssignedUser("user1@microsoft.com") .withFriendlyName("friendly"), com.azure.core.util.Context.NONE); @@ -1907,20 +2109,21 @@ public final class SessionHostsUpdateSamples { ### StartMenuItems_List ```java -/** Samples for StartMenuItems List. */ +/** + * Samples for StartMenuItems List. + */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void startMenuItemList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .startMenuItems() + public static void + startMenuItemList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.startMenuItems() .list("resourceGroup1", "applicationGroup1", null, null, null, com.azure.core.util.Context.NONE); } } @@ -1929,26 +2132,22 @@ public final class StartMenuItemsListSamples { ### UserSessions_Delete ```java -/** Samples for UserSessions Delete. */ +/** + * Samples for UserSessions Delete. + */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void userSessionDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .deleteWithResponse( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - "1", - true, + public static void + userSessionDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.userSessions() + .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", true, com.azure.core.util.Context.NONE); } } @@ -1957,22 +2156,23 @@ public final class UserSessionsDeleteSamples { ### UserSessions_Disconnect ```java -/** Samples for UserSessions Disconnect. */ +/** + * Samples for UserSessions Disconnect. + */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void userSessionDisconnectPost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .disconnectWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); + manager.userSessions() + .disconnectWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", + com.azure.core.util.Context.NONE); } } ``` @@ -1980,22 +2180,23 @@ public final class UserSessionsDisconnectSamples { ### UserSessions_Get ```java -/** Samples for UserSessions Get. */ +/** + * Samples for UserSessions Get. + */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void userSessionGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .getWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); + public static void + userSessionGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.userSessions() + .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", + com.azure.core.util.Context.NONE); } } ``` @@ -2003,27 +2204,22 @@ public final class UserSessionsGetSamples { ### UserSessions_List ```java -/** Samples for UserSessions List. */ +/** + * Samples for UserSessions List. + */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_List.json */ /** * Sample code: UserSession_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void userSessionList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .list( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - 10, - true, - 0, + public static void + userSessionList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.userSessions() + .list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -2032,27 +2228,23 @@ public final class UserSessionsListSamples { ### UserSessions_ListByHostPool ```java -/** Samples for UserSessions ListByHostPool. */ +/** + * Samples for UserSessions ListByHostPool. + */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void userSessionListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .listByHostPool( - "resourceGroup1", - "hostPool1", - "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", - 10, - true, - 0, + manager.userSessions() + .listByHostPool("resourceGroup1", "hostPool1", + "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", 10, true, 0, com.azure.core.util.Context.NONE); } } @@ -2063,27 +2255,23 @@ public final class UserSessionsListByHostPoolSamples { ```java import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; -/** Samples for UserSessions SendMessage. */ +/** + * Samples for UserSessions SendMessage. + */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void userSessionSendMessagePost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .sendMessageWithResponse( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - "1", - new SendMessage().withMessageTitle("title").withMessageBody("body"), - com.azure.core.util.Context.NONE); + manager.userSessions() + .sendMessageWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", + new SendMessage().withMessageTitle("title").withMessageBody("body"), com.azure.core.util.Context.NONE); } } ``` @@ -2094,20 +2282,21 @@ public final class UserSessionsSendMessageSamples { import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces CreateOrUpdate. */ +/** + * Samples for Workspaces CreateOrUpdate. + */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .workspaces() + public static void + workspaceCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.workspaces() .define("workspace1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") @@ -2134,20 +2323,21 @@ public final class WorkspacesCreateOrUpdateSamples { ### Workspaces_Delete ```java -/** Samples for Workspaces Delete. */ +/** + * Samples for Workspaces Delete. + */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .workspaces() + public static void + workspaceDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.workspaces() .deleteByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } @@ -2156,20 +2346,21 @@ public final class WorkspacesDeleteSamples { ### Workspaces_GetByResourceGroup ```java -/** Samples for Workspaces GetByResourceGroup. */ +/** + * Samples for Workspaces GetByResourceGroup. + */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .workspaces() + public static void + workspaceGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.workspaces() .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } @@ -2178,14 +2369,16 @@ public final class WorkspacesGetByResourceGroupSamples { ### Workspaces_List ```java -/** Samples for Workspaces List. */ +/** + * Samples for Workspaces List. + */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void workspaceListBySubscription( @@ -2198,14 +2391,16 @@ public final class WorkspacesListSamples { ### Workspaces_ListByResourceGroup ```java -/** Samples for Workspaces ListByResourceGroup. */ +/** + * Samples for Workspaces ListByResourceGroup. + */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void workspaceListByResourceGroup( @@ -2222,25 +2417,24 @@ import com.azure.resourcemanager.desktopvirtualization.models.Workspace; import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces Update. */ +/** + * Samples for Workspaces Update. + */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + workspaceUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml index 096cfe6bf100..dc1a6d4d6df7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for DesktopVirtualization Management - This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-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-2024-04. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true @@ -87,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy 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 0a090c871fac..d7dcac2b3409 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 @@ -11,8 +11,8 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -24,10 +24,12 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.desktopvirtualization.fluent.DesktopVirtualizationApiClient; +import com.azure.resourcemanager.desktopvirtualization.implementation.AppAttachPackageInfoesImpl; +import com.azure.resourcemanager.desktopvirtualization.implementation.AppAttachPackagesImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.ApplicationGroupsImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.ApplicationsImpl; -import com.azure.resourcemanager.desktopvirtualization.implementation.DesktopVirtualizationApiClientBuilder; import com.azure.resourcemanager.desktopvirtualization.implementation.DesktopsImpl; +import com.azure.resourcemanager.desktopvirtualization.implementation.DesktopVirtualizationApiClientBuilder; import com.azure.resourcemanager.desktopvirtualization.implementation.HostPoolsImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.MsixImagesImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.MsixPackagesImpl; @@ -41,6 +43,8 @@ import com.azure.resourcemanager.desktopvirtualization.implementation.StartMenuItemsImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.UserSessionsImpl; import com.azure.resourcemanager.desktopvirtualization.implementation.WorkspacesImpl; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageInfoes; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackages; import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroups; import com.azure.resourcemanager.desktopvirtualization.models.Applications; import com.azure.resourcemanager.desktopvirtualization.models.Desktops; @@ -64,7 +68,9 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to DesktopVirtualizationManager. */ +/** + * Entry point to DesktopVirtualizationManager. + */ public final class DesktopVirtualizationManager { private Operations operations; @@ -96,26 +102,28 @@ public final class DesktopVirtualizationManager { private MsixPackages msixPackages; + private AppAttachPackageInfoes appAttachPackageInfoes; + private MsixImages msixImages; + private AppAttachPackages appAttachPackages; + private final DesktopVirtualizationApiClient clientObject; - private DesktopVirtualizationManager( - HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + private DesktopVirtualizationManager(HttpPipeline httpPipeline, AzureProfile profile, + Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new DesktopVirtualizationApiClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new DesktopVirtualizationApiClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** * Creates an instance of DesktopVirtualization service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the DesktopVirtualization service API instance. @@ -128,7 +136,7 @@ public static DesktopVirtualizationManager authenticate(TokenCredential credenti /** * Creates an instance of DesktopVirtualization service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the DesktopVirtualization service API instance. @@ -141,14 +149,16 @@ public static DesktopVirtualizationManager authenticate(HttpPipeline httpPipelin /** * Gets a Configurable instance that can be used to create DesktopVirtualizationManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new DesktopVirtualizationManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -220,8 +230,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -238,8 +248,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -259,15 +269,13 @@ public DesktopVirtualizationManager authenticate(TokenCredential credential, Azu Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") + userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.desktopvirtualization") .append("/") - .append("1.1.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") + userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ") .append(Configuration.getGlobalConfiguration().get("os.name")) @@ -292,38 +300,28 @@ public DesktopVirtualizationManager authenticate(TokenCredential credential, Azu policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new DesktopVirtualizationManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -335,7 +333,7 @@ public Operations operations() { /** * Gets the resource collection API of Workspaces. It manages Workspace. - * + * * @return Resource collection API of Workspaces. */ public Workspaces workspaces() { @@ -347,20 +345,20 @@ public Workspaces 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); + 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() { @@ -372,7 +370,7 @@ public PrivateLinkResources privateLinkResources() { /** * Gets the resource collection API of ScalingPlans. It manages ScalingPlan. - * + * * @return Resource collection API of ScalingPlans. */ public ScalingPlans scalingPlans() { @@ -384,33 +382,33 @@ public ScalingPlans 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); + this.scalingPlanPooledSchedules + = new ScalingPlanPooledSchedulesImpl(clientObject.getScalingPlanPooledSchedules(), this); } return scalingPlanPooledSchedules; } /** * Gets the resource collection API of ScalingPlanPersonalSchedules. It manages ScalingPlanPersonalSchedule. - * + * * @return Resource collection API of ScalingPlanPersonalSchedules. */ public ScalingPlanPersonalSchedules scalingPlanPersonalSchedules() { if (this.scalingPlanPersonalSchedules == null) { - this.scalingPlanPersonalSchedules = - new ScalingPlanPersonalSchedulesImpl(clientObject.getScalingPlanPersonalSchedules(), this); + this.scalingPlanPersonalSchedules + = new ScalingPlanPersonalSchedulesImpl(clientObject.getScalingPlanPersonalSchedules(), this); } return scalingPlanPersonalSchedules; } /** * Gets the resource collection API of ApplicationGroups. It manages ApplicationGroup. - * + * * @return Resource collection API of ApplicationGroups. */ public ApplicationGroups applicationGroups() { @@ -422,7 +420,7 @@ public ApplicationGroups applicationGroups() { /** * Gets the resource collection API of StartMenuItems. - * + * * @return Resource collection API of StartMenuItems. */ public StartMenuItems startMenuItems() { @@ -434,7 +432,7 @@ public StartMenuItems startMenuItems() { /** * Gets the resource collection API of Applications. It manages Application. - * + * * @return Resource collection API of Applications. */ public Applications applications() { @@ -446,7 +444,7 @@ public Applications applications() { /** * Gets the resource collection API of Desktops. - * + * * @return Resource collection API of Desktops. */ public Desktops desktops() { @@ -458,7 +456,7 @@ public Desktops desktops() { /** * Gets the resource collection API of HostPools. It manages HostPool. - * + * * @return Resource collection API of HostPools. */ public HostPools hostPools() { @@ -470,7 +468,7 @@ public HostPools hostPools() { /** * Gets the resource collection API of UserSessions. - * + * * @return Resource collection API of UserSessions. */ public UserSessions userSessions() { @@ -482,7 +480,7 @@ public UserSessions userSessions() { /** * Gets the resource collection API of SessionHosts. - * + * * @return Resource collection API of SessionHosts. */ public SessionHosts sessionHosts() { @@ -494,7 +492,7 @@ public SessionHosts sessionHosts() { /** * Gets the resource collection API of MsixPackages. It manages MsixPackage. - * + * * @return Resource collection API of MsixPackages. */ public MsixPackages msixPackages() { @@ -504,9 +502,22 @@ public MsixPackages msixPackages() { return msixPackages; } + /** + * Gets the resource collection API of AppAttachPackageInfoes. + * + * @return Resource collection API of AppAttachPackageInfoes. + */ + public AppAttachPackageInfoes appAttachPackageInfoes() { + if (this.appAttachPackageInfoes == null) { + this.appAttachPackageInfoes + = new AppAttachPackageInfoesImpl(clientObject.getAppAttachPackageInfoes(), this); + } + return appAttachPackageInfoes; + } + /** * Gets the resource collection API of MsixImages. - * + * * @return Resource collection API of MsixImages. */ public MsixImages msixImages() { @@ -516,10 +527,22 @@ public MsixImages msixImages() { return msixImages; } + /** + * Gets the resource collection API of AppAttachPackages. It manages AppAttachPackage. + * + * @return Resource collection API of AppAttachPackages. + */ + public AppAttachPackages appAttachPackages() { + if (this.appAttachPackages == null) { + this.appAttachPackages = new AppAttachPackagesImpl(clientObject.getAppAttachPackages(), this); + } + return appAttachPackages; + } + /** * Gets wrapped service client DesktopVirtualizationApiClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. - * + * * @return Wrapped service client DesktopVirtualizationApiClient. */ public DesktopVirtualizationApiClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackageInfoesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackageInfoesClient.java new file mode 100644 index 000000000000..8d638a66b3e0 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackageInfoesClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.ImportPackageInfoRequest; + +/** + * An instance of this class provides access to all the operations defined in AppAttachPackageInfoesClient. + */ +public interface AppAttachPackageInfoesClient { + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux importMethodAsync(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest); + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest); + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest, Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackagesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackagesClient.java new file mode 100644 index 000000000000..acc2fd51b9c5 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackagesClient.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackagePatch; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AppAttachPackagesClient. + */ +public interface AppAttachPackagesClient { + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 app attach package along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String appAttachPackageName); + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 app attach package on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono getByResourceGroupAsync(String resourceGroupName, String appAttachPackageName); + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 app attach package along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, + String appAttachPackageName, Context context); + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 app attach package. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppAttachPackageInner getByResourceGroup(String resourceGroupName, String appAttachPackageName); + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String appAttachPackageName, AppAttachPackageInner appAttachPackage); + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateAsync(String resourceGroupName, String appAttachPackageName, + AppAttachPackageInner appAttachPackage); + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach Package definitions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for App Attach Package properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String appAttachPackageName, + AppAttachPackageInner appAttachPackage, Context context); + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppAttachPackageInner createOrUpdate(String resourceGroupName, String appAttachPackageName, + AppAttachPackageInner appAttachPackage); + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 appAttachPackageName); + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 appAttachPackageName); + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 appAttachPackageName, Context context); + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 appAttachPackageName); + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackagePatch Object containing App Attach Package definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 App Attach Package properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono> updateWithResponseAsync(String resourceGroupName, String appAttachPackageName, + AppAttachPackagePatch appAttachPackagePatch); + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 App Attach Package properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Mono updateAsync(String resourceGroupName, String appAttachPackageName); + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackagePatch Object containing App Attach Package definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 App Attach Package properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String appAttachPackageName, + AppAttachPackagePatch appAttachPackagePatch, Context context); + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 App Attach Package properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppAttachPackageInner update(String resourceGroupName, String appAttachPackageName); + + /** + * List App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and 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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter); + + /** + * List App Attach packages in resource group. + * + * @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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listByResourceGroupAsync(String resourceGroupName); + + /** + * List App Attach packages in resource group. + * + * @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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); + + /** + * List App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(String filter); + + /** + * List App Attach packages 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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedFlux listAsync(); + + /** + * List App Attach packages 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String filter, Context context); +} 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 14c09dee0e0d..2c35056382d2 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -27,12 +29,12 @@ public interface ApplicationGroupsClient { * @return an application group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String applicationGroupName); + 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. @@ -45,7 +47,7 @@ Mono> getByResourceGroupWithResponseAsync( /** * 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. @@ -55,12 +57,12 @@ Mono> getByResourceGroupWithResponseAsync( * @return an application group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,23 +75,23 @@ Response getByResourceGroupWithResponse( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 represents a ApplicationGroup definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + Mono> createOrUpdateWithResponseAsync(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. @@ -99,12 +101,12 @@ Mono> createOrUpdateWithResponseAsync( * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + Mono createOrUpdateAsync(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. @@ -115,12 +117,12 @@ Mono createOrUpdateAsync( * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String applicationGroupName, + ApplicationGroupInner applicationGroup, Context context); /** * 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. @@ -130,12 +132,12 @@ Response createOrUpdateWithResponse( * @return represents a ApplicationGroup definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationGroupInner createOrUpdate( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup); + ApplicationGroupInner createOrUpdate(String resourceGroupName, String applicationGroupName, + ApplicationGroupInner 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +150,7 @@ ApplicationGroupInner createOrUpdate( /** * 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. @@ -161,7 +163,7 @@ ApplicationGroupInner createOrUpdate( /** * 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. @@ -175,7 +177,7 @@ ApplicationGroupInner createOrUpdate( /** * 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. @@ -187,23 +189,23 @@ ApplicationGroupInner createOrUpdate( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 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); + Mono> updateWithResponseAsync(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. @@ -216,7 +218,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -227,12 +229,12 @@ Mono> updateWithResponseAsync( * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup, Context context); + Response updateWithResponse(String resourceGroupName, String applicationGroupName, + ApplicationGroupPatch applicationGroup, Context context); /** * 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. @@ -245,7 +247,7 @@ Response updateWithResponse( /** * List applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -257,12 +259,12 @@ Response updateWithResponse( * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync( - String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * 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. @@ -274,7 +276,7 @@ PagedFlux listByResourceGroupAsync( /** * 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. @@ -286,7 +288,7 @@ PagedFlux listByResourceGroupAsync( /** * List applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -299,17 +301,12 @@ PagedFlux listByResourceGroupAsync( * @return applicationGroupList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer pageSize, + Boolean isDescending, Integer initialSkip, 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. @@ -321,7 +318,7 @@ PagedIterable listByResourceGroup( /** * 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}. @@ -331,7 +328,7 @@ PagedIterable listByResourceGroup( /** * 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 PagedIterable}. @@ -341,7 +338,7 @@ PagedIterable listByResourceGroup( /** * List applicationGroups in subscription. - * + * * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 32935c030ede..328b4c594e83 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -28,12 +30,12 @@ public interface ApplicationsClient { * @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); + 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. @@ -47,7 +49,7 @@ Mono> getWithResponseAsync( /** * 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. @@ -58,12 +60,12 @@ Mono> getWithResponseAsync( * @return an application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context); + Response getWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, Context context); /** * 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. @@ -77,7 +79,7 @@ Response getWithResponse( /** * 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. @@ -88,12 +90,12 @@ Response getWithResponse( * @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); + 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. @@ -104,12 +106,12 @@ Mono> createOrUpdateWithResponseAsync( * @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); + Mono createOrUpdateAsync(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. @@ -121,16 +123,12 @@ Mono createOrUpdateAsync( * @return schema for Application properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationInner application, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, ApplicationInner application, 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. @@ -141,12 +139,12 @@ Response createOrUpdateWithResponse( * @return schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner createOrUpdate( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application); + ApplicationInner createOrUpdate(String resourceGroupName, String applicationGroupName, String applicationName, + ApplicationInner 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. * @param applicationName The name of the application within the specified application group. @@ -156,12 +154,12 @@ ApplicationInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName); + 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. @@ -175,7 +173,7 @@ Mono> deleteWithResponseAsync( /** * 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. @@ -186,12 +184,12 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context); + Response deleteWithResponse(String resourceGroupName, String applicationGroupName, String applicationName, + 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. @@ -204,7 +202,7 @@ Response deleteWithResponse( /** * 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. @@ -215,12 +213,12 @@ Response deleteWithResponse( * @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); + 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. @@ -234,7 +232,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -246,16 +244,12 @@ Mono> updateWithResponseAsync( * @return schema for Application properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationPatch application, - Context context); + Response updateWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, ApplicationPatch application, 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. @@ -269,7 +263,7 @@ Response updateWithResponse( /** * 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. @@ -281,16 +275,12 @@ Response updateWithResponse( * @return applicationList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String applicationGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * List applications. - * + * * @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. @@ -303,7 +293,7 @@ PagedFlux listAsync( /** * List applications. - * + * * @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. @@ -316,7 +306,7 @@ PagedFlux listAsync( /** * 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. @@ -329,11 +319,6 @@ PagedFlux listAsync( * @return applicationList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 8a128c96020d..12f17ea6865b 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 @@ -7,152 +7,168 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for DesktopVirtualizationApiClient class. */ +/** + * The interface for DesktopVirtualizationApiClient class. + */ public interface DesktopVirtualizationApiClient { /** - * Gets The ID of the target subscription. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the WorkspacesClient object to access its operations. - * + * * @return the WorkspacesClient object. */ 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. - * + * * @return the ScalingPlansClient object. */ ScalingPlansClient getScalingPlans(); /** * Gets the ScalingPlanPooledSchedulesClient object to access its operations. - * + * * @return the ScalingPlanPooledSchedulesClient object. */ ScalingPlanPooledSchedulesClient getScalingPlanPooledSchedules(); /** * Gets the ScalingPlanPersonalSchedulesClient object to access its operations. - * + * * @return the ScalingPlanPersonalSchedulesClient object. */ ScalingPlanPersonalSchedulesClient getScalingPlanPersonalSchedules(); /** * Gets the ApplicationGroupsClient object to access its operations. - * + * * @return the ApplicationGroupsClient object. */ ApplicationGroupsClient getApplicationGroups(); /** * Gets the StartMenuItemsClient object to access its operations. - * + * * @return the StartMenuItemsClient object. */ StartMenuItemsClient getStartMenuItems(); /** * Gets the ApplicationsClient object to access its operations. - * + * * @return the ApplicationsClient object. */ ApplicationsClient getApplications(); /** * Gets the DesktopsClient object to access its operations. - * + * * @return the DesktopsClient object. */ DesktopsClient getDesktops(); /** * Gets the HostPoolsClient object to access its operations. - * + * * @return the HostPoolsClient object. */ HostPoolsClient getHostPools(); /** * Gets the UserSessionsClient object to access its operations. - * + * * @return the UserSessionsClient object. */ UserSessionsClient getUserSessions(); /** * Gets the SessionHostsClient object to access its operations. - * + * * @return the SessionHostsClient object. */ SessionHostsClient getSessionHosts(); /** * Gets the MsixPackagesClient object to access its operations. - * + * * @return the MsixPackagesClient object. */ MsixPackagesClient getMsixPackages(); + /** + * Gets the AppAttachPackageInfoesClient object to access its operations. + * + * @return the AppAttachPackageInfoesClient object. + */ + AppAttachPackageInfoesClient getAppAttachPackageInfoes(); + /** * Gets the MsixImagesClient object to access its operations. - * + * * @return the MsixImagesClient object. */ MsixImagesClient getMsixImages(); + + /** + * Gets the AppAttachPackagesClient object to access its operations. + * + * @return the AppAttachPackagesClient object. + */ + AppAttachPackagesClient getAppAttachPackages(); } 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 d44baeeef5eb..2e5075ecf914 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -28,12 +30,12 @@ public interface DesktopsClient { * @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); + 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. @@ -47,7 +49,7 @@ Mono> getWithResponseAsync( /** * 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. @@ -58,12 +60,12 @@ Mono> getWithResponseAsync( * @return a desktop along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String applicationGroupName, String desktopName, Context context); + Response getWithResponse(String resourceGroupName, String applicationGroupName, String desktopName, + Context context); /** * 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. @@ -77,7 +79,7 @@ Response getWithResponse( /** * 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. @@ -88,12 +90,12 @@ Response getWithResponse( * @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); + 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. @@ -107,7 +109,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -119,16 +121,12 @@ Mono> updateWithResponseAsync( * @return schema for Desktop properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String desktopName, - DesktopPatch desktop, - Context context); + Response updateWithResponse(String resourceGroupName, String applicationGroupName, String desktopName, + 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. @@ -142,7 +140,7 @@ Response updateWithResponse( /** * 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. @@ -154,16 +152,12 @@ Response updateWithResponse( * @return desktopList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String applicationGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * List desktops. - * + * * @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. @@ -176,7 +170,7 @@ PagedFlux listAsync( /** * List desktops. - * + * * @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. @@ -189,7 +183,7 @@ PagedFlux listAsync( /** * 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. @@ -202,11 +196,6 @@ PagedFlux listAsync( * @return desktopList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 e41f0918a9b6..7fb47bd04d7c 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 @@ -15,11 +15,13 @@ 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. */ +/** + * 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. @@ -32,7 +34,7 @@ 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. @@ -45,7 +47,7 @@ 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. * @param context The context to associate with this operation. @@ -55,12 +57,12 @@ public interface HostPoolsClient { * @return a host pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String hostPoolName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,7 +75,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -83,12 +85,12 @@ Response getByResourceGroupWithResponse( * @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); + 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. @@ -102,7 +104,7 @@ Mono> createOrUpdateWithResponseAsync( /** * 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. @@ -113,12 +115,12 @@ Mono> createOrUpdateWithResponseAsync( * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String hostPoolName, + HostPoolInner hostPool, 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. @@ -132,7 +134,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -146,7 +148,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -159,7 +161,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -174,7 +176,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -186,7 +188,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -196,12 +198,12 @@ Response createOrUpdateWithResponse( * @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); + Mono> updateWithResponseAsync(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. @@ -214,7 +216,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -225,12 +227,12 @@ Mono> updateWithResponseAsync( * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context); + Response updateWithResponse(String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, + Context context); /** * 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. @@ -243,7 +245,7 @@ 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. @@ -254,12 +256,12 @@ Response updateWithResponse( * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip); /** * 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. @@ -271,7 +273,7 @@ PagedFlux listByResourceGroupAsync( /** * 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. @@ -283,7 +285,7 @@ PagedFlux listByResourceGroupAsync( /** * 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. @@ -295,12 +297,12 @@ PagedFlux listByResourceGroupAsync( * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip, Context context); /** * List hostPools in subscription. - * + * * @param pageSize Number of items per page. * @param isDescending Indicates whether the collection is descending. * @param initialSkip Initial number of items to skip. @@ -314,7 +316,7 @@ PagedIterable listByResourceGroup( /** * 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}. @@ -324,7 +326,7 @@ PagedIterable listByResourceGroup( /** * 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 PagedIterable}. @@ -334,7 +336,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -349,22 +351,22 @@ PagedIterable listByResourceGroup( /** * 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}. + * @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); + Mono> retrieveRegistrationTokenWithResponseAsync(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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -377,7 +379,7 @@ Mono> retrieveRegistrationTokenWithResponseAsync /** * 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. @@ -387,12 +389,12 @@ Mono> retrieveRegistrationTokenWithResponseAsync * @return represents a RegistrationInfo definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. 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..c79b9c09856a 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 @@ -12,11 +12,13 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; -/** An instance of this class provides access to all the operations defined in MsixImagesClient. */ +/** + * 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. @@ -26,12 +28,12 @@ public interface MsixImagesClient { * @return expandMsixImageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux expandAsync( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri); + PagedFlux expandAsync(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri); /** * 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. @@ -41,12 +43,12 @@ PagedFlux expandAsync( * @return expandMsixImageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable expand( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri); + PagedIterable expand(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri); /** * 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. @@ -57,6 +59,6 @@ PagedIterable expand( * @return expandMsixImageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable expand( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, Context context); + PagedIterable expand(String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, + Context context); } 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 7e90bbb3199e..5a00acdae0e4 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -28,12 +30,12 @@ public interface MsixPackagesClient { * @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); + 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. @@ -47,7 +49,7 @@ Mono> getWithResponseAsync( /** * 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. @@ -58,12 +60,12 @@ Mono> getWithResponseAsync( * @return a msixpackage along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); + Response getWithResponse(String resourceGroupName, String hostPoolName, + String msixPackageFullName, Context context); /** * 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. @@ -77,7 +79,7 @@ Response getWithResponse( /** * 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. @@ -88,12 +90,12 @@ Response getWithResponse( * @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); + 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. @@ -104,12 +106,12 @@ Mono> createOrUpdateWithResponseAsync( * @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); + Mono createOrUpdateAsync(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. @@ -121,16 +123,12 @@ Mono createOrUpdateAsync( * @return schema for MSIX Package properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackageInner msixPackage, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String hostPoolName, + String msixPackageFullName, MsixPackageInner msixPackage, 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. @@ -141,12 +139,12 @@ Response createOrUpdateWithResponse( * @return schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - MsixPackageInner createOrUpdate( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage); + MsixPackageInner createOrUpdate(String resourceGroupName, String hostPoolName, String msixPackageFullName, + MsixPackageInner msixPackage); /** * 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. @@ -156,12 +154,12 @@ MsixPackageInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName); + 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. @@ -175,7 +173,7 @@ Mono> deleteWithResponseAsync( /** * 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. @@ -186,12 +184,12 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); + Response deleteWithResponse(String resourceGroupName, String hostPoolName, String msixPackageFullName, + 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. @@ -204,7 +202,7 @@ Response deleteWithResponse( /** * 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. @@ -215,12 +213,12 @@ Response deleteWithResponse( * @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); + 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. @@ -234,7 +232,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -246,16 +244,12 @@ Mono> updateWithResponseAsync( * @return schema for MSIX Package properties along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackagePatch msixPackage, - Context context); + Response updateWithResponse(String resourceGroupName, String hostPoolName, + String msixPackageFullName, MsixPackagePatch msixPackage, 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. @@ -269,7 +263,7 @@ Response updateWithResponse( /** * 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. @@ -281,12 +275,12 @@ Response updateWithResponse( * @return msixPackageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -299,7 +293,7 @@ PagedFlux listAsync( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -312,7 +306,7 @@ PagedFlux listAsync( /** * 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. @@ -325,11 +319,6 @@ PagedFlux listAsync( * @return msixPackageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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..4e4e5c418518 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 @@ -11,11 +11,13 @@ 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. */ +/** + * 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}. @@ -25,7 +27,7 @@ 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 PagedIterable}. @@ -35,7 +37,7 @@ public interface OperationsClient { /** * List all of the available operations the Desktop Virtualization resource provider supports. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 b0fe67f7c09f..77454f1695e5 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 @@ -14,41 +14,43 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public interface PrivateEndpointConnectionsClient { /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName); + PagedFlux listByWorkspaceAsync(String resourceGroupName, + String workspaceName); /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName); + PagedIterable listByWorkspace(String resourceGroupName, + String workspaceName); /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param context The context to associate with this operation. @@ -56,19 +58,19 @@ PagedIterable listByWorkspace( * @throws com.azure.core.management.exception.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}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, 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 workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -80,27 +82,27 @@ Mono> getByWorkspaceWithR /** * 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. + * 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); + 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. + * 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. @@ -108,64 +110,64 @@ Mono getByWorkspaceAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response getByWorkspaceWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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); + PrivateEndpointConnectionWithSystemDataInner getByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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); + 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. + * 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); + Mono deleteByWorkspaceAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -173,16 +175,16 @@ Mono deleteByWorkspaceAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response deleteByWorkspaceWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -192,32 +194,30 @@ Response deleteByWorkspaceWithResponse( /** * 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. + * 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}. + * @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, + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -225,19 +225,16 @@ Mono> updateByWorkspaceWi * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateByWorkspaceAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + Mono updateByWorkspaceAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -246,20 +243,17 @@ Mono updateByWorkspaceAsync( * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateByWorkspaceWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, + Response updateByWorkspaceWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -267,15 +261,12 @@ Response updateByWorkspaceWithResp * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnectionWithSystemDataInner updateByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnection connection); /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -285,45 +276,45 @@ PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( * @throws com.azure.core.management.exception.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}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByHostPoolAsync(String resourceGroupName, + String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName); + PagedFlux listByHostPoolAsync(String resourceGroupName, + String hostPoolName); /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName); + PagedIterable listByHostPool(String resourceGroupName, + String hostPoolName); /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -334,24 +325,19 @@ PagedIterable listByHostPool( * @throws com.azure.core.management.exception.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}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 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. + * 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. @@ -363,27 +349,27 @@ Mono> getByHostPoolWithRe /** * 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. + * 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); + 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. + * 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. @@ -391,64 +377,64 @@ Mono getByHostPoolAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + Response getByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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); + PrivateEndpointConnectionWithSystemDataInner getByHostPool(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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); + 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. + * 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); + Mono deleteByHostPoolAsync(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -456,16 +442,16 @@ Mono deleteByHostPoolAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + Response deleteByHostPoolWithResponse(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, Context context); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -475,32 +461,30 @@ Response deleteByHostPoolWithResponse( /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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}. + * @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, + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -508,19 +492,16 @@ Mono> updateByHostPoolWit * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateByHostPoolAsync( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + Mono updateByHostPoolAsync(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -529,20 +510,17 @@ Mono updateByHostPoolAsync( * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateByHostPoolWithResponse( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, + Response updateByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -550,9 +528,6 @@ Response updateByHostPoolWithRespo * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionWithSystemDataInner updateByHostPool( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnectionWithSystemDataInner updateByHostPool(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, PrivateEndpointConnection connection); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/PrivateLinkResourcesClient.java index 07b8dda0897c..a88d8ebd9344 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 @@ -11,11 +11,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public interface PrivateLinkResourcesClient { /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param pageSize Number of items per page. @@ -27,12 +29,12 @@ public interface PrivateLinkResourcesClient { * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, + Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,7 +47,7 @@ PagedFlux listByWorkspaceAsync( /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -58,7 +60,7 @@ PagedFlux listByWorkspaceAsync( /** * 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. @@ -71,17 +73,12 @@ PagedFlux listByWorkspaceAsync( * @return a list of private link resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByWorkspace( - String resourceGroupName, - String workspaceName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); /** * List the private link resources available for this hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -93,12 +90,12 @@ PagedIterable listByWorkspace( * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List the private link resources available for this hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -111,7 +108,7 @@ PagedFlux listByHostPoolAsync( /** * 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. @@ -124,7 +121,7 @@ PagedFlux listByHostPoolAsync( /** * 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. @@ -137,11 +134,6 @@ PagedFlux listByHostPoolAsync( * @return a list of private link resources as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java index 011294d506d9..c528c5d02e59 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPersonalSchedulesClient.java @@ -14,11 +14,13 @@ import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ScalingPlanPersonalSchedulesClient. */ +/** + * An instance of this class provides access to all the operations defined in ScalingPlanPersonalSchedulesClient. + */ public interface ScalingPlanPersonalSchedulesClient { /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -28,12 +30,12 @@ public interface ScalingPlanPersonalSchedulesClient { * @return a ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono> getWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName); /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -43,12 +45,12 @@ Mono> getWithResponseAsync( * @return a ScalingPlanPersonalSchedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono getAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -59,12 +61,12 @@ Mono getAsync( * @return a ScalingPlanPersonalSchedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + Response getWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, Context context); /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -74,12 +76,12 @@ Response getWithResponse( * @return a ScalingPlanPersonalSchedule. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanPersonalScheduleInner get( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + ScalingPlanPersonalScheduleInner get(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -88,18 +90,15 @@ ScalingPlanPersonalScheduleInner get( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule); + Mono> createWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule); /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -110,15 +109,12 @@ Mono> createWithResponseAsync( * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule); + Mono createAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule); /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -130,16 +126,12 @@ Mono createAsync( * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule, - Context context); + Response createWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule, Context context); /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -150,15 +142,12 @@ Response createWithResponse( * @return represents a ScalingPlanPersonalSchedule definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanPersonalScheduleInner create( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule); + ScalingPlanPersonalScheduleInner create(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule); /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -168,12 +157,12 @@ ScalingPlanPersonalScheduleInner create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -187,7 +176,7 @@ Mono> deleteWithResponseAsync( /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -198,12 +187,12 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + Response deleteWithResponse(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, + Context context); /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -216,7 +205,7 @@ Response deleteWithResponse( /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -225,18 +214,15 @@ Response deleteWithResponse( * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalSchedulePatch scalingPlanSchedule); + Mono> updateWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalSchedulePatch scalingPlanSchedule); /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -246,12 +232,12 @@ Mono> updateWithResponseAsync( * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono updateAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -263,16 +249,12 @@ Mono updateAsync( * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalSchedulePatch scalingPlanSchedule, - Context context); + Response updateWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPersonalSchedulePatch scalingPlanSchedule, Context context); /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -282,12 +264,12 @@ Response updateWithResponse( * @return represents a ScalingPlanPersonalSchedule definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanPersonalScheduleInner update( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + ScalingPlanPersonalScheduleInner update(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -299,12 +281,12 @@ ScalingPlanPersonalScheduleInner update( * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String scalingPlanName, + Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -317,7 +299,7 @@ PagedFlux listAsync( /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -330,7 +312,7 @@ PagedFlux listAsync( /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -343,11 +325,6 @@ PagedFlux listAsync( * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String scalingPlanName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + 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/ScalingPlanPooledSchedulesClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/ScalingPlanPooledSchedulesClient.java index 4a06365c0df5..f84ced4c32ed 100644 --- 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -28,12 +30,12 @@ public interface ScalingPlanPooledSchedulesClient { * @return a ScalingPlanPooledSchedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono> getWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName); /** * Get a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -43,12 +45,12 @@ Mono> getWithResponseAsync( * @return a ScalingPlanPooledSchedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono getAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * Get a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -59,12 +61,12 @@ Mono getAsync( * @return a ScalingPlanPooledSchedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + 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. @@ -74,12 +76,12 @@ Response getWithResponse( * @return a ScalingPlanPooledSchedule. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanPooledScheduleInner get( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + 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. @@ -88,18 +90,15 @@ ScalingPlanPooledScheduleInner get( * @throws com.azure.core.management.exception.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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledScheduleInner scalingPlanSchedule); + Mono> createWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPooledScheduleInner scalingPlanSchedule); /** * Create or update a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -110,15 +109,12 @@ Mono> createWithResponseAsync( * @return represents a ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono createAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledScheduleInner scalingPlanSchedule); + Mono createAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPooledScheduleInner scalingPlanSchedule); /** * Create or update a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -130,16 +126,12 @@ Mono createAsync( * @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); + 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. @@ -150,15 +142,12 @@ Response createWithResponse( * @return represents a ScalingPlanPooledSchedule definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanPooledScheduleInner create( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledScheduleInner scalingPlanSchedule); + 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. @@ -168,12 +157,12 @@ ScalingPlanPooledScheduleInner create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * Remove a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -187,7 +176,7 @@ Mono> deleteWithResponseAsync( /** * 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. @@ -198,12 +187,12 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + 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. @@ -216,7 +205,7 @@ Response deleteWithResponse( /** * 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. @@ -225,18 +214,15 @@ Response deleteWithResponse( * @throws com.azure.core.management.exception.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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledSchedulePatch scalingPlanSchedule); + Mono> updateWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPooledSchedulePatch scalingPlanSchedule); /** * Update a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -246,12 +232,12 @@ Mono> updateWithResponseAsync( * @return represents a ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono updateAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + Mono updateAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * Update a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -263,16 +249,12 @@ Mono updateAsync( * @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); + 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. @@ -282,12 +264,12 @@ Response updateWithResponse( * @return represents a ScalingPlanPooledSchedule definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - ScalingPlanPooledScheduleInner update( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName); + ScalingPlanPooledScheduleInner update(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName); /** * List ScalingPlanPooledSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -299,12 +281,12 @@ ScalingPlanPooledScheduleInner update( * @return scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String scalingPlanName, + Integer pageSize, Boolean isDescending, Integer initialSkip); /** * List ScalingPlanPooledSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -317,7 +299,7 @@ PagedFlux listAsync( /** * 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. @@ -330,7 +312,7 @@ PagedFlux listAsync( /** * 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. @@ -343,11 +325,6 @@ PagedFlux listAsync( * @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); + 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 a032ae0d96e0..dfc4abf4e6aa 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -27,12 +29,12 @@ public interface ScalingPlansClient { * @return a scaling plan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String scalingPlanName); + 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. @@ -45,7 +47,7 @@ Mono> getByResourceGroupWithResponseAsync( /** * 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. @@ -55,12 +57,12 @@ Mono> getByResourceGroupWithResponseAsync( * @return a scaling plan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,7 +75,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -83,12 +85,12 @@ Response getByResourceGroupWithResponse( * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan); + 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. @@ -102,7 +104,7 @@ Mono> createWithResponseAsync( /** * 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. @@ -113,12 +115,12 @@ Mono> createWithResponseAsync( * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context); + Response createWithResponse(String resourceGroupName, String scalingPlanName, + ScalingPlanInner scalingPlan, 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. @@ -132,7 +134,7 @@ Response createWithResponse( /** * 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. @@ -145,7 +147,7 @@ Response createWithResponse( /** * 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. @@ -158,7 +160,7 @@ Response createWithResponse( /** * 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. @@ -172,7 +174,7 @@ Response createWithResponse( /** * 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. @@ -184,7 +186,7 @@ Response createWithResponse( /** * 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. @@ -194,12 +196,12 @@ Response createWithResponse( * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> updateWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan); + Mono> updateWithResponseAsync(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. @@ -212,7 +214,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -223,12 +225,12 @@ Mono> updateWithResponseAsync( * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context); + Response updateWithResponse(String resourceGroupName, String scalingPlanName, + ScalingPlanPatch scalingPlan, Context context); /** * 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. @@ -241,7 +243,7 @@ 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. @@ -252,12 +254,12 @@ Response updateWithResponse( * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * 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. @@ -269,7 +271,7 @@ PagedFlux listByResourceGroupAsync( /** * 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. @@ -281,7 +283,7 @@ PagedFlux listByResourceGroupAsync( /** * 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. @@ -293,12 +295,12 @@ PagedFlux listByResourceGroupAsync( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context); /** * List scaling plans in subscription. - * + * * @param pageSize Number of items per page. * @param isDescending Indicates whether the collection is descending. * @param initialSkip Initial number of items to skip. @@ -312,7 +314,7 @@ PagedIterable listByResourceGroup( /** * 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}. @@ -322,7 +324,7 @@ PagedIterable listByResourceGroup( /** * 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 PagedIterable}. @@ -332,7 +334,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -347,7 +349,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -359,12 +361,12 @@ PagedIterable listByResourceGroup( * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * 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. @@ -377,7 +379,7 @@ PagedFlux listByHostPoolAsync( /** * 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. @@ -390,7 +392,7 @@ PagedFlux listByHostPoolAsync( /** * 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. @@ -403,11 +405,6 @@ PagedFlux listByHostPoolAsync( * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 3b0d417491cd..f4ef87604a59 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -28,12 +30,12 @@ public interface SessionHostsClient { * @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); + 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. @@ -47,7 +49,7 @@ Mono> getWithResponseAsync( /** * 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. @@ -58,12 +60,12 @@ Mono> getWithResponseAsync( * @return a session host along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context); + Response getWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Context context); /** * 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. @@ -77,7 +79,7 @@ Response getWithResponse( /** * 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. @@ -88,12 +90,12 @@ Response getWithResponse( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force); + 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. @@ -107,7 +109,7 @@ Mono> deleteWithResponseAsync( /** * 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. @@ -119,12 +121,12 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context); + Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Boolean force, 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. @@ -137,7 +139,7 @@ Response deleteWithResponse( /** * 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. @@ -149,16 +151,12 @@ Response deleteWithResponse( * @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); + 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. @@ -172,7 +170,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -185,17 +183,12 @@ Mono> updateWithResponseAsync( * @return represents a SessionHost definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost, - Context context); + Response updateWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Boolean force, 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. @@ -209,7 +202,7 @@ Response updateWithResponse( /** * 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. @@ -221,12 +214,12 @@ Response updateWithResponse( * @return sessionHostList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -239,7 +232,7 @@ PagedFlux listAsync( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,7 +245,7 @@ PagedFlux listAsync( /** * 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. @@ -265,11 +258,6 @@ PagedFlux listAsync( * @return sessionHostList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 2a71d539d743..fe8b1c358d8f 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 @@ -11,11 +11,13 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in StartMenuItemsClient. + */ public interface StartMenuItemsClient { /** * List start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -27,16 +29,12 @@ public interface StartMenuItemsClient { * @return startMenuItemList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String applicationGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip); /** * 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. @@ -49,7 +47,7 @@ PagedFlux listAsync( /** * 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. @@ -62,7 +60,7 @@ PagedFlux listAsync( /** * List start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -75,11 +73,6 @@ PagedFlux listAsync( * @return startMenuItemList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 36027db5a9d0..2af8408086a6 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -31,17 +33,12 @@ public interface UserSessionsClient { * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByHostPoolAsync( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip); + PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip); /** * 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. @@ -54,7 +51,7 @@ PagedFlux listByHostPoolAsync( /** * 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. @@ -67,7 +64,7 @@ PagedFlux listByHostPoolAsync( /** * 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. @@ -81,18 +78,12 @@ PagedFlux listByHostPoolAsync( * @return userSessionList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip, 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. @@ -103,12 +94,12 @@ PagedIterable listByHostPool( * @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); + 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. @@ -119,12 +110,12 @@ Mono> getWithResponseAsync( * @return a userSession on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono getAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + 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. @@ -136,12 +127,12 @@ Mono getAsync( * @return a userSession along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); + Response getWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, 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. @@ -156,7 +147,7 @@ Response getWithResponse( /** * 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. @@ -168,12 +159,12 @@ Response getWithResponse( * @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); + 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. @@ -188,7 +179,7 @@ Mono> deleteWithResponseAsync( /** * 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. @@ -201,17 +192,12 @@ Mono> deleteWithResponseAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - Boolean force, - Context context); + Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, Boolean force, 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. @@ -225,7 +211,7 @@ Response deleteWithResponse( /** * 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. @@ -238,17 +224,12 @@ Response deleteWithResponse( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Integer pageSize, - Boolean isDescending, - Integer initialSkip); + PagedFlux listAsync(String resourceGroupName, String hostPoolName, String sessionHostname, + Integer pageSize, Boolean isDescending, Integer initialSkip); /** * 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. @@ -262,7 +243,7 @@ PagedFlux listAsync( /** * 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. @@ -276,7 +257,7 @@ PagedFlux listAsync( /** * 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. @@ -290,18 +271,12 @@ PagedFlux listAsync( * @return userSessionList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname, + Integer pageSize, Boolean isDescending, Integer initialSkip, 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. @@ -312,12 +287,12 @@ PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Mono> disconnectWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId); + 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. @@ -328,12 +303,12 @@ Mono> disconnectWithResponseAsync( * @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); + 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. @@ -345,12 +320,12 @@ Mono disconnectAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response disconnectWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); + Response disconnectWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, 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. @@ -364,7 +339,7 @@ Response disconnectWithResponse( /** * 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. @@ -376,16 +351,12 @@ Response disconnectWithResponse( * @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); + Mono> sendMessageWithResponseAsync(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. @@ -396,12 +367,12 @@ Mono> sendMessageWithResponseAsync( * @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); + Mono sendMessageAsync(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. @@ -414,17 +385,12 @@ Mono sendMessageAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response sendMessageWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context); + Response sendMessageWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + 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. 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 aac2771e92a3..681d79eab9eb 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 @@ -14,11 +14,13 @@ 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. */ +/** + * 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. @@ -31,7 +33,7 @@ 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. @@ -44,7 +46,7 @@ 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. * @param context The context to associate with this operation. @@ -54,12 +56,12 @@ public interface WorkspacesClient { * @return a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -72,7 +74,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -82,12 +84,12 @@ Response getByResourceGroupWithResponse( * @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); + 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. @@ -101,7 +103,7 @@ Mono> createOrUpdateWithResponseAsync( /** * 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. @@ -112,12 +114,12 @@ Mono> createOrUpdateWithResponseAsync( * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner workspace, 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. @@ -131,7 +133,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -144,7 +146,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -157,7 +159,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -171,7 +173,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -183,7 +185,7 @@ Response createOrUpdateWithResponse( /** * 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. @@ -193,12 +195,12 @@ Response createOrUpdateWithResponse( * @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); + Mono> updateWithResponseAsync(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. @@ -211,7 +213,7 @@ Mono> updateWithResponseAsync( /** * 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. @@ -222,12 +224,12 @@ Mono> updateWithResponseAsync( * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context); + Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspacePatch workspace, Context context); /** * 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. @@ -240,7 +242,7 @@ 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. @@ -251,12 +253,12 @@ Response updateWithResponse( * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip); + PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip); /** * 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. @@ -268,7 +270,7 @@ PagedFlux listByResourceGroupAsync( /** * 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. @@ -280,7 +282,7 @@ PagedFlux listByResourceGroupAsync( /** * 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. @@ -292,12 +294,12 @@ PagedFlux listByResourceGroupAsync( * @return workspaceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip, 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}. @@ -307,7 +309,7 @@ PagedIterable listByResourceGroup( /** * 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 PagedIterable}. @@ -317,7 +319,7 @@ PagedIterable listByResourceGroup( /** * List workspaces in subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/AppAttachPackageInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/AppAttachPackageInner.java new file mode 100644 index 000000000000..5409ab40f678 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/AppAttachPackageInner.java @@ -0,0 +1,101 @@ +// Copyright (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.Resource; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * Schema for App Attach Package properties. + */ +@Fluent +public final class AppAttachPackageInner extends Resource { + /* + * Detailed properties for App Attach Package + */ + @JsonProperty(value = "properties", required = true) + private AppAttachPackageProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AppAttachPackageInner class. + */ + public AppAttachPackageInner() { + } + + /** + * Get the properties property: Detailed properties for App Attach Package. + * + * @return the properties value. + */ + public AppAttachPackageProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Detailed properties for App Attach Package. + * + * @param properties the properties value to set. + * @return the AppAttachPackageInner object itself. + */ + public AppAttachPackageInner withProperties(AppAttachPackageProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public AppAttachPackageInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public AppAttachPackageInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property properties in model AppAttachPackageInner")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AppAttachPackageInner.class); +} 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 c4f0c2085fdf..ed46cfa517bd 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; 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.ApplicationGroupType; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; @@ -15,86 +14,89 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Represents a ApplicationGroup definition. */ +/** + * Represents a ApplicationGroup definition. + */ @Fluent public final class ApplicationGroupInner extends ResourceModelWithAllowedPropertySet { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Detailed properties for ApplicationGroup */ @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. - * - * @return the systemData value. + * Creates an instance of ApplicationGroupInner class. */ - public SystemData systemData() { - return this.systemData; + public ApplicationGroupInner() { } /** * Get the innerProperties property: Detailed properties for ApplicationGroup. - * + * * @return the innerProperties value. */ private ApplicationGroupProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationGroupInner withManagedBy(String managedBy) { super.withManagedBy(managedBy); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationGroupInner withKind(String kind) { super.withKind(kind); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationGroupInner withIdentity(ResourceModelWithAllowedPropertySetIdentity identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationGroupInner withSku(ResourceModelWithAllowedPropertySetSku sku) { super.withSku(sku); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationGroupInner withPlan(ResourceModelWithAllowedPropertySetPlan plan) { super.withPlan(plan); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationGroupInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ApplicationGroupInner withTags(Map tags) { super.withTags(tags); @@ -103,7 +105,7 @@ public ApplicationGroupInner withTags(Map tags) { /** * Get the objectId property: ObjectId of ApplicationGroup. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -112,7 +114,7 @@ public String objectId() { /** * Get the description property: Description of ApplicationGroup. - * + * * @return the description value. */ public String description() { @@ -121,7 +123,7 @@ public String description() { /** * Set the description property: Description of ApplicationGroup. - * + * * @param description the description value to set. * @return the ApplicationGroupInner object itself. */ @@ -135,7 +137,7 @@ public ApplicationGroupInner withDescription(String description) { /** * Get the friendlyName property: Friendly name of ApplicationGroup. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -144,7 +146,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of ApplicationGroup. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationGroupInner object itself. */ @@ -158,7 +160,7 @@ public ApplicationGroupInner withFriendlyName(String friendlyName) { /** * Get the hostPoolArmPath property: HostPool arm path of ApplicationGroup. - * + * * @return the hostPoolArmPath value. */ public String hostPoolArmPath() { @@ -167,7 +169,7 @@ public String hostPoolArmPath() { /** * Set the hostPoolArmPath property: HostPool arm path of ApplicationGroup. - * + * * @param hostPoolArmPath the hostPoolArmPath value to set. * @return the ApplicationGroupInner object itself. */ @@ -181,7 +183,7 @@ public ApplicationGroupInner withHostPoolArmPath(String hostPoolArmPath) { /** * Get the workspaceArmPath property: Workspace arm path of ApplicationGroup. - * + * * @return the workspaceArmPath value. */ public String workspaceArmPath() { @@ -190,7 +192,7 @@ public String workspaceArmPath() { /** * Get the applicationGroupType property: Resource Type of ApplicationGroup. - * + * * @return the applicationGroupType value. */ public ApplicationGroupType applicationGroupType() { @@ -199,7 +201,7 @@ public ApplicationGroupType applicationGroupType() { /** * Set the applicationGroupType property: Resource Type of ApplicationGroup. - * + * * @param applicationGroupType the applicationGroupType value to set. * @return the ApplicationGroupInner object itself. */ @@ -213,7 +215,7 @@ public ApplicationGroupInner withApplicationGroupType(ApplicationGroupType appli /** * Get the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ public Boolean cloudPcResource() { @@ -222,7 +224,7 @@ public Boolean cloudPcResource() { /** * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @return the showInFeed value. */ public Boolean showInFeed() { @@ -231,7 +233,7 @@ public Boolean showInFeed() { /** * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @param showInFeed the showInFeed value to set. * @return the ApplicationGroupInner object itself. */ @@ -245,17 +247,16 @@ public ApplicationGroupInner withShowInFeed(Boolean showInFeed) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model ApplicationGroupInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model ApplicationGroupInner")); } else { innerProperties().validate(); } 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 d950f7dda412..212ea045a072 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** ApplicationGroup properties that can be patched. */ +/** + * ApplicationGroup properties that can be patched. + */ @Fluent public final class ApplicationGroupPatchProperties { /* @@ -28,13 +30,15 @@ public final class ApplicationGroupPatchProperties { @JsonProperty(value = "showInFeed") private Boolean showInFeed; - /** Creates an instance of ApplicationGroupPatchProperties class. */ + /** + * Creates an instance of ApplicationGroupPatchProperties class. + */ public ApplicationGroupPatchProperties() { } /** * Get the description property: Description of ApplicationGroup. - * + * * @return the description value. */ public String description() { @@ -43,7 +47,7 @@ public String description() { /** * Set the description property: Description of ApplicationGroup. - * + * * @param description the description value to set. * @return the ApplicationGroupPatchProperties object itself. */ @@ -54,7 +58,7 @@ public ApplicationGroupPatchProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of ApplicationGroup. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -63,7 +67,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of ApplicationGroup. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationGroupPatchProperties object itself. */ @@ -74,7 +78,7 @@ public ApplicationGroupPatchProperties withFriendlyName(String friendlyName) { /** * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @return the showInFeed value. */ public Boolean showInFeed() { @@ -83,7 +87,7 @@ public Boolean showInFeed() { /** * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @param showInFeed the showInFeed value to set. * @return the ApplicationGroupPatchProperties object itself. */ @@ -94,7 +98,7 @@ public ApplicationGroupPatchProperties withShowInFeed(Boolean showInFeed) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationGroupProperties.java index ddf0c382b536..7aba4a096e5b 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 @@ -9,7 +9,9 @@ import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for ApplicationGroup properties. */ +/** + * Schema for ApplicationGroup properties. + */ @Fluent public final class ApplicationGroupProperties { /* @@ -60,13 +62,15 @@ public final class ApplicationGroupProperties { @JsonProperty(value = "showInFeed") private Boolean showInFeed; - /** Creates an instance of ApplicationGroupProperties class. */ + /** + * Creates an instance of ApplicationGroupProperties class. + */ public ApplicationGroupProperties() { } /** * Get the objectId property: ObjectId of ApplicationGroup. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -75,7 +79,7 @@ public String objectId() { /** * Get the description property: Description of ApplicationGroup. - * + * * @return the description value. */ public String description() { @@ -84,7 +88,7 @@ public String description() { /** * Set the description property: Description of ApplicationGroup. - * + * * @param description the description value to set. * @return the ApplicationGroupProperties object itself. */ @@ -95,7 +99,7 @@ public ApplicationGroupProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of ApplicationGroup. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -104,7 +108,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of ApplicationGroup. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationGroupProperties object itself. */ @@ -115,7 +119,7 @@ public ApplicationGroupProperties withFriendlyName(String friendlyName) { /** * Get the hostPoolArmPath property: HostPool arm path of ApplicationGroup. - * + * * @return the hostPoolArmPath value. */ public String hostPoolArmPath() { @@ -124,7 +128,7 @@ public String hostPoolArmPath() { /** * Set the hostPoolArmPath property: HostPool arm path of ApplicationGroup. - * + * * @param hostPoolArmPath the hostPoolArmPath value to set. * @return the ApplicationGroupProperties object itself. */ @@ -135,7 +139,7 @@ public ApplicationGroupProperties withHostPoolArmPath(String hostPoolArmPath) { /** * Get the workspaceArmPath property: Workspace arm path of ApplicationGroup. - * + * * @return the workspaceArmPath value. */ public String workspaceArmPath() { @@ -144,7 +148,7 @@ public String workspaceArmPath() { /** * Get the applicationGroupType property: Resource Type of ApplicationGroup. - * + * * @return the applicationGroupType value. */ public ApplicationGroupType applicationGroupType() { @@ -153,7 +157,7 @@ public ApplicationGroupType applicationGroupType() { /** * Set the applicationGroupType property: Resource Type of ApplicationGroup. - * + * * @param applicationGroupType the applicationGroupType value to set. * @return the ApplicationGroupProperties object itself. */ @@ -164,7 +168,7 @@ public ApplicationGroupProperties withApplicationGroupType(ApplicationGroupType /** * Get the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ public Boolean cloudPcResource() { @@ -173,7 +177,7 @@ public Boolean cloudPcResource() { /** * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @return the showInFeed value. */ public Boolean showInFeed() { @@ -182,7 +186,7 @@ public Boolean showInFeed() { /** * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @param showInFeed the showInFeed value to set. * @return the ApplicationGroupProperties object itself. */ @@ -193,21 +197,19 @@ public ApplicationGroupProperties withShowInFeed(Boolean showInFeed) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (hostPoolArmPath() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property hostPoolArmPath in model ApplicationGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property hostPoolArmPath in model ApplicationGroupProperties")); } if (applicationGroupType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property applicationGroupType in model ApplicationGroupProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property applicationGroupType in model ApplicationGroupProperties")); } } 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 95a3eee8def3..2502a3b937ef 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 @@ -12,14 +12,12 @@ import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for Application properties. */ +/** + * Schema for Application properties. + */ @Fluent public final class ApplicationInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; /* * Detailed properties for Application @@ -27,31 +25,39 @@ public final class ApplicationInner extends ProxyResource { @JsonProperty(value = "properties", required = true) private ApplicationProperties innerProperties = new ApplicationProperties(); - /** Creates an instance of ApplicationInner class. */ - public ApplicationInner() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. + * Creates an instance of ApplicationInner class. */ - public SystemData systemData() { - return this.systemData; + public ApplicationInner() { } /** * Get the innerProperties property: Detailed properties for Application. - * + * * @return the innerProperties value. */ private ApplicationProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the objectId property: ObjectId of Application. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -60,7 +66,7 @@ public String objectId() { /** * Get the description property: Description of Application. - * + * * @return the description value. */ public String description() { @@ -69,7 +75,7 @@ public String description() { /** * Set the description property: Description of Application. - * + * * @param description the description value to set. * @return the ApplicationInner object itself. */ @@ -83,7 +89,7 @@ public ApplicationInner withDescription(String description) { /** * Get the friendlyName property: Friendly name of Application. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -92,7 +98,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Application. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationInner object itself. */ @@ -106,7 +112,7 @@ public ApplicationInner withFriendlyName(String friendlyName) { /** * Get the filePath property: Specifies a path for the executable file for the application. - * + * * @return the filePath value. */ public String filePath() { @@ -115,7 +121,7 @@ public String filePath() { /** * Set the filePath property: Specifies a path for the executable file for the application. - * + * * @param filePath the filePath value to set. * @return the ApplicationInner object itself. */ @@ -129,7 +135,7 @@ public ApplicationInner withFilePath(String filePath) { /** * Get the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @return the msixPackageFamilyName value. */ public String msixPackageFamilyName() { @@ -138,7 +144,7 @@ public String msixPackageFamilyName() { /** * Set the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @param msixPackageFamilyName the msixPackageFamilyName value to set. * @return the ApplicationInner object itself. */ @@ -152,7 +158,7 @@ public ApplicationInner withMsixPackageFamilyName(String msixPackageFamilyName) /** * Get the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @return the msixPackageApplicationId value. */ public String msixPackageApplicationId() { @@ -161,7 +167,7 @@ public String msixPackageApplicationId() { /** * Set the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @param msixPackageApplicationId the msixPackageApplicationId value to set. * @return the ApplicationInner object itself. */ @@ -175,7 +181,7 @@ public ApplicationInner withMsixPackageApplicationId(String msixPackageApplicati /** * Get the applicationType property: Resource Type of Application. - * + * * @return the applicationType value. */ public RemoteApplicationType applicationType() { @@ -184,7 +190,7 @@ public RemoteApplicationType applicationType() { /** * Set the applicationType property: Resource Type of Application. - * + * * @param applicationType the applicationType value to set. * @return the ApplicationInner object itself. */ @@ -200,7 +206,7 @@ public ApplicationInner withApplicationType(RemoteApplicationType applicationTyp * Get the commandLineSetting property: 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. - * + * * @return the commandLineSetting value. */ public CommandLineSetting commandLineSetting() { @@ -211,7 +217,7 @@ public CommandLineSetting commandLineSetting() { * Set the commandLineSetting property: 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. - * + * * @param commandLineSetting the commandLineSetting value to set. * @return the ApplicationInner object itself. */ @@ -225,7 +231,7 @@ public ApplicationInner withCommandLineSetting(CommandLineSetting commandLineSet /** * Get the commandLineArguments property: Command Line Arguments for Application. - * + * * @return the commandLineArguments value. */ public String commandLineArguments() { @@ -234,7 +240,7 @@ public String commandLineArguments() { /** * Set the commandLineArguments property: Command Line Arguments for Application. - * + * * @param commandLineArguments the commandLineArguments value to set. * @return the ApplicationInner object itself. */ @@ -248,7 +254,7 @@ public ApplicationInner withCommandLineArguments(String commandLineArguments) { /** * Get the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @return the showInPortal value. */ public Boolean showInPortal() { @@ -257,7 +263,7 @@ public Boolean showInPortal() { /** * Set the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @param showInPortal the showInPortal value to set. * @return the ApplicationInner object itself. */ @@ -271,7 +277,7 @@ public ApplicationInner withShowInPortal(Boolean showInPortal) { /** * Get the iconPath property: Path to icon. - * + * * @return the iconPath value. */ public String iconPath() { @@ -280,7 +286,7 @@ public String iconPath() { /** * Set the iconPath property: Path to icon. - * + * * @param iconPath the iconPath value to set. * @return the ApplicationInner object itself. */ @@ -294,7 +300,7 @@ public ApplicationInner withIconPath(String iconPath) { /** * Get the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ public Integer iconIndex() { @@ -303,7 +309,7 @@ public Integer iconIndex() { /** * Set the iconIndex property: Index of the icon. - * + * * @param iconIndex the iconIndex value to set. * @return the ApplicationInner object itself. */ @@ -317,7 +323,7 @@ public ApplicationInner withIconIndex(Integer iconIndex) { /** * Get the iconHash property: Hash of the icon. - * + * * @return the iconHash value. */ public String iconHash() { @@ -326,24 +332,23 @@ public String iconHash() { /** * Get the iconContent property: the icon a 64 bit string as a byte array. - * + * * @return the iconContent value. */ public byte[] iconContent() { - return this.innerProperties() == null ? new byte[0] : this.innerProperties().iconContent(); + return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().iconContent(); } /** * 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 ApplicationInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model ApplicationInner")); } else { innerProperties().validate(); } 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 48003f018adb..f4d07feab122 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 @@ -9,7 +9,9 @@ import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Application properties that can be patched. */ +/** + * Application properties that can be patched. + */ @Fluent public final class ApplicationPatchProperties { /* @@ -31,8 +33,7 @@ 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; @@ -79,13 +80,15 @@ public final class ApplicationPatchProperties { @JsonProperty(value = "applicationType") private RemoteApplicationType applicationType; - /** Creates an instance of ApplicationPatchProperties class. */ + /** + * Creates an instance of ApplicationPatchProperties class. + */ public ApplicationPatchProperties() { } /** * Get the description property: Description of Application. - * + * * @return the description value. */ public String description() { @@ -94,7 +97,7 @@ public String description() { /** * Set the description property: Description of Application. - * + * * @param description the description value to set. * @return the ApplicationPatchProperties object itself. */ @@ -105,7 +108,7 @@ public ApplicationPatchProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of Application. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -114,7 +117,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Application. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationPatchProperties object itself. */ @@ -125,7 +128,7 @@ public ApplicationPatchProperties withFriendlyName(String friendlyName) { /** * Get the filePath property: Specifies a path for the executable file for the application. - * + * * @return the filePath value. */ public String filePath() { @@ -134,7 +137,7 @@ public String filePath() { /** * Set the filePath property: Specifies a path for the executable file for the application. - * + * * @param filePath the filePath value to set. * @return the ApplicationPatchProperties object itself. */ @@ -147,7 +150,7 @@ public ApplicationPatchProperties withFilePath(String filePath) { * Get the commandLineSetting property: 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. - * + * * @return the commandLineSetting value. */ public CommandLineSetting commandLineSetting() { @@ -158,7 +161,7 @@ public CommandLineSetting commandLineSetting() { * Set the commandLineSetting property: 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. - * + * * @param commandLineSetting the commandLineSetting value to set. * @return the ApplicationPatchProperties object itself. */ @@ -169,7 +172,7 @@ public ApplicationPatchProperties withCommandLineSetting(CommandLineSetting comm /** * Get the commandLineArguments property: Command Line Arguments for Application. - * + * * @return the commandLineArguments value. */ public String commandLineArguments() { @@ -178,7 +181,7 @@ public String commandLineArguments() { /** * Set the commandLineArguments property: Command Line Arguments for Application. - * + * * @param commandLineArguments the commandLineArguments value to set. * @return the ApplicationPatchProperties object itself. */ @@ -189,7 +192,7 @@ public ApplicationPatchProperties withCommandLineArguments(String commandLineArg /** * Get the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @return the showInPortal value. */ public Boolean showInPortal() { @@ -198,7 +201,7 @@ public Boolean showInPortal() { /** * Set the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @param showInPortal the showInPortal value to set. * @return the ApplicationPatchProperties object itself. */ @@ -209,7 +212,7 @@ public ApplicationPatchProperties withShowInPortal(Boolean showInPortal) { /** * Get the iconPath property: Path to icon. - * + * * @return the iconPath value. */ public String iconPath() { @@ -218,7 +221,7 @@ public String iconPath() { /** * Set the iconPath property: Path to icon. - * + * * @param iconPath the iconPath value to set. * @return the ApplicationPatchProperties object itself. */ @@ -229,7 +232,7 @@ public ApplicationPatchProperties withIconPath(String iconPath) { /** * Get the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ public Integer iconIndex() { @@ -238,7 +241,7 @@ public Integer iconIndex() { /** * Set the iconIndex property: Index of the icon. - * + * * @param iconIndex the iconIndex value to set. * @return the ApplicationPatchProperties object itself. */ @@ -249,7 +252,7 @@ public ApplicationPatchProperties withIconIndex(Integer iconIndex) { /** * Get the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @return the msixPackageFamilyName value. */ public String msixPackageFamilyName() { @@ -258,7 +261,7 @@ public String msixPackageFamilyName() { /** * Set the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @param msixPackageFamilyName the msixPackageFamilyName value to set. * @return the ApplicationPatchProperties object itself. */ @@ -269,7 +272,7 @@ public ApplicationPatchProperties withMsixPackageFamilyName(String msixPackageFa /** * Get the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @return the msixPackageApplicationId value. */ public String msixPackageApplicationId() { @@ -278,7 +281,7 @@ public String msixPackageApplicationId() { /** * Set the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @param msixPackageApplicationId the msixPackageApplicationId value to set. * @return the ApplicationPatchProperties object itself. */ @@ -289,7 +292,7 @@ public ApplicationPatchProperties withMsixPackageApplicationId(String msixPackag /** * Get the applicationType property: Resource Type of Application. - * + * * @return the applicationType value. */ public RemoteApplicationType applicationType() { @@ -298,7 +301,7 @@ public RemoteApplicationType applicationType() { /** * Set the applicationType property: Resource Type of Application. - * + * * @param applicationType the applicationType value to set. * @return the ApplicationPatchProperties object itself. */ @@ -309,7 +312,7 @@ public ApplicationPatchProperties withApplicationType(RemoteApplicationType appl /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationProperties.java index cb168d91b007..60b99f13f866 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 @@ -11,7 +11,9 @@ import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for Application properties. */ +/** + * Schema for Application properties. + */ @Fluent public final class ApplicationProperties { /* @@ -57,8 +59,7 @@ 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; @@ -99,13 +100,15 @@ public final class ApplicationProperties { @JsonProperty(value = "iconContent", access = JsonProperty.Access.WRITE_ONLY) private byte[] iconContent; - /** Creates an instance of ApplicationProperties class. */ + /** + * Creates an instance of ApplicationProperties class. + */ public ApplicationProperties() { } /** * Get the objectId property: ObjectId of Application. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -114,7 +117,7 @@ public String objectId() { /** * Get the description property: Description of Application. - * + * * @return the description value. */ public String description() { @@ -123,7 +126,7 @@ public String description() { /** * Set the description property: Description of Application. - * + * * @param description the description value to set. * @return the ApplicationProperties object itself. */ @@ -134,7 +137,7 @@ public ApplicationProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of Application. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -143,7 +146,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Application. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationProperties object itself. */ @@ -154,7 +157,7 @@ public ApplicationProperties withFriendlyName(String friendlyName) { /** * Get the filePath property: Specifies a path for the executable file for the application. - * + * * @return the filePath value. */ public String filePath() { @@ -163,7 +166,7 @@ public String filePath() { /** * Set the filePath property: Specifies a path for the executable file for the application. - * + * * @param filePath the filePath value to set. * @return the ApplicationProperties object itself. */ @@ -174,7 +177,7 @@ public ApplicationProperties withFilePath(String filePath) { /** * Get the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @return the msixPackageFamilyName value. */ public String msixPackageFamilyName() { @@ -183,7 +186,7 @@ public String msixPackageFamilyName() { /** * Set the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @param msixPackageFamilyName the msixPackageFamilyName value to set. * @return the ApplicationProperties object itself. */ @@ -194,7 +197,7 @@ public ApplicationProperties withMsixPackageFamilyName(String msixPackageFamilyN /** * Get the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @return the msixPackageApplicationId value. */ public String msixPackageApplicationId() { @@ -203,7 +206,7 @@ public String msixPackageApplicationId() { /** * Set the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @param msixPackageApplicationId the msixPackageApplicationId value to set. * @return the ApplicationProperties object itself. */ @@ -214,7 +217,7 @@ public ApplicationProperties withMsixPackageApplicationId(String msixPackageAppl /** * Get the applicationType property: Resource Type of Application. - * + * * @return the applicationType value. */ public RemoteApplicationType applicationType() { @@ -223,7 +226,7 @@ public RemoteApplicationType applicationType() { /** * Set the applicationType property: Resource Type of Application. - * + * * @param applicationType the applicationType value to set. * @return the ApplicationProperties object itself. */ @@ -236,7 +239,7 @@ public ApplicationProperties withApplicationType(RemoteApplicationType applicati * Get the commandLineSetting property: 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. - * + * * @return the commandLineSetting value. */ public CommandLineSetting commandLineSetting() { @@ -247,7 +250,7 @@ public CommandLineSetting commandLineSetting() { * Set the commandLineSetting property: 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. - * + * * @param commandLineSetting the commandLineSetting value to set. * @return the ApplicationProperties object itself. */ @@ -258,7 +261,7 @@ public ApplicationProperties withCommandLineSetting(CommandLineSetting commandLi /** * Get the commandLineArguments property: Command Line Arguments for Application. - * + * * @return the commandLineArguments value. */ public String commandLineArguments() { @@ -267,7 +270,7 @@ public String commandLineArguments() { /** * Set the commandLineArguments property: Command Line Arguments for Application. - * + * * @param commandLineArguments the commandLineArguments value to set. * @return the ApplicationProperties object itself. */ @@ -278,7 +281,7 @@ public ApplicationProperties withCommandLineArguments(String commandLineArgument /** * Get the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @return the showInPortal value. */ public Boolean showInPortal() { @@ -287,7 +290,7 @@ public Boolean showInPortal() { /** * Set the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @param showInPortal the showInPortal value to set. * @return the ApplicationProperties object itself. */ @@ -298,7 +301,7 @@ public ApplicationProperties withShowInPortal(Boolean showInPortal) { /** * Get the iconPath property: Path to icon. - * + * * @return the iconPath value. */ public String iconPath() { @@ -307,7 +310,7 @@ public String iconPath() { /** * Set the iconPath property: Path to icon. - * + * * @param iconPath the iconPath value to set. * @return the ApplicationProperties object itself. */ @@ -318,7 +321,7 @@ public ApplicationProperties withIconPath(String iconPath) { /** * Get the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ public Integer iconIndex() { @@ -327,7 +330,7 @@ public Integer iconIndex() { /** * Set the iconIndex property: Index of the icon. - * + * * @param iconIndex the iconIndex value to set. * @return the ApplicationProperties object itself. */ @@ -338,7 +341,7 @@ public ApplicationProperties withIconIndex(Integer iconIndex) { /** * Get the iconHash property: Hash of the icon. - * + * * @return the iconHash value. */ public String iconHash() { @@ -347,7 +350,7 @@ public String iconHash() { /** * Get the iconContent property: the icon a 64 bit string as a byte array. - * + * * @return the iconContent value. */ public byte[] iconContent() { @@ -356,15 +359,14 @@ public byte[] iconContent() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (commandLineSetting() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property commandLineSetting in model ApplicationProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property commandLineSetting in model ApplicationProperties")); } } 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 664d9527b2b6..1f1528223557 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 @@ -9,14 +9,12 @@ import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for Desktop properties. */ +/** + * Schema for Desktop properties. + */ @Fluent public final class DesktopInner extends ProxyResource { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; /* * Detailed properties for Desktop @@ -24,31 +22,39 @@ public final class DesktopInner extends ProxyResource { @JsonProperty(value = "properties") private DesktopProperties innerProperties; - /** Creates an instance of DesktopInner class. */ - public DesktopInner() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. + * Creates an instance of DesktopInner class. */ - public SystemData systemData() { - return this.systemData; + public DesktopInner() { } /** * Get the innerProperties property: Detailed properties for Desktop. - * + * * @return the innerProperties value. */ private DesktopProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the objectId property: ObjectId of Desktop. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -57,7 +63,7 @@ public String objectId() { /** * Get the description property: Description of Desktop. - * + * * @return the description value. */ public String description() { @@ -66,7 +72,7 @@ public String description() { /** * Set the description property: Description of Desktop. - * + * * @param description the description value to set. * @return the DesktopInner object itself. */ @@ -80,7 +86,7 @@ public DesktopInner withDescription(String description) { /** * Get the friendlyName property: Friendly name of Desktop. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -89,7 +95,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Desktop. - * + * * @param friendlyName the friendlyName value to set. * @return the DesktopInner object itself. */ @@ -103,7 +109,7 @@ public DesktopInner withFriendlyName(String friendlyName) { /** * Get the iconHash property: Hash of the icon. - * + * * @return the iconHash value. */ public String iconHash() { @@ -112,16 +118,16 @@ public String iconHash() { /** * Get the iconContent property: The icon a 64 bit string as a byte array. - * + * * @return the iconContent value. */ public byte[] iconContent() { - return this.innerProperties() == null ? new byte[0] : this.innerProperties().iconContent(); + return this.innerProperties() == null ? EMPTY_BYTE_ARRAY : this.innerProperties().iconContent(); } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopPatchProperties.java index 5b2861930ca8..97b7a426fea7 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Desktop properties that can be patched. */ +/** + * Desktop properties that can be patched. + */ @Fluent public final class DesktopPatchProperties { /* @@ -22,13 +24,15 @@ public final class DesktopPatchProperties { @JsonProperty(value = "friendlyName") private String friendlyName; - /** Creates an instance of DesktopPatchProperties class. */ + /** + * Creates an instance of DesktopPatchProperties class. + */ public DesktopPatchProperties() { } /** * Get the description property: Description of Desktop. - * + * * @return the description value. */ public String description() { @@ -37,7 +41,7 @@ public String description() { /** * Set the description property: Description of Desktop. - * + * * @param description the description value to set. * @return the DesktopPatchProperties object itself. */ @@ -48,7 +52,7 @@ public DesktopPatchProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of Desktop. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -57,7 +61,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Desktop. - * + * * @param friendlyName the friendlyName value to set. * @return the DesktopPatchProperties object itself. */ @@ -68,7 +72,7 @@ public DesktopPatchProperties withFriendlyName(String friendlyName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/DesktopProperties.java index de310b145b67..d59bb85151c4 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 @@ -8,7 +8,9 @@ import com.azure.core.util.CoreUtils; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for Desktop properties. */ +/** + * Schema for Desktop properties. + */ @Fluent public final class DesktopProperties { /* @@ -41,13 +43,15 @@ public final class DesktopProperties { @JsonProperty(value = "iconContent", access = JsonProperty.Access.WRITE_ONLY) private byte[] iconContent; - /** Creates an instance of DesktopProperties class. */ + /** + * Creates an instance of DesktopProperties class. + */ public DesktopProperties() { } /** * Get the objectId property: ObjectId of Desktop. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -56,7 +60,7 @@ public String objectId() { /** * Get the description property: Description of Desktop. - * + * * @return the description value. */ public String description() { @@ -65,7 +69,7 @@ public String description() { /** * Set the description property: Description of Desktop. - * + * * @param description the description value to set. * @return the DesktopProperties object itself. */ @@ -76,7 +80,7 @@ public DesktopProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of Desktop. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -85,7 +89,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Desktop. - * + * * @param friendlyName the friendlyName value to set. * @return the DesktopProperties object itself. */ @@ -96,7 +100,7 @@ public DesktopProperties withFriendlyName(String friendlyName) { /** * Get the iconHash property: Hash of the icon. - * + * * @return the iconHash value. */ public String iconHash() { @@ -105,7 +109,7 @@ public String iconHash() { /** * Get the iconContent property: The icon a 64 bit string as a byte array. - * + * * @return the iconContent value. */ public byte[] iconContent() { @@ -114,7 +118,7 @@ public byte[] iconContent() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ExpandMsixImageInner.java index b58ac6261582..7bc66d22796a 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 @@ -6,13 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -/** Represents the definition of contents retrieved after expanding the MSIX Image. */ +/** + * Represents the definition of contents retrieved after expanding the MSIX Image. + */ @Fluent public final class ExpandMsixImageInner extends ProxyResource { /* @@ -21,22 +24,39 @@ public final class ExpandMsixImageInner extends ProxyResource { @JsonProperty(value = "properties") private ExpandMsixImageProperties innerProperties; - /** Creates an instance of ExpandMsixImageInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ExpandMsixImageInner class. + */ public ExpandMsixImageInner() { } /** * Get the innerProperties property: Detailed properties for ExpandMsixImage. - * + * * @return the innerProperties value. */ private ExpandMsixImageProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the packageAlias property: Alias of MSIX Package. - * + * * @return the packageAlias value. */ public String packageAlias() { @@ -45,7 +65,7 @@ public String packageAlias() { /** * Set the packageAlias property: Alias of MSIX Package. - * + * * @param packageAlias the packageAlias value to set. * @return the ExpandMsixImageInner object itself. */ @@ -59,7 +79,7 @@ public ExpandMsixImageInner withPackageAlias(String packageAlias) { /** * Get the imagePath property: VHD/CIM image path on Network Share. - * + * * @return the imagePath value. */ public String imagePath() { @@ -68,7 +88,7 @@ public String imagePath() { /** * Set the imagePath property: VHD/CIM image path on Network Share. - * + * * @param imagePath the imagePath value to set. * @return the ExpandMsixImageInner object itself. */ @@ -82,7 +102,7 @@ public ExpandMsixImageInner withImagePath(String imagePath) { /** * Get the packageName property: Package Name from appxmanifest.xml. - * + * * @return the packageName value. */ public String packageName() { @@ -91,7 +111,7 @@ public String packageName() { /** * Set the packageName property: Package Name from appxmanifest.xml. - * + * * @param packageName the packageName value to set. * @return the ExpandMsixImageInner object itself. */ @@ -106,7 +126,7 @@ public ExpandMsixImageInner withPackageName(String packageName) { /** * Get the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @return the packageFamilyName value. */ public String packageFamilyName() { @@ -116,7 +136,7 @@ public String packageFamilyName() { /** * Set the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @param packageFamilyName the packageFamilyName value to set. * @return the ExpandMsixImageInner object itself. */ @@ -130,7 +150,7 @@ public ExpandMsixImageInner withPackageFamilyName(String packageFamilyName) { /** * Get the packageFullName property: Package Full Name from appxmanifest.xml. - * + * * @return the packageFullName value. */ public String packageFullName() { @@ -139,7 +159,7 @@ public String packageFullName() { /** * Set the packageFullName property: Package Full Name from appxmanifest.xml. - * + * * @param packageFullName the packageFullName value to set. * @return the ExpandMsixImageInner object itself. */ @@ -153,7 +173,7 @@ public ExpandMsixImageInner withPackageFullName(String packageFullName) { /** * Get the displayName property: User friendly Name to be displayed in the portal. - * + * * @return the displayName value. */ public String displayName() { @@ -162,7 +182,7 @@ public String displayName() { /** * Set the displayName property: User friendly Name to be displayed in the portal. - * + * * @param displayName the displayName value to set. * @return the ExpandMsixImageInner object itself. */ @@ -176,7 +196,7 @@ public ExpandMsixImageInner withDisplayName(String displayName) { /** * Get the packageRelativePath property: Relative Path to the package inside the image. - * + * * @return the packageRelativePath value. */ public String packageRelativePath() { @@ -185,7 +205,7 @@ public String packageRelativePath() { /** * Set the packageRelativePath property: Relative Path to the package inside the image. - * + * * @param packageRelativePath the packageRelativePath value to set. * @return the ExpandMsixImageInner object itself. */ @@ -199,7 +219,7 @@ public ExpandMsixImageInner withPackageRelativePath(String packageRelativePath) /** * Get the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @return the isRegularRegistration value. */ public Boolean isRegularRegistration() { @@ -208,7 +228,7 @@ public Boolean isRegularRegistration() { /** * Set the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @param isRegularRegistration the isRegularRegistration value to set. * @return the ExpandMsixImageInner object itself. */ @@ -222,7 +242,7 @@ public ExpandMsixImageInner withIsRegularRegistration(Boolean isRegularRegistrat /** * Get the isActive property: Make this version of the package the active one across the hostpool. - * + * * @return the isActive value. */ public Boolean isActive() { @@ -231,7 +251,7 @@ public Boolean isActive() { /** * Set the isActive property: Make this version of the package the active one across the hostpool. - * + * * @param isActive the isActive value to set. * @return the ExpandMsixImageInner object itself. */ @@ -245,7 +265,7 @@ public ExpandMsixImageInner withIsActive(Boolean isActive) { /** * Get the packageDependencies property: List of package dependencies. - * + * * @return the packageDependencies value. */ public List packageDependencies() { @@ -254,7 +274,7 @@ public List packageDependencies() { /** * Set the packageDependencies property: List of package dependencies. - * + * * @param packageDependencies the packageDependencies value to set. * @return the ExpandMsixImageInner object itself. */ @@ -267,8 +287,8 @@ public ExpandMsixImageInner withPackageDependencies(List packageApplications() { @@ -323,7 +343,7 @@ public List packageApplications() { /** * Set the packageApplications property: List of package applications. - * + * * @param packageApplications the packageApplications value to set. * @return the ExpandMsixImageInner object itself. */ @@ -335,9 +355,55 @@ public ExpandMsixImageInner withPackageApplications(List packageDependencies; /* - * Package Version found in the appxmanifest.xml. + * Package version found in the appxmanifest.xml. */ @JsonProperty(value = "version") private String version; /* - * Date Package was last updated, found in the appxmanifest.xml. + * Date Package was last updated, found in the appxmanifest.xml. */ @JsonProperty(value = "lastUpdated") private OffsetDateTime lastUpdated; /* - * List of package applications. + * List of package applications. */ @JsonProperty(value = "packageApplications") private List packageApplications; - /** Creates an instance of ExpandMsixImageProperties class. */ + /* + * Certificate name found in the appxmanifest.xml. + */ + @JsonProperty(value = "certificateName") + private String certificateName; + + /* + * Date certificate expires, found in the appxmanifest.xml. + */ + @JsonProperty(value = "certificateExpiry") + private OffsetDateTime certificateExpiry; + + /** + * Creates an instance of ExpandMsixImageProperties class. + */ public ExpandMsixImageProperties() { } /** * Get the packageAlias property: Alias of MSIX Package. - * + * * @return the packageAlias value. */ public String packageAlias() { @@ -107,7 +123,7 @@ public String packageAlias() { /** * Set the packageAlias property: Alias of MSIX Package. - * + * * @param packageAlias the packageAlias value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -118,7 +134,7 @@ public ExpandMsixImageProperties withPackageAlias(String packageAlias) { /** * Get the imagePath property: VHD/CIM image path on Network Share. - * + * * @return the imagePath value. */ public String imagePath() { @@ -127,7 +143,7 @@ public String imagePath() { /** * Set the imagePath property: VHD/CIM image path on Network Share. - * + * * @param imagePath the imagePath value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -138,7 +154,7 @@ public ExpandMsixImageProperties withImagePath(String imagePath) { /** * Get the packageName property: Package Name from appxmanifest.xml. - * + * * @return the packageName value. */ public String packageName() { @@ -147,7 +163,7 @@ public String packageName() { /** * Set the packageName property: Package Name from appxmanifest.xml. - * + * * @param packageName the packageName value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -159,7 +175,7 @@ public ExpandMsixImageProperties withPackageName(String packageName) { /** * Get the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @return the packageFamilyName value. */ public String packageFamilyName() { @@ -169,7 +185,7 @@ public String packageFamilyName() { /** * Set the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @param packageFamilyName the packageFamilyName value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -180,7 +196,7 @@ public ExpandMsixImageProperties withPackageFamilyName(String packageFamilyName) /** * Get the packageFullName property: Package Full Name from appxmanifest.xml. - * + * * @return the packageFullName value. */ public String packageFullName() { @@ -189,7 +205,7 @@ public String packageFullName() { /** * Set the packageFullName property: Package Full Name from appxmanifest.xml. - * + * * @param packageFullName the packageFullName value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -200,7 +216,7 @@ public ExpandMsixImageProperties withPackageFullName(String packageFullName) { /** * Get the displayName property: User friendly Name to be displayed in the portal. - * + * * @return the displayName value. */ public String displayName() { @@ -209,7 +225,7 @@ public String displayName() { /** * Set the displayName property: User friendly Name to be displayed in the portal. - * + * * @param displayName the displayName value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -220,7 +236,7 @@ public ExpandMsixImageProperties withDisplayName(String displayName) { /** * Get the packageRelativePath property: Relative Path to the package inside the image. - * + * * @return the packageRelativePath value. */ public String packageRelativePath() { @@ -229,7 +245,7 @@ public String packageRelativePath() { /** * Set the packageRelativePath property: Relative Path to the package inside the image. - * + * * @param packageRelativePath the packageRelativePath value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -240,7 +256,7 @@ public ExpandMsixImageProperties withPackageRelativePath(String packageRelativeP /** * Get the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @return the isRegularRegistration value. */ public Boolean isRegularRegistration() { @@ -249,7 +265,7 @@ public Boolean isRegularRegistration() { /** * Set the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @param isRegularRegistration the isRegularRegistration value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -260,7 +276,7 @@ public ExpandMsixImageProperties withIsRegularRegistration(Boolean isRegularRegi /** * Get the isActive property: Make this version of the package the active one across the hostpool. - * + * * @return the isActive value. */ public Boolean isActive() { @@ -269,7 +285,7 @@ public Boolean isActive() { /** * Set the isActive property: Make this version of the package the active one across the hostpool. - * + * * @param isActive the isActive value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -280,7 +296,7 @@ public ExpandMsixImageProperties withIsActive(Boolean isActive) { /** * Get the packageDependencies property: List of package dependencies. - * + * * @return the packageDependencies value. */ public List packageDependencies() { @@ -289,7 +305,7 @@ public List packageDependencies() { /** * Set the packageDependencies property: List of package dependencies. - * + * * @param packageDependencies the packageDependencies value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -299,8 +315,8 @@ public ExpandMsixImageProperties withPackageDependencies(List packageApplications() { @@ -349,7 +365,7 @@ public List packageApplications() { /** * Set the packageApplications property: List of package applications. - * + * * @param packageApplications the packageApplications value to set. * @return the ExpandMsixImageProperties object itself. */ @@ -358,9 +374,49 @@ public ExpandMsixImageProperties withPackageApplications(List tags) { super.withTags(tags); @@ -111,7 +113,7 @@ public HostPoolInner withTags(Map tags) { /** * Get the objectId property: ObjectId of HostPool. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -120,7 +122,7 @@ public String objectId() { /** * Get the friendlyName property: Friendly name of HostPool. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -129,7 +131,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of HostPool. - * + * * @param friendlyName the friendlyName value to set. * @return the HostPoolInner object itself. */ @@ -143,7 +145,7 @@ public HostPoolInner withFriendlyName(String friendlyName) { /** * Get the description property: Description of HostPool. - * + * * @return the description value. */ public String description() { @@ -152,7 +154,7 @@ public String description() { /** * Set the description property: Description of HostPool. - * + * * @param description the description value to set. * @return the HostPoolInner object itself. */ @@ -166,7 +168,7 @@ public HostPoolInner withDescription(String description) { /** * Get the hostPoolType property: HostPool type for desktop. - * + * * @return the hostPoolType value. */ public HostPoolType hostPoolType() { @@ -175,7 +177,7 @@ public HostPoolType hostPoolType() { /** * Set the hostPoolType property: HostPool type for desktop. - * + * * @param hostPoolType the hostPoolType value to set. * @return the HostPoolInner object itself. */ @@ -189,7 +191,7 @@ public HostPoolInner withHostPoolType(HostPoolType hostPoolType) { /** * Get the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @return the personalDesktopAssignmentType value. */ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { @@ -198,12 +200,12 @@ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { /** * Set the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @param personalDesktopAssignmentType the personalDesktopAssignmentType value to set. * @return the HostPoolInner object itself. */ - public HostPoolInner withPersonalDesktopAssignmentType( - PersonalDesktopAssignmentType personalDesktopAssignmentType) { + public HostPoolInner + withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType) { if (this.innerProperties() == null) { this.innerProperties = new HostPoolPropertiesInner(); } @@ -213,7 +215,7 @@ public HostPoolInner withPersonalDesktopAssignmentType( /** * Get the customRdpProperty property: Custom rdp property of HostPool. - * + * * @return the customRdpProperty value. */ public String customRdpProperty() { @@ -222,7 +224,7 @@ public String customRdpProperty() { /** * Set the customRdpProperty property: Custom rdp property of HostPool. - * + * * @param customRdpProperty the customRdpProperty value to set. * @return the HostPoolInner object itself. */ @@ -236,7 +238,7 @@ public HostPoolInner withCustomRdpProperty(String customRdpProperty) { /** * Get the maxSessionLimit property: The max session limit of HostPool. - * + * * @return the maxSessionLimit value. */ public Integer maxSessionLimit() { @@ -245,7 +247,7 @@ public Integer maxSessionLimit() { /** * Set the maxSessionLimit property: The max session limit of HostPool. - * + * * @param maxSessionLimit the maxSessionLimit value to set. * @return the HostPoolInner object itself. */ @@ -259,7 +261,7 @@ public HostPoolInner withMaxSessionLimit(Integer maxSessionLimit) { /** * Get the loadBalancerType property: The type of the load balancer. - * + * * @return the loadBalancerType value. */ public LoadBalancerType loadBalancerType() { @@ -268,7 +270,7 @@ public LoadBalancerType loadBalancerType() { /** * Set the loadBalancerType property: The type of the load balancer. - * + * * @param loadBalancerType the loadBalancerType value to set. * @return the HostPoolInner object itself. */ @@ -282,7 +284,7 @@ public HostPoolInner withLoadBalancerType(LoadBalancerType loadBalancerType) { /** * Get the ring property: The ring number of HostPool. - * + * * @return the ring value. */ public Integer ring() { @@ -291,7 +293,7 @@ public Integer ring() { /** * Set the ring property: The ring number of HostPool. - * + * * @param ring the ring value to set. * @return the HostPoolInner object itself. */ @@ -305,7 +307,7 @@ public HostPoolInner withRing(Integer ring) { /** * Get the validationEnvironment property: Is validation environment. - * + * * @return the validationEnvironment value. */ public Boolean validationEnvironment() { @@ -314,7 +316,7 @@ public Boolean validationEnvironment() { /** * Set the validationEnvironment property: Is validation environment. - * + * * @param validationEnvironment the validationEnvironment value to set. * @return the HostPoolInner object itself. */ @@ -328,7 +330,7 @@ public HostPoolInner withValidationEnvironment(Boolean validationEnvironment) { /** * Get the registrationInfo property: The registration info of HostPool. - * + * * @return the registrationInfo value. */ public RegistrationInfoInner registrationInfo() { @@ -337,7 +339,7 @@ public RegistrationInfoInner registrationInfo() { /** * Set the registrationInfo property: The registration info of HostPool. - * + * * @param registrationInfo the registrationInfo value to set. * @return the HostPoolInner object itself. */ @@ -351,7 +353,7 @@ public HostPoolInner withRegistrationInfo(RegistrationInfoInner registrationInfo /** * Get the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @return the vmTemplate value. */ public String vmTemplate() { @@ -360,7 +362,7 @@ public String vmTemplate() { /** * Set the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @param vmTemplate the vmTemplate value to set. * @return the HostPoolInner object itself. */ @@ -374,16 +376,25 @@ public HostPoolInner withVmTemplate(String vmTemplate) { /** * Get the applicationGroupReferences property: List of applicationGroup links. - * + * * @return the applicationGroupReferences value. */ public List applicationGroupReferences() { return this.innerProperties() == null ? null : this.innerProperties().applicationGroupReferences(); } + /** + * Get the appAttachPackageReferences property: List of App Attach Package links. + * + * @return the appAttachPackageReferences value. + */ + public List appAttachPackageReferences() { + return this.innerProperties() == null ? null : this.innerProperties().appAttachPackageReferences(); + } + /** * Get the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @return the ssoadfsAuthority value. */ public String ssoadfsAuthority() { @@ -392,7 +403,7 @@ public String ssoadfsAuthority() { /** * Set the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @param ssoadfsAuthority the ssoadfsAuthority value to set. * @return the HostPoolInner object itself. */ @@ -406,7 +417,7 @@ public HostPoolInner withSsoadfsAuthority(String ssoadfsAuthority) { /** * Get the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @return the ssoClientId value. */ public String ssoClientId() { @@ -415,7 +426,7 @@ public String ssoClientId() { /** * Set the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @param ssoClientId the ssoClientId value to set. * @return the HostPoolInner object itself. */ @@ -430,7 +441,7 @@ public HostPoolInner withSsoClientId(String ssoClientId) { /** * Get the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @return the ssoClientSecretKeyVaultPath value. */ public String ssoClientSecretKeyVaultPath() { @@ -440,7 +451,7 @@ public String ssoClientSecretKeyVaultPath() { /** * Set the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @param ssoClientSecretKeyVaultPath the ssoClientSecretKeyVaultPath value to set. * @return the HostPoolInner object itself. */ @@ -454,7 +465,7 @@ public HostPoolInner withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVa /** * Get the ssoSecretType property: The type of single sign on Secret Type. - * + * * @return the ssoSecretType value. */ public SsoSecretType ssoSecretType() { @@ -463,7 +474,7 @@ public SsoSecretType ssoSecretType() { /** * Set the ssoSecretType property: The type of single sign on Secret Type. - * + * * @param ssoSecretType the ssoSecretType value to set. * @return the HostPoolInner object itself. */ @@ -478,7 +489,7 @@ public HostPoolInner withSsoSecretType(SsoSecretType ssoSecretType) { /** * Get the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @return the preferredAppGroupType value. */ public PreferredAppGroupType preferredAppGroupType() { @@ -488,7 +499,7 @@ public PreferredAppGroupType preferredAppGroupType() { /** * Set the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @param preferredAppGroupType the preferredAppGroupType value to set. * @return the HostPoolInner object itself. */ @@ -502,7 +513,7 @@ public HostPoolInner withPreferredAppGroupType(PreferredAppGroupType preferredAp /** * Get the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @return the startVMOnConnect value. */ public Boolean startVMOnConnect() { @@ -511,7 +522,7 @@ public Boolean startVMOnConnect() { /** * Set the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @param startVMOnConnect the startVMOnConnect value to set. * @return the HostPoolInner object itself. */ @@ -525,7 +536,7 @@ public HostPoolInner withStartVMOnConnect(Boolean startVMOnConnect) { /** * Get the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ public Boolean cloudPcResource() { @@ -535,7 +546,7 @@ public Boolean cloudPcResource() { /** * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @return the publicNetworkAccess value. */ public HostpoolPublicNetworkAccess publicNetworkAccess() { @@ -545,7 +556,7 @@ public HostpoolPublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolInner object itself. */ @@ -560,7 +571,7 @@ public HostPoolInner withPublicNetworkAccess(HostpoolPublicNetworkAccess publicN /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. - * + * * @return the agentUpdate value. */ public AgentUpdateProperties agentUpdate() { @@ -570,7 +581,7 @@ public AgentUpdateProperties 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. */ @@ -585,7 +596,7 @@ public HostPoolInner withAgentUpdate(AgentUpdateProperties agentUpdate) { /** * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified * resource. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -594,16 +605,15 @@ public List privateEndpointConnections() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property innerProperties in model HostPoolInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property innerProperties in model HostPoolInner")); } else { innerProperties().validate(); } 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 69441f3879f7..d04166ac51da 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 @@ -14,7 +14,9 @@ import com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of HostPool. */ +/** + * Properties of HostPool. + */ @Fluent public final class HostPoolPatchProperties { /* @@ -125,13 +127,15 @@ public final class HostPoolPatchProperties { @JsonProperty(value = "agentUpdate") private AgentUpdatePatchProperties agentUpdate; - /** Creates an instance of HostPoolPatchProperties class. */ + /** + * Creates an instance of HostPoolPatchProperties class. + */ public HostPoolPatchProperties() { } /** * Get the friendlyName property: Friendly name of HostPool. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -140,7 +144,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of HostPool. - * + * * @param friendlyName the friendlyName value to set. * @return the HostPoolPatchProperties object itself. */ @@ -151,7 +155,7 @@ public HostPoolPatchProperties withFriendlyName(String friendlyName) { /** * Get the description property: Description of HostPool. - * + * * @return the description value. */ public String description() { @@ -160,7 +164,7 @@ public String description() { /** * Set the description property: Description of HostPool. - * + * * @param description the description value to set. * @return the HostPoolPatchProperties object itself. */ @@ -171,7 +175,7 @@ public HostPoolPatchProperties withDescription(String description) { /** * Get the customRdpProperty property: Custom rdp property of HostPool. - * + * * @return the customRdpProperty value. */ public String customRdpProperty() { @@ -180,7 +184,7 @@ public String customRdpProperty() { /** * Set the customRdpProperty property: Custom rdp property of HostPool. - * + * * @param customRdpProperty the customRdpProperty value to set. * @return the HostPoolPatchProperties object itself. */ @@ -191,7 +195,7 @@ public HostPoolPatchProperties withCustomRdpProperty(String customRdpProperty) { /** * Get the maxSessionLimit property: The max session limit of HostPool. - * + * * @return the maxSessionLimit value. */ public Integer maxSessionLimit() { @@ -200,7 +204,7 @@ public Integer maxSessionLimit() { /** * Set the maxSessionLimit property: The max session limit of HostPool. - * + * * @param maxSessionLimit the maxSessionLimit value to set. * @return the HostPoolPatchProperties object itself. */ @@ -211,7 +215,7 @@ public HostPoolPatchProperties withMaxSessionLimit(Integer maxSessionLimit) { /** * Get the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @return the personalDesktopAssignmentType value. */ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { @@ -220,19 +224,19 @@ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { /** * Set the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @param personalDesktopAssignmentType the personalDesktopAssignmentType value to set. * @return the HostPoolPatchProperties object itself. */ - public HostPoolPatchProperties withPersonalDesktopAssignmentType( - PersonalDesktopAssignmentType personalDesktopAssignmentType) { + public HostPoolPatchProperties + withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType) { this.personalDesktopAssignmentType = personalDesktopAssignmentType; return this; } /** * Get the loadBalancerType property: The type of the load balancer. - * + * * @return the loadBalancerType value. */ public LoadBalancerType loadBalancerType() { @@ -241,7 +245,7 @@ public LoadBalancerType loadBalancerType() { /** * Set the loadBalancerType property: The type of the load balancer. - * + * * @param loadBalancerType the loadBalancerType value to set. * @return the HostPoolPatchProperties object itself. */ @@ -252,7 +256,7 @@ public HostPoolPatchProperties withLoadBalancerType(LoadBalancerType loadBalance /** * Get the ring property: The ring number of HostPool. - * + * * @return the ring value. */ public Integer ring() { @@ -261,7 +265,7 @@ public Integer ring() { /** * Set the ring property: The ring number of HostPool. - * + * * @param ring the ring value to set. * @return the HostPoolPatchProperties object itself. */ @@ -272,7 +276,7 @@ public HostPoolPatchProperties withRing(Integer ring) { /** * Get the validationEnvironment property: Is validation environment. - * + * * @return the validationEnvironment value. */ public Boolean validationEnvironment() { @@ -281,7 +285,7 @@ public Boolean validationEnvironment() { /** * Set the validationEnvironment property: Is validation environment. - * + * * @param validationEnvironment the validationEnvironment value to set. * @return the HostPoolPatchProperties object itself. */ @@ -292,7 +296,7 @@ public HostPoolPatchProperties withValidationEnvironment(Boolean validationEnvir /** * Get the registrationInfo property: The registration info of HostPool. - * + * * @return the registrationInfo value. */ public RegistrationInfoPatch registrationInfo() { @@ -301,7 +305,7 @@ public RegistrationInfoPatch registrationInfo() { /** * Set the registrationInfo property: The registration info of HostPool. - * + * * @param registrationInfo the registrationInfo value to set. * @return the HostPoolPatchProperties object itself. */ @@ -312,7 +316,7 @@ public HostPoolPatchProperties withRegistrationInfo(RegistrationInfoPatch regist /** * Get the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @return the vmTemplate value. */ public String vmTemplate() { @@ -321,7 +325,7 @@ public String vmTemplate() { /** * Set the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @param vmTemplate the vmTemplate value to set. * @return the HostPoolPatchProperties object itself. */ @@ -332,7 +336,7 @@ public HostPoolPatchProperties withVmTemplate(String vmTemplate) { /** * Get the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @return the ssoadfsAuthority value. */ public String ssoadfsAuthority() { @@ -341,7 +345,7 @@ public String ssoadfsAuthority() { /** * Set the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @param ssoadfsAuthority the ssoadfsAuthority value to set. * @return the HostPoolPatchProperties object itself. */ @@ -352,7 +356,7 @@ public HostPoolPatchProperties withSsoadfsAuthority(String ssoadfsAuthority) { /** * Get the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @return the ssoClientId value. */ public String ssoClientId() { @@ -361,7 +365,7 @@ public String ssoClientId() { /** * Set the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @param ssoClientId the ssoClientId value to set. * @return the HostPoolPatchProperties object itself. */ @@ -373,7 +377,7 @@ public HostPoolPatchProperties withSsoClientId(String ssoClientId) { /** * Get the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @return the ssoClientSecretKeyVaultPath value. */ public String ssoClientSecretKeyVaultPath() { @@ -383,7 +387,7 @@ public String ssoClientSecretKeyVaultPath() { /** * Set the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @param ssoClientSecretKeyVaultPath the ssoClientSecretKeyVaultPath value to set. * @return the HostPoolPatchProperties object itself. */ @@ -394,7 +398,7 @@ public HostPoolPatchProperties withSsoClientSecretKeyVaultPath(String ssoClientS /** * Get the ssoSecretType property: The type of single sign on Secret Type. - * + * * @return the ssoSecretType value. */ public SsoSecretType ssoSecretType() { @@ -403,7 +407,7 @@ public SsoSecretType ssoSecretType() { /** * Set the ssoSecretType property: The type of single sign on Secret Type. - * + * * @param ssoSecretType the ssoSecretType value to set. * @return the HostPoolPatchProperties object itself. */ @@ -415,7 +419,7 @@ public HostPoolPatchProperties withSsoSecretType(SsoSecretType ssoSecretType) { /** * Get the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @return the preferredAppGroupType value. */ public PreferredAppGroupType preferredAppGroupType() { @@ -425,7 +429,7 @@ public PreferredAppGroupType preferredAppGroupType() { /** * Set the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @param preferredAppGroupType the preferredAppGroupType value to set. * @return the HostPoolPatchProperties object itself. */ @@ -436,7 +440,7 @@ public HostPoolPatchProperties withPreferredAppGroupType(PreferredAppGroupType p /** * Get the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @return the startVMOnConnect value. */ public Boolean startVMOnConnect() { @@ -445,7 +449,7 @@ public Boolean startVMOnConnect() { /** * Set the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @param startVMOnConnect the startVMOnConnect value to set. * @return the HostPoolPatchProperties object itself. */ @@ -456,7 +460,7 @@ public HostPoolPatchProperties withStartVMOnConnect(Boolean startVMOnConnect) { /** * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @return the publicNetworkAccess value. */ public HostpoolPublicNetworkAccess publicNetworkAccess() { @@ -465,7 +469,7 @@ public HostpoolPublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolPatchProperties object itself. */ @@ -477,7 +481,7 @@ public HostPoolPatchProperties withPublicNetworkAccess(HostpoolPublicNetworkAcce /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. - * + * * @return the agentUpdate value. */ public AgentUpdatePatchProperties agentUpdate() { @@ -487,7 +491,7 @@ public AgentUpdatePatchProperties 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. */ @@ -498,7 +502,7 @@ public HostPoolPatchProperties withAgentUpdate(AgentUpdatePatchProperties agentU /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java index 1c5a76f63204..58b470067a6e 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 @@ -7,8 +7,8 @@ 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.HostPoolType; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; @@ -17,7 +17,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of HostPool. */ +/** + * Properties of HostPool. + */ @Fluent public final class HostPoolPropertiesInner { /* @@ -98,6 +100,12 @@ public final class HostPoolPropertiesInner { @JsonProperty(value = "applicationGroupReferences", access = JsonProperty.Access.WRITE_ONLY) private List applicationGroupReferences; + /* + * List of App Attach Package links. + */ + @JsonProperty(value = "appAttachPackageReferences", access = JsonProperty.Access.WRITE_ONLY) + private List appAttachPackageReferences; + /* * URL to customer ADFS server for signing WVD SSO certificates. */ @@ -141,8 +149,7 @@ 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 HostpoolPublicNetworkAccess publicNetworkAccess; @@ -159,13 +166,15 @@ public final class HostPoolPropertiesInner { @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; - /** Creates an instance of HostPoolPropertiesInner class. */ + /** + * Creates an instance of HostPoolPropertiesInner class. + */ public HostPoolPropertiesInner() { } /** * Get the objectId property: ObjectId of HostPool. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -174,7 +183,7 @@ public String objectId() { /** * Get the friendlyName property: Friendly name of HostPool. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -183,7 +192,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of HostPool. - * + * * @param friendlyName the friendlyName value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -194,7 +203,7 @@ public HostPoolPropertiesInner withFriendlyName(String friendlyName) { /** * Get the description property: Description of HostPool. - * + * * @return the description value. */ public String description() { @@ -203,7 +212,7 @@ public String description() { /** * Set the description property: Description of HostPool. - * + * * @param description the description value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -214,7 +223,7 @@ public HostPoolPropertiesInner withDescription(String description) { /** * Get the hostPoolType property: HostPool type for desktop. - * + * * @return the hostPoolType value. */ public HostPoolType hostPoolType() { @@ -223,7 +232,7 @@ public HostPoolType hostPoolType() { /** * Set the hostPoolType property: HostPool type for desktop. - * + * * @param hostPoolType the hostPoolType value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -234,7 +243,7 @@ public HostPoolPropertiesInner withHostPoolType(HostPoolType hostPoolType) { /** * Get the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @return the personalDesktopAssignmentType value. */ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { @@ -243,19 +252,19 @@ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { /** * Set the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @param personalDesktopAssignmentType the personalDesktopAssignmentType value to set. * @return the HostPoolPropertiesInner object itself. */ - public HostPoolPropertiesInner withPersonalDesktopAssignmentType( - PersonalDesktopAssignmentType personalDesktopAssignmentType) { + public HostPoolPropertiesInner + withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType) { this.personalDesktopAssignmentType = personalDesktopAssignmentType; return this; } /** * Get the customRdpProperty property: Custom rdp property of HostPool. - * + * * @return the customRdpProperty value. */ public String customRdpProperty() { @@ -264,7 +273,7 @@ public String customRdpProperty() { /** * Set the customRdpProperty property: Custom rdp property of HostPool. - * + * * @param customRdpProperty the customRdpProperty value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -275,7 +284,7 @@ public HostPoolPropertiesInner withCustomRdpProperty(String customRdpProperty) { /** * Get the maxSessionLimit property: The max session limit of HostPool. - * + * * @return the maxSessionLimit value. */ public Integer maxSessionLimit() { @@ -284,7 +293,7 @@ public Integer maxSessionLimit() { /** * Set the maxSessionLimit property: The max session limit of HostPool. - * + * * @param maxSessionLimit the maxSessionLimit value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -295,7 +304,7 @@ public HostPoolPropertiesInner withMaxSessionLimit(Integer maxSessionLimit) { /** * Get the loadBalancerType property: The type of the load balancer. - * + * * @return the loadBalancerType value. */ public LoadBalancerType loadBalancerType() { @@ -304,7 +313,7 @@ public LoadBalancerType loadBalancerType() { /** * Set the loadBalancerType property: The type of the load balancer. - * + * * @param loadBalancerType the loadBalancerType value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -315,7 +324,7 @@ public HostPoolPropertiesInner withLoadBalancerType(LoadBalancerType loadBalance /** * Get the ring property: The ring number of HostPool. - * + * * @return the ring value. */ public Integer ring() { @@ -324,7 +333,7 @@ public Integer ring() { /** * Set the ring property: The ring number of HostPool. - * + * * @param ring the ring value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -335,7 +344,7 @@ public HostPoolPropertiesInner withRing(Integer ring) { /** * Get the validationEnvironment property: Is validation environment. - * + * * @return the validationEnvironment value. */ public Boolean validationEnvironment() { @@ -344,7 +353,7 @@ public Boolean validationEnvironment() { /** * Set the validationEnvironment property: Is validation environment. - * + * * @param validationEnvironment the validationEnvironment value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -355,7 +364,7 @@ public HostPoolPropertiesInner withValidationEnvironment(Boolean validationEnvir /** * Get the registrationInfo property: The registration info of HostPool. - * + * * @return the registrationInfo value. */ public RegistrationInfoInner registrationInfo() { @@ -364,7 +373,7 @@ public RegistrationInfoInner registrationInfo() { /** * Set the registrationInfo property: The registration info of HostPool. - * + * * @param registrationInfo the registrationInfo value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -375,7 +384,7 @@ public HostPoolPropertiesInner withRegistrationInfo(RegistrationInfoInner regist /** * Get the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @return the vmTemplate value. */ public String vmTemplate() { @@ -384,7 +393,7 @@ public String vmTemplate() { /** * Set the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @param vmTemplate the vmTemplate value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -395,16 +404,25 @@ public HostPoolPropertiesInner withVmTemplate(String vmTemplate) { /** * Get the applicationGroupReferences property: List of applicationGroup links. - * + * * @return the applicationGroupReferences value. */ public List applicationGroupReferences() { return this.applicationGroupReferences; } + /** + * Get the appAttachPackageReferences property: List of App Attach Package links. + * + * @return the appAttachPackageReferences value. + */ + public List appAttachPackageReferences() { + return this.appAttachPackageReferences; + } + /** * Get the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @return the ssoadfsAuthority value. */ public String ssoadfsAuthority() { @@ -413,7 +431,7 @@ public String ssoadfsAuthority() { /** * Set the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @param ssoadfsAuthority the ssoadfsAuthority value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -424,7 +442,7 @@ public HostPoolPropertiesInner withSsoadfsAuthority(String ssoadfsAuthority) { /** * Get the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @return the ssoClientId value. */ public String ssoClientId() { @@ -433,7 +451,7 @@ public String ssoClientId() { /** * Set the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @param ssoClientId the ssoClientId value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -445,7 +463,7 @@ public HostPoolPropertiesInner withSsoClientId(String ssoClientId) { /** * Get the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @return the ssoClientSecretKeyVaultPath value. */ public String ssoClientSecretKeyVaultPath() { @@ -455,7 +473,7 @@ public String ssoClientSecretKeyVaultPath() { /** * Set the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @param ssoClientSecretKeyVaultPath the ssoClientSecretKeyVaultPath value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -466,7 +484,7 @@ public HostPoolPropertiesInner withSsoClientSecretKeyVaultPath(String ssoClientS /** * Get the ssoSecretType property: The type of single sign on Secret Type. - * + * * @return the ssoSecretType value. */ public SsoSecretType ssoSecretType() { @@ -475,7 +493,7 @@ public SsoSecretType ssoSecretType() { /** * Set the ssoSecretType property: The type of single sign on Secret Type. - * + * * @param ssoSecretType the ssoSecretType value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -487,7 +505,7 @@ public HostPoolPropertiesInner withSsoSecretType(SsoSecretType ssoSecretType) { /** * Get the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @return the preferredAppGroupType value. */ public PreferredAppGroupType preferredAppGroupType() { @@ -497,7 +515,7 @@ public PreferredAppGroupType preferredAppGroupType() { /** * Set the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @param preferredAppGroupType the preferredAppGroupType value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -508,7 +526,7 @@ public HostPoolPropertiesInner withPreferredAppGroupType(PreferredAppGroupType p /** * Get the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @return the startVMOnConnect value. */ public Boolean startVMOnConnect() { @@ -517,7 +535,7 @@ public Boolean startVMOnConnect() { /** * Set the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @param startVMOnConnect the startVMOnConnect value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -528,7 +546,7 @@ public HostPoolPropertiesInner withStartVMOnConnect(Boolean startVMOnConnect) { /** * Get the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ public Boolean cloudPcResource() { @@ -538,7 +556,7 @@ public Boolean cloudPcResource() { /** * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @return the publicNetworkAccess value. */ public HostpoolPublicNetworkAccess publicNetworkAccess() { @@ -548,7 +566,7 @@ public HostpoolPublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolPropertiesInner object itself. */ @@ -560,7 +578,7 @@ public HostPoolPropertiesInner withPublicNetworkAccess(HostpoolPublicNetworkAcce /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. - * + * * @return the agentUpdate value. */ public AgentUpdateProperties agentUpdate() { @@ -570,7 +588,7 @@ public AgentUpdateProperties 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. */ @@ -582,7 +600,7 @@ public HostPoolPropertiesInner withAgentUpdate(AgentUpdateProperties agentUpdate /** * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified * resource. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -591,30 +609,27 @@ public List privateEndpointConnections() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (hostPoolType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property hostPoolType in model HostPoolPropertiesInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property hostPoolType in model HostPoolPropertiesInner")); } if (loadBalancerType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property loadBalancerType in model HostPoolPropertiesInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property loadBalancerType in model HostPoolPropertiesInner")); } if (registrationInfo() != null) { registrationInfo().validate(); } if (preferredAppGroupType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property preferredAppGroupType in model HostPoolPropertiesInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property preferredAppGroupType in model HostPoolPropertiesInner")); } if (agentUpdate() != null) { agentUpdate().validate(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageInner.java index 8c5bc71f9980..2ff9e5bad6c4 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 @@ -14,46 +14,50 @@ import java.time.OffsetDateTime; import java.util.List; -/** Schema for MSIX Package properties. */ +/** + * Schema for MSIX Package properties. + */ @Fluent public final class MsixPackageInner 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 MSIX Package */ @JsonProperty(value = "properties", required = true) private MsixPackageProperties innerProperties = new MsixPackageProperties(); - /** Creates an instance of MsixPackageInner class. */ - public MsixPackageInner() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. + * Creates an instance of MsixPackageInner class. */ - public SystemData systemData() { - return this.systemData; + public MsixPackageInner() { } /** * Get the innerProperties property: Detailed properties for MSIX Package. - * + * * @return the innerProperties value. */ private MsixPackageProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the imagePath property: VHD/CIM image path on Network Share. - * + * * @return the imagePath value. */ public String imagePath() { @@ -62,7 +66,7 @@ public String imagePath() { /** * Set the imagePath property: VHD/CIM image path on Network Share. - * + * * @param imagePath the imagePath value to set. * @return the MsixPackageInner object itself. */ @@ -76,7 +80,7 @@ public MsixPackageInner withImagePath(String imagePath) { /** * Get the packageName property: Package Name from appxmanifest.xml. - * + * * @return the packageName value. */ public String packageName() { @@ -85,7 +89,7 @@ public String packageName() { /** * Set the packageName property: Package Name from appxmanifest.xml. - * + * * @param packageName the packageName value to set. * @return the MsixPackageInner object itself. */ @@ -100,7 +104,7 @@ public MsixPackageInner withPackageName(String packageName) { /** * Get the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @return the packageFamilyName value. */ public String packageFamilyName() { @@ -110,7 +114,7 @@ public String packageFamilyName() { /** * Set the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @param packageFamilyName the packageFamilyName value to set. * @return the MsixPackageInner object itself. */ @@ -124,7 +128,7 @@ public MsixPackageInner withPackageFamilyName(String packageFamilyName) { /** * Get the displayName property: User friendly Name to be displayed in the portal. - * + * * @return the displayName value. */ public String displayName() { @@ -133,7 +137,7 @@ public String displayName() { /** * Set the displayName property: User friendly Name to be displayed in the portal. - * + * * @param displayName the displayName value to set. * @return the MsixPackageInner object itself. */ @@ -147,7 +151,7 @@ public MsixPackageInner withDisplayName(String displayName) { /** * Get the packageRelativePath property: Relative Path to the package inside the image. - * + * * @return the packageRelativePath value. */ public String packageRelativePath() { @@ -156,7 +160,7 @@ public String packageRelativePath() { /** * Set the packageRelativePath property: Relative Path to the package inside the image. - * + * * @param packageRelativePath the packageRelativePath value to set. * @return the MsixPackageInner object itself. */ @@ -170,7 +174,7 @@ public MsixPackageInner withPackageRelativePath(String packageRelativePath) { /** * Get the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @return the isRegularRegistration value. */ public Boolean isRegularRegistration() { @@ -179,7 +183,7 @@ public Boolean isRegularRegistration() { /** * Set the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @param isRegularRegistration the isRegularRegistration value to set. * @return the MsixPackageInner object itself. */ @@ -193,7 +197,7 @@ public MsixPackageInner withIsRegularRegistration(Boolean isRegularRegistration) /** * Get the isActive property: Make this version of the package the active one across the hostpool. - * + * * @return the isActive value. */ public Boolean isActive() { @@ -202,7 +206,7 @@ public Boolean isActive() { /** * Set the isActive property: Make this version of the package the active one across the hostpool. - * + * * @param isActive the isActive value to set. * @return the MsixPackageInner object itself. */ @@ -216,7 +220,7 @@ public MsixPackageInner withIsActive(Boolean isActive) { /** * Get the packageDependencies property: List of package dependencies. - * + * * @return the packageDependencies value. */ public List packageDependencies() { @@ -225,7 +229,7 @@ public List packageDependencies() { /** * Set the packageDependencies property: List of package dependencies. - * + * * @param packageDependencies the packageDependencies value to set. * @return the MsixPackageInner object itself. */ @@ -238,8 +242,8 @@ public MsixPackageInner withPackageDependencies(List pa } /** - * Get the version property: Package Version found in the appxmanifest.xml. - * + * Get the version property: Package version found in the appxmanifest.xml. + * * @return the version value. */ public String version() { @@ -247,8 +251,8 @@ public String version() { } /** - * Set the version property: Package Version found in the appxmanifest.xml. - * + * Set the version property: Package version found in the appxmanifest.xml. + * * @param version the version value to set. * @return the MsixPackageInner object itself. */ @@ -262,7 +266,7 @@ public MsixPackageInner withVersion(String version) { /** * Get the lastUpdated property: Date Package was last updated, found in the appxmanifest.xml. - * + * * @return the lastUpdated value. */ public OffsetDateTime lastUpdated() { @@ -271,7 +275,7 @@ public OffsetDateTime lastUpdated() { /** * Set the lastUpdated property: Date Package was last updated, found in the appxmanifest.xml. - * + * * @param lastUpdated the lastUpdated value to set. * @return the MsixPackageInner object itself. */ @@ -285,7 +289,7 @@ public MsixPackageInner withLastUpdated(OffsetDateTime lastUpdated) { /** * Get the packageApplications property: List of package applications. - * + * * @return the packageApplications value. */ public List packageApplications() { @@ -294,7 +298,7 @@ public List packageApplications() { /** * Set the packageApplications property: List of package applications. - * + * * @param packageApplications the packageApplications value to set. * @return the MsixPackageInner object itself. */ @@ -308,15 +312,14 @@ public MsixPackageInner withPackageApplications(List pa /** * 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 MsixPackageInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model MsixPackageInner")); } else { innerProperties().validate(); } 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 accc572ba392..20f89f9513f8 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 @@ -7,11 +7,13 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** MSIX Package properties that can be patched. */ +/** + * MSIX Package properties that can be patched. + */ @Fluent public final class MsixPackagePatchProperties { /* - * Set a version of the package to be active across hostpool. + * Set a version of the package to be active across hostpool. */ @JsonProperty(value = "isActive") private Boolean isActive; @@ -28,13 +30,15 @@ public final class MsixPackagePatchProperties { @JsonProperty(value = "displayName") private String displayName; - /** Creates an instance of MsixPackagePatchProperties class. */ + /** + * Creates an instance of MsixPackagePatchProperties class. + */ public MsixPackagePatchProperties() { } /** * Get the isActive property: Set a version of the package to be active across hostpool. - * + * * @return the isActive value. */ public Boolean isActive() { @@ -43,7 +47,7 @@ public Boolean isActive() { /** * Set the isActive property: Set a version of the package to be active across hostpool. - * + * * @param isActive the isActive value to set. * @return the MsixPackagePatchProperties object itself. */ @@ -54,7 +58,7 @@ public MsixPackagePatchProperties withIsActive(Boolean isActive) { /** * Get the isRegularRegistration property: Set Registration mode. Regular or Delayed. - * + * * @return the isRegularRegistration value. */ public Boolean isRegularRegistration() { @@ -63,7 +67,7 @@ public Boolean isRegularRegistration() { /** * Set the isRegularRegistration property: Set Registration mode. Regular or Delayed. - * + * * @param isRegularRegistration the isRegularRegistration value to set. * @return the MsixPackagePatchProperties object itself. */ @@ -74,7 +78,7 @@ public MsixPackagePatchProperties withIsRegularRegistration(Boolean isRegularReg /** * Get the displayName property: Display name for MSIX Package. - * + * * @return the displayName value. */ public String displayName() { @@ -83,7 +87,7 @@ public String displayName() { /** * Set the displayName property: Display name for MSIX Package. - * + * * @param displayName the displayName value to set. * @return the MsixPackagePatchProperties object itself. */ @@ -94,7 +98,7 @@ public MsixPackagePatchProperties withDisplayName(String displayName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/MsixPackageProperties.java index 1ada5f495a17..507235d07868 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 @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Schema for MSIX Package properties. */ +/** + * Schema for MSIX Package properties. + */ @Fluent public final class MsixPackageProperties { /* @@ -21,25 +23,25 @@ public final class MsixPackageProperties { private String imagePath; /* - * Package Name from appxmanifest.xml. + * Package Name from appxmanifest.xml. */ @JsonProperty(value = "packageName") 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; /* - * User friendly Name to be displayed in the portal. + * User friendly Name to be displayed in the portal. */ @JsonProperty(value = "displayName") private String displayName; /* - * Relative Path to the package inside the image. + * Relative Path to the package inside the image. */ @JsonProperty(value = "packageRelativePath") private String packageRelativePath; @@ -51,42 +53,44 @@ public final class MsixPackageProperties { private Boolean isRegularRegistration; /* - * Make this version of the package the active one across the hostpool. + * Make this version of the package the active one across the hostpool. */ @JsonProperty(value = "isActive") private Boolean isActive; /* - * List of package dependencies. + * List of package dependencies. */ @JsonProperty(value = "packageDependencies") private List packageDependencies; /* - * Package Version found in the appxmanifest.xml. + * Package version found in the appxmanifest.xml. */ @JsonProperty(value = "version") private String version; /* - * Date Package was last updated, found in the appxmanifest.xml. + * Date Package was last updated, found in the appxmanifest.xml. */ @JsonProperty(value = "lastUpdated") private OffsetDateTime lastUpdated; /* - * List of package applications. + * List of package applications. */ @JsonProperty(value = "packageApplications") private List packageApplications; - /** Creates an instance of MsixPackageProperties class. */ + /** + * Creates an instance of MsixPackageProperties class. + */ public MsixPackageProperties() { } /** * Get the imagePath property: VHD/CIM image path on Network Share. - * + * * @return the imagePath value. */ public String imagePath() { @@ -95,7 +99,7 @@ public String imagePath() { /** * Set the imagePath property: VHD/CIM image path on Network Share. - * + * * @param imagePath the imagePath value to set. * @return the MsixPackageProperties object itself. */ @@ -106,7 +110,7 @@ public MsixPackageProperties withImagePath(String imagePath) { /** * Get the packageName property: Package Name from appxmanifest.xml. - * + * * @return the packageName value. */ public String packageName() { @@ -115,7 +119,7 @@ public String packageName() { /** * Set the packageName property: Package Name from appxmanifest.xml. - * + * * @param packageName the packageName value to set. * @return the MsixPackageProperties object itself. */ @@ -127,7 +131,7 @@ public MsixPackageProperties withPackageName(String packageName) { /** * Get the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @return the packageFamilyName value. */ public String packageFamilyName() { @@ -137,7 +141,7 @@ public String packageFamilyName() { /** * Set the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @param packageFamilyName the packageFamilyName value to set. * @return the MsixPackageProperties object itself. */ @@ -148,7 +152,7 @@ public MsixPackageProperties withPackageFamilyName(String packageFamilyName) { /** * Get the displayName property: User friendly Name to be displayed in the portal. - * + * * @return the displayName value. */ public String displayName() { @@ -157,7 +161,7 @@ public String displayName() { /** * Set the displayName property: User friendly Name to be displayed in the portal. - * + * * @param displayName the displayName value to set. * @return the MsixPackageProperties object itself. */ @@ -168,7 +172,7 @@ public MsixPackageProperties withDisplayName(String displayName) { /** * Get the packageRelativePath property: Relative Path to the package inside the image. - * + * * @return the packageRelativePath value. */ public String packageRelativePath() { @@ -177,7 +181,7 @@ public String packageRelativePath() { /** * Set the packageRelativePath property: Relative Path to the package inside the image. - * + * * @param packageRelativePath the packageRelativePath value to set. * @return the MsixPackageProperties object itself. */ @@ -188,7 +192,7 @@ public MsixPackageProperties withPackageRelativePath(String packageRelativePath) /** * Get the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @return the isRegularRegistration value. */ public Boolean isRegularRegistration() { @@ -197,7 +201,7 @@ public Boolean isRegularRegistration() { /** * Set the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @param isRegularRegistration the isRegularRegistration value to set. * @return the MsixPackageProperties object itself. */ @@ -208,7 +212,7 @@ public MsixPackageProperties withIsRegularRegistration(Boolean isRegularRegistra /** * Get the isActive property: Make this version of the package the active one across the hostpool. - * + * * @return the isActive value. */ public Boolean isActive() { @@ -217,7 +221,7 @@ public Boolean isActive() { /** * Set the isActive property: Make this version of the package the active one across the hostpool. - * + * * @param isActive the isActive value to set. * @return the MsixPackageProperties object itself. */ @@ -228,7 +232,7 @@ public MsixPackageProperties withIsActive(Boolean isActive) { /** * Get the packageDependencies property: List of package dependencies. - * + * * @return the packageDependencies value. */ public List packageDependencies() { @@ -237,7 +241,7 @@ public List packageDependencies() { /** * Set the packageDependencies property: List of package dependencies. - * + * * @param packageDependencies the packageDependencies value to set. * @return the MsixPackageProperties object itself. */ @@ -247,8 +251,8 @@ public MsixPackageProperties withPackageDependencies(List packageApplications() { @@ -297,7 +301,7 @@ public List packageApplications() { /** * Set the packageApplications property: List of package applications. - * + * * @param packageApplications the packageApplications value to set. * @return the MsixPackageProperties object itself. */ @@ -308,7 +312,7 @@ public MsixPackageProperties withPackageApplications(List groupIds; + + /* + * The private endpoint resource. */ @JsonProperty(value = "privateEndpoint") private PrivateEndpoint privateEndpoint; @@ -32,13 +41,24 @@ public final class PrivateEndpointConnectionProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private PrivateEndpointConnectionProvisioningState provisioningState; - /** Creates an instance of PrivateEndpointConnectionProperties class. */ + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ public PrivateEndpointConnectionProperties() { } /** - * Get the privateEndpoint property: The resource of private end point. - * + * Get the groupIds property: The group ids for the private endpoint resource. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Get the privateEndpoint property: The private endpoint resource. + * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { @@ -46,8 +66,8 @@ public PrivateEndpoint privateEndpoint() { } /** - * Set the privateEndpoint property: The resource of private end point. - * + * Set the privateEndpoint property: The private endpoint resource. + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnectionProperties object itself. */ @@ -59,7 +79,7 @@ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint p /** * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection * between service consumer and provider. - * + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -69,19 +89,19 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { /** * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection * between service consumer and provider. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnectionProperties object itself. */ - public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } /** * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { @@ -90,7 +110,7 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -98,11 +118,9 @@ public void validate() { privateEndpoint().validate(); } if (privateLinkServiceConnectionState() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model" - + " PrivateEndpointConnectionProperties")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); } else { privateLinkServiceConnectionState().validate(); } 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 625ff47548f1..0aad8ed7d2b7 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 @@ -5,52 +5,43 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonProperty; -/** The Private Endpoint Connection resource. */ +/** + * The Private Endpoint Connection resource. + */ @Fluent public final class PrivateEndpointConnectionWithSystemDataInner extends PrivateEndpointConnection { - /* - * Metadata pertaining to creation and last modification of the resource. + /** + * Creates an instance of PrivateEndpointConnectionWithSystemDataInner class. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of PrivateEndpointConnectionWithSystemDataInner class. */ public PrivateEndpointConnectionWithSystemDataInner() { } /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. + * {@inheritDoc} */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ @Override public PrivateEndpointConnectionWithSystemDataInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { super.withPrivateEndpoint(privateEndpoint); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override - public PrivateEndpointConnectionWithSystemDataInner withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnectionWithSystemDataInner + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { super.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 bcbcdafc61ba..496b9b116266 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 @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A private link resource. */ +/** + * A private link resource. + */ @Fluent public final class PrivateLinkResourceInner extends ProxyResource { /* @@ -18,22 +21,39 @@ public final class PrivateLinkResourceInner extends ProxyResource { @JsonProperty(value = "properties") private PrivateLinkResourceProperties innerProperties; - /** Creates an instance of PrivateLinkResourceInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PrivateLinkResourceInner class. + */ public PrivateLinkResourceInner() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private PrivateLinkResourceProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { @@ -42,7 +62,7 @@ public String groupId() { /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -51,7 +71,7 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -60,7 +80,7 @@ public List requiredZoneNames() { /** * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * * @param requiredZoneNames the requiredZoneNames value to set. * @return the PrivateLinkResourceInner object itself. */ @@ -74,7 +94,7 @@ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneN /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/PrivateLinkResourceProperties.java index c6b1b9b130d0..bd0e58925396 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a private link resource. */ +/** + * Properties of a private link resource. + */ @Fluent public final class PrivateLinkResourceProperties { /* @@ -29,13 +31,15 @@ public final class PrivateLinkResourceProperties { @JsonProperty(value = "requiredZoneNames") private List requiredZoneNames; - /** Creates an instance of PrivateLinkResourceProperties class. */ + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ public PrivateLinkResourceProperties() { } /** * Get the groupId property: The private link resource group id. - * + * * @return the groupId value. */ public String groupId() { @@ -44,7 +48,7 @@ public String groupId() { /** * Get the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ public List requiredMembers() { @@ -53,7 +57,7 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -62,7 +66,7 @@ public List requiredZoneNames() { /** * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * * @param requiredZoneNames the requiredZoneNames value to set. * @return the PrivateLinkResourceProperties object itself. */ @@ -73,7 +77,7 @@ public PrivateLinkResourceProperties withRequiredZoneNames(List required /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/RegistrationInfoInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/RegistrationInfoInner.java index 5f0231ddac67..63e1769a6117 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Represents a RegistrationInfo definition. */ +/** + * Represents a RegistrationInfo definition. + */ @Fluent public final class RegistrationInfoInner { /* @@ -30,13 +32,15 @@ public final class RegistrationInfoInner { @JsonProperty(value = "registrationTokenOperation") private RegistrationTokenOperation registrationTokenOperation; - /** Creates an instance of RegistrationInfoInner class. */ + /** + * Creates an instance of RegistrationInfoInner class. + */ public RegistrationInfoInner() { } /** * Get the expirationTime property: Expiration time of registration token. - * + * * @return the expirationTime value. */ public OffsetDateTime expirationTime() { @@ -45,7 +49,7 @@ public OffsetDateTime expirationTime() { /** * Set the expirationTime property: Expiration time of registration token. - * + * * @param expirationTime the expirationTime value to set. * @return the RegistrationInfoInner object itself. */ @@ -56,7 +60,7 @@ public RegistrationInfoInner withExpirationTime(OffsetDateTime expirationTime) { /** * Get the token property: The registration token base64 encoded string. - * + * * @return the token value. */ public String token() { @@ -65,7 +69,7 @@ public String token() { /** * Set the token property: The registration token base64 encoded string. - * + * * @param token the token value to set. * @return the RegistrationInfoInner object itself. */ @@ -76,7 +80,7 @@ public RegistrationInfoInner withToken(String token) { /** * Get the registrationTokenOperation property: The type of resetting the token. - * + * * @return the registrationTokenOperation value. */ public RegistrationTokenOperation registrationTokenOperation() { @@ -85,7 +89,7 @@ public RegistrationTokenOperation registrationTokenOperation() { /** * Set the registrationTokenOperation property: The type of resetting the token. - * + * * @param registrationTokenOperation the registrationTokenOperation value to set. * @return the RegistrationInfoInner object itself. */ @@ -96,7 +100,7 @@ public RegistrationInfoInner withRegistrationTokenOperation(RegistrationTokenOpe /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ResourceProviderOperationInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ResourceProviderOperationInner.java index a831f4453f31..76297ba64628 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 @@ -9,7 +9,9 @@ import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** Supported operation of this resource provider. */ +/** + * Supported operation of this resource provider. + */ @Fluent public final class ResourceProviderOperationInner { /* @@ -36,13 +38,15 @@ public final class ResourceProviderOperationInner { @JsonProperty(value = "properties") private OperationProperties properties; - /** Creates an instance of ResourceProviderOperationInner class. */ + /** + * Creates an instance of ResourceProviderOperationInner class. + */ public ResourceProviderOperationInner() { } /** * Get the name property: Operation name, in format of {provider}/{resource}/{operation}. - * + * * @return the name value. */ public String name() { @@ -51,7 +55,7 @@ public String name() { /** * Set the name property: Operation name, in format of {provider}/{resource}/{operation}. - * + * * @param name the name value to set. * @return the ResourceProviderOperationInner object itself. */ @@ -62,7 +66,7 @@ public ResourceProviderOperationInner withName(String name) { /** * Get the display property: Display metadata associated with the operation. - * + * * @return the display value. */ public ResourceProviderOperationDisplay display() { @@ -71,7 +75,7 @@ public ResourceProviderOperationDisplay display() { /** * Set the display property: Display metadata associated with the operation. - * + * * @param display the display value to set. * @return the ResourceProviderOperationInner object itself. */ @@ -82,7 +86,7 @@ public ResourceProviderOperationInner withDisplay(ResourceProviderOperationDispl /** * Get the isDataAction property: Is a data action. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -91,7 +95,7 @@ public Boolean isDataAction() { /** * Set the isDataAction property: Is a data action. - * + * * @param isDataAction the isDataAction value to set. * @return the ResourceProviderOperationInner object itself. */ @@ -102,7 +106,7 @@ public ResourceProviderOperationInner withIsDataAction(Boolean isDataAction) { /** * Get the properties property: Properties of the operation. - * + * * @return the properties value. */ public OperationProperties properties() { @@ -111,7 +115,7 @@ public OperationProperties properties() { /** * Set the properties property: Properties of the operation. - * + * * @param properties the properties value to set. * @return the ResourceProviderOperationInner object itself. */ @@ -122,7 +126,7 @@ public ResourceProviderOperationInner withProperties(OperationProperties propert /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanInner.java index 5d1edd7520cb..8d32fc41653a 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; 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; @@ -20,88 +19,89 @@ /** * ScalingPlan - * - *

Represents a scaling plan definition. + * + * Represents a scaling plan definition. */ @Fluent public final class ScalingPlanInner extends ResourceModelWithAllowedPropertySet { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Detailed properties for scaling plan. */ @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. - * - * @return the systemData value. + * Creates an instance of ScalingPlanInner class. */ - public SystemData systemData() { - return this.systemData; + public ScalingPlanInner() { } /** * Get the innerProperties property: Detailed properties for scaling plan. - * + * * @return the innerProperties value. */ private ScalingPlanProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScalingPlanInner withManagedBy(String managedBy) { super.withManagedBy(managedBy); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScalingPlanInner withKind(String kind) { super.withKind(kind); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScalingPlanInner withIdentity(ResourceModelWithAllowedPropertySetIdentity identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScalingPlanInner withSku(ResourceModelWithAllowedPropertySetSku sku) { super.withSku(sku); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScalingPlanInner withPlan(ResourceModelWithAllowedPropertySetPlan plan) { super.withPlan(plan); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScalingPlanInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ScalingPlanInner withTags(Map tags) { super.withTags(tags); @@ -110,7 +110,7 @@ public ScalingPlanInner withTags(Map tags) { /** * Get the objectId property: ObjectId of scaling plan. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -119,7 +119,7 @@ public String objectId() { /** * Get the description property: Description of scaling plan. - * + * * @return the description value. */ public String description() { @@ -128,7 +128,7 @@ public String description() { /** * Set the description property: Description of scaling plan. - * + * * @param description the description value to set. * @return the ScalingPlanInner object itself. */ @@ -142,7 +142,7 @@ public ScalingPlanInner withDescription(String description) { /** * Get the friendlyName property: User friendly name of scaling plan. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -151,7 +151,7 @@ public String friendlyName() { /** * Set the friendlyName property: User friendly name of scaling plan. - * + * * @param friendlyName the friendlyName value to set. * @return the ScalingPlanInner object itself. */ @@ -165,7 +165,7 @@ public ScalingPlanInner withFriendlyName(String friendlyName) { /** * Get the timeZone property: Timezone of the scaling plan. - * + * * @return the timeZone value. */ public String timeZone() { @@ -174,7 +174,7 @@ public String timeZone() { /** * Set the timeZone property: Timezone of the scaling plan. - * + * * @param timeZone the timeZone value to set. * @return the ScalingPlanInner object itself. */ @@ -188,7 +188,7 @@ public ScalingPlanInner withTimeZone(String timeZone) { /** * Get the hostPoolType property: HostPool type for desktop. - * + * * @return the hostPoolType value. */ public ScalingHostPoolType hostPoolType() { @@ -197,7 +197,7 @@ public ScalingHostPoolType hostPoolType() { /** * Set the hostPoolType property: HostPool type for desktop. - * + * * @param hostPoolType the hostPoolType value to set. * @return the ScalingPlanInner object itself. */ @@ -211,7 +211,7 @@ public ScalingPlanInner withHostPoolType(ScalingHostPoolType hostPoolType) { /** * Get the exclusionTag property: Exclusion tag for scaling plan. - * + * * @return the exclusionTag value. */ public String exclusionTag() { @@ -220,7 +220,7 @@ public String exclusionTag() { /** * Set the exclusionTag property: Exclusion tag for scaling plan. - * + * * @param exclusionTag the exclusionTag value to set. * @return the ScalingPlanInner object itself. */ @@ -234,7 +234,7 @@ public ScalingPlanInner withExclusionTag(String exclusionTag) { /** * Get the schedules property: List of ScalingPlanPooledSchedule definitions. - * + * * @return the schedules value. */ public List schedules() { @@ -243,7 +243,7 @@ public List schedules() { /** * Set the schedules property: List of ScalingPlanPooledSchedule definitions. - * + * * @param schedules the schedules value to set. * @return the ScalingPlanInner object itself. */ @@ -257,7 +257,7 @@ public ScalingPlanInner withSchedules(List schedules) { /** * Get the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @return the hostPoolReferences value. */ public List hostPoolReferences() { @@ -266,7 +266,7 @@ public List hostPoolReferences() { /** * Set the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @param hostPoolReferences the hostPoolReferences value to set. * @return the ScalingPlanInner object itself. */ @@ -280,17 +280,16 @@ public ScalingPlanInner withHostPoolReferences(List ho /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model ScalingPlanInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model ScalingPlanInner")); } else { innerProperties().validate(); } 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 f45e9b0364c2..38883aad6381 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Scaling plan properties. */ +/** + * Scaling plan properties. + */ @Fluent public final class ScalingPlanPatchProperties { /* @@ -49,13 +51,15 @@ public final class ScalingPlanPatchProperties { @JsonProperty(value = "hostPoolReferences") private List hostPoolReferences; - /** Creates an instance of ScalingPlanPatchProperties class. */ + /** + * Creates an instance of ScalingPlanPatchProperties class. + */ public ScalingPlanPatchProperties() { } /** * Get the description property: Description of scaling plan. - * + * * @return the description value. */ public String description() { @@ -64,7 +68,7 @@ public String description() { /** * Set the description property: Description of scaling plan. - * + * * @param description the description value to set. * @return the ScalingPlanPatchProperties object itself. */ @@ -75,7 +79,7 @@ public ScalingPlanPatchProperties withDescription(String description) { /** * Get the friendlyName property: User friendly name of scaling plan. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -84,7 +88,7 @@ public String friendlyName() { /** * Set the friendlyName property: User friendly name of scaling plan. - * + * * @param friendlyName the friendlyName value to set. * @return the ScalingPlanPatchProperties object itself. */ @@ -95,7 +99,7 @@ public ScalingPlanPatchProperties withFriendlyName(String friendlyName) { /** * Get the timeZone property: Timezone of the scaling plan. - * + * * @return the timeZone value. */ public String timeZone() { @@ -104,7 +108,7 @@ public String timeZone() { /** * Set the timeZone property: Timezone of the scaling plan. - * + * * @param timeZone the timeZone value to set. * @return the ScalingPlanPatchProperties object itself. */ @@ -115,7 +119,7 @@ public ScalingPlanPatchProperties withTimeZone(String timeZone) { /** * Get the exclusionTag property: Exclusion tag for scaling plan. - * + * * @return the exclusionTag value. */ public String exclusionTag() { @@ -124,7 +128,7 @@ public String exclusionTag() { /** * Set the exclusionTag property: Exclusion tag for scaling plan. - * + * * @param exclusionTag the exclusionTag value to set. * @return the ScalingPlanPatchProperties object itself. */ @@ -135,7 +139,7 @@ public ScalingPlanPatchProperties withExclusionTag(String exclusionTag) { /** * Get the schedules property: List of ScalingSchedule definitions. - * + * * @return the schedules value. */ public List schedules() { @@ -144,7 +148,7 @@ public List schedules() { /** * Set the schedules property: List of ScalingSchedule definitions. - * + * * @param schedules the schedules value to set. * @return the ScalingPlanPatchProperties object itself. */ @@ -155,7 +159,7 @@ public ScalingPlanPatchProperties withSchedules(List schedules) /** * Get the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @return the hostPoolReferences value. */ public List hostPoolReferences() { @@ -164,7 +168,7 @@ public List hostPoolReferences() { /** * Set the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @param hostPoolReferences the hostPoolReferences value to set. * @return the ScalingPlanPatchProperties object itself. */ @@ -175,7 +179,7 @@ public ScalingPlanPatchProperties withHostPoolReferences(List daysOfWeek() { @@ -64,7 +68,7 @@ public List daysOfWeek() { /** * Set the daysOfWeek property: Set of days of the week on which this schedule is active. - * + * * @param daysOfWeek the daysOfWeek value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -78,7 +82,7 @@ public ScalingPlanPersonalScheduleInner withDaysOfWeek(List daysOfWee /** * Get the rampUpStartTime property: Starting time for ramp up period. - * + * * @return the rampUpStartTime value. */ public Time rampUpStartTime() { @@ -87,7 +91,7 @@ public Time rampUpStartTime() { /** * Set the rampUpStartTime property: Starting time for ramp up period. - * + * * @param rampUpStartTime the rampUpStartTime value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -102,7 +106,7 @@ public ScalingPlanPersonalScheduleInner withRampUpStartTime(Time rampUpStartTime /** * Get the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in * the hostpool. - * + * * @return the rampUpAutoStartHosts value. */ public StartupBehavior rampUpAutoStartHosts() { @@ -112,7 +116,7 @@ public StartupBehavior rampUpAutoStartHosts() { /** * Set the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in * the hostpool. - * + * * @param rampUpAutoStartHosts the rampUpAutoStartHosts value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -128,7 +132,7 @@ public ScalingPlanPersonalScheduleInner withRampUpAutoStartHosts(StartupBehavior * Get the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning * them on manually. - * + * * @return the rampUpStartVMOnConnect value. */ public SetStartVMOnConnect rampUpStartVMOnConnect() { @@ -139,7 +143,7 @@ public SetStartVMOnConnect rampUpStartVMOnConnect() { * Set the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning * them on manually. - * + * * @param rampUpStartVMOnConnect the rampUpStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -153,7 +157,7 @@ public ScalingPlanPersonalScheduleInner withRampUpStartVMOnConnect(SetStartVMOnC /** * Get the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. - * + * * @return the rampUpActionOnDisconnect value. */ public SessionHandlingOperation rampUpActionOnDisconnect() { @@ -162,12 +166,12 @@ public SessionHandlingOperation rampUpActionOnDisconnect() { /** * Set the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. - * + * * @param rampUpActionOnDisconnect the rampUpActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withRampUpActionOnDisconnect( - SessionHandlingOperation rampUpActionOnDisconnect) { + public ScalingPlanPersonalScheduleInner + withRampUpActionOnDisconnect(SessionHandlingOperation rampUpActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -178,7 +182,7 @@ public ScalingPlanPersonalScheduleInner withRampUpActionOnDisconnect( /** * Get the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnDisconnect value. */ public Integer rampUpMinutesToWaitOnDisconnect() { @@ -188,12 +192,12 @@ public Integer rampUpMinutesToWaitOnDisconnect() { /** * Set the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp up period. - * + * * @param rampUpMinutesToWaitOnDisconnect the rampUpMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withRampUpMinutesToWaitOnDisconnect( - Integer rampUpMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleInner + withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -203,7 +207,7 @@ public ScalingPlanPersonalScheduleInner withRampUpMinutesToWaitOnDisconnect( /** * Get the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. - * + * * @return the rampUpActionOnLogoff value. */ public SessionHandlingOperation rampUpActionOnLogoff() { @@ -212,7 +216,7 @@ public SessionHandlingOperation rampUpActionOnLogoff() { /** * Set the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. - * + * * @param rampUpActionOnLogoff the rampUpActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -227,7 +231,7 @@ public ScalingPlanPersonalScheduleInner withRampUpActionOnLogoff(SessionHandling /** * Get the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnLogoff value. */ public Integer rampUpMinutesToWaitOnLogoff() { @@ -237,7 +241,7 @@ public Integer rampUpMinutesToWaitOnLogoff() { /** * Set the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp up period. - * + * * @param rampUpMinutesToWaitOnLogoff the rampUpMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -251,7 +255,7 @@ public ScalingPlanPersonalScheduleInner withRampUpMinutesToWaitOnLogoff(Integer /** * Get the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ public Time peakStartTime() { @@ -260,7 +264,7 @@ public Time peakStartTime() { /** * Set the peakStartTime property: Starting time for peak period. - * + * * @param peakStartTime the peakStartTime value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -275,7 +279,7 @@ public ScalingPlanPersonalScheduleInner withPeakStartTime(Time peakStartTime) { /** * Get the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the peak phase. - * + * * @return the peakStartVMOnConnect value. */ public SetStartVMOnConnect peakStartVMOnConnect() { @@ -285,7 +289,7 @@ public SetStartVMOnConnect peakStartVMOnConnect() { /** * Set the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the peak phase. - * + * * @param peakStartVMOnConnect the peakStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -299,7 +303,7 @@ public ScalingPlanPersonalScheduleInner withPeakStartVMOnConnect(SetStartVMOnCon /** * Get the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. - * + * * @return the peakActionOnDisconnect value. */ public SessionHandlingOperation peakActionOnDisconnect() { @@ -308,12 +312,12 @@ public SessionHandlingOperation peakActionOnDisconnect() { /** * Set the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. - * + * * @param peakActionOnDisconnect the peakActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withPeakActionOnDisconnect( - SessionHandlingOperation peakActionOnDisconnect) { + public ScalingPlanPersonalScheduleInner + withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -324,7 +328,7 @@ public ScalingPlanPersonalScheduleInner withPeakActionOnDisconnect( /** * Get the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session * handling action when a user disconnects during the peak period. - * + * * @return the peakMinutesToWaitOnDisconnect value. */ public Integer peakMinutesToWaitOnDisconnect() { @@ -334,7 +338,7 @@ public Integer peakMinutesToWaitOnDisconnect() { /** * Set the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session * handling action when a user disconnects during the peak period. - * + * * @param peakMinutesToWaitOnDisconnect the peakMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -348,7 +352,7 @@ public ScalingPlanPersonalScheduleInner withPeakMinutesToWaitOnDisconnect(Intege /** * Get the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. - * + * * @return the peakActionOnLogoff value. */ public SessionHandlingOperation peakActionOnLogoff() { @@ -357,7 +361,7 @@ public SessionHandlingOperation peakActionOnLogoff() { /** * Set the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. - * + * * @param peakActionOnLogoff the peakActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -372,7 +376,7 @@ public ScalingPlanPersonalScheduleInner withPeakActionOnLogoff(SessionHandlingOp /** * Get the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the peak period. - * + * * @return the peakMinutesToWaitOnLogoff value. */ public Integer peakMinutesToWaitOnLogoff() { @@ -382,7 +386,7 @@ public Integer peakMinutesToWaitOnLogoff() { /** * Set the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the peak period. - * + * * @param peakMinutesToWaitOnLogoff the peakMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -396,7 +400,7 @@ public ScalingPlanPersonalScheduleInner withPeakMinutesToWaitOnLogoff(Integer pe /** * Get the rampDownStartTime property: Starting time for ramp down period. - * + * * @return the rampDownStartTime value. */ public Time rampDownStartTime() { @@ -405,7 +409,7 @@ public Time rampDownStartTime() { /** * Set the rampDownStartTime property: Starting time for ramp down period. - * + * * @param rampDownStartTime the rampDownStartTime value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -420,7 +424,7 @@ public ScalingPlanPersonalScheduleInner withRampDownStartTime(Time rampDownStart /** * Get the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp down phase. - * + * * @return the rampDownStartVMOnConnect value. */ public SetStartVMOnConnect rampDownStartVMOnConnect() { @@ -430,7 +434,7 @@ public SetStartVMOnConnect rampDownStartVMOnConnect() { /** * Set the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp down phase. - * + * * @param rampDownStartVMOnConnect the rampDownStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -445,7 +449,7 @@ public ScalingPlanPersonalScheduleInner withRampDownStartVMOnConnect(SetStartVMO /** * Get the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down * period. - * + * * @return the rampDownActionOnDisconnect value. */ public SessionHandlingOperation rampDownActionOnDisconnect() { @@ -455,12 +459,12 @@ public SessionHandlingOperation rampDownActionOnDisconnect() { /** * Set the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down * period. - * + * * @param rampDownActionOnDisconnect the rampDownActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withRampDownActionOnDisconnect( - SessionHandlingOperation rampDownActionOnDisconnect) { + public ScalingPlanPersonalScheduleInner + withRampDownActionOnDisconnect(SessionHandlingOperation rampDownActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -471,7 +475,7 @@ public ScalingPlanPersonalScheduleInner withRampDownActionOnDisconnect( /** * Get the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnDisconnect value. */ public Integer rampDownMinutesToWaitOnDisconnect() { @@ -481,12 +485,12 @@ public Integer rampDownMinutesToWaitOnDisconnect() { /** * Set the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp down period. - * + * * @param rampDownMinutesToWaitOnDisconnect the rampDownMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withRampDownMinutesToWaitOnDisconnect( - Integer rampDownMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleInner + withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -496,7 +500,7 @@ public ScalingPlanPersonalScheduleInner withRampDownMinutesToWaitOnDisconnect( /** * Get the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. - * + * * @return the rampDownActionOnLogoff value. */ public SessionHandlingOperation rampDownActionOnLogoff() { @@ -505,12 +509,12 @@ public SessionHandlingOperation rampDownActionOnLogoff() { /** * Set the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. - * + * * @param rampDownActionOnLogoff the rampDownActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withRampDownActionOnLogoff( - SessionHandlingOperation rampDownActionOnLogoff) { + public ScalingPlanPersonalScheduleInner + withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -521,7 +525,7 @@ public ScalingPlanPersonalScheduleInner withRampDownActionOnLogoff( /** * Get the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnLogoff value. */ public Integer rampDownMinutesToWaitOnLogoff() { @@ -531,7 +535,7 @@ public Integer rampDownMinutesToWaitOnLogoff() { /** * Set the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp down period. - * + * * @param rampDownMinutesToWaitOnLogoff the rampDownMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -545,7 +549,7 @@ public ScalingPlanPersonalScheduleInner withRampDownMinutesToWaitOnLogoff(Intege /** * Get the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ public Time offPeakStartTime() { @@ -554,7 +558,7 @@ public Time offPeakStartTime() { /** * Set the offPeakStartTime property: Starting time for off-peak period. - * + * * @param offPeakStartTime the offPeakStartTime value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -569,7 +573,7 @@ public ScalingPlanPersonalScheduleInner withOffPeakStartTime(Time offPeakStartTi /** * Get the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the off-peak phase. - * + * * @return the offPeakStartVMOnConnect value. */ public SetStartVMOnConnect offPeakStartVMOnConnect() { @@ -579,7 +583,7 @@ public SetStartVMOnConnect offPeakStartVMOnConnect() { /** * Set the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the off-peak phase. - * + * * @param offPeakStartVMOnConnect the offPeakStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -594,7 +598,7 @@ public ScalingPlanPersonalScheduleInner withOffPeakStartVMOnConnect(SetStartVMOn /** * Get the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak * period. - * + * * @return the offPeakActionOnDisconnect value. */ public SessionHandlingOperation offPeakActionOnDisconnect() { @@ -604,12 +608,12 @@ public SessionHandlingOperation offPeakActionOnDisconnect() { /** * Set the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak * period. - * + * * @param offPeakActionOnDisconnect the offPeakActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withOffPeakActionOnDisconnect( - SessionHandlingOperation offPeakActionOnDisconnect) { + public ScalingPlanPersonalScheduleInner + withOffPeakActionOnDisconnect(SessionHandlingOperation offPeakActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -620,7 +624,7 @@ public ScalingPlanPersonalScheduleInner withOffPeakActionOnDisconnect( /** * Get the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnDisconnect value. */ public Integer offPeakMinutesToWaitOnDisconnect() { @@ -630,12 +634,12 @@ public Integer offPeakMinutesToWaitOnDisconnect() { /** * Set the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the off-peak period. - * + * * @param offPeakMinutesToWaitOnDisconnect the offPeakMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ - public ScalingPlanPersonalScheduleInner withOffPeakMinutesToWaitOnDisconnect( - Integer offPeakMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleInner + withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -645,7 +649,7 @@ public ScalingPlanPersonalScheduleInner withOffPeakMinutesToWaitOnDisconnect( /** * Get the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. - * + * * @return the offPeakActionOnLogoff value. */ public SessionHandlingOperation offPeakActionOnLogoff() { @@ -654,7 +658,7 @@ public SessionHandlingOperation offPeakActionOnLogoff() { /** * Set the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. - * + * * @param offPeakActionOnLogoff the offPeakActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -669,7 +673,7 @@ public ScalingPlanPersonalScheduleInner withOffPeakActionOnLogoff(SessionHandlin /** * Get the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnLogoff value. */ public Integer offPeakMinutesToWaitOnLogoff() { @@ -679,7 +683,7 @@ public Integer offPeakMinutesToWaitOnLogoff() { /** * Set the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the off-peak period. - * + * * @param offPeakMinutesToWaitOnLogoff the offPeakMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleInner object itself. */ @@ -693,15 +697,14 @@ public ScalingPlanPersonalScheduleInner withOffPeakMinutesToWaitOnLogoff(Integer /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model ScalingPlanPersonalScheduleInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model ScalingPlanPersonalScheduleInner")); } else { innerProperties().validate(); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java index ef7679fe3be0..bec5a10d8a3b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanPersonalScheduleProperties.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A ScalingPlanPersonalSchedule. */ +/** + * A ScalingPlanPersonalSchedule. + */ @Fluent public final class ScalingPlanPersonalScheduleProperties { /* @@ -35,8 +37,7 @@ public final class ScalingPlanPersonalScheduleProperties { private StartupBehavior rampUpAutoStartHosts; /* - * The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, - * session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. + * The desired configuration of Start VM On Connect for the hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. */ @JsonProperty(value = "rampUpStartVMOnConnect") private SetStartVMOnConnect rampUpStartVMOnConnect; @@ -48,8 +49,7 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation rampUpActionOnDisconnect; /* - * The time in minutes to wait before performing the desired session handling action when a user disconnects during - * the ramp up period. + * The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp up period. */ @JsonProperty(value = "rampUpMinutesToWaitOnDisconnect") private Integer rampUpMinutesToWaitOnDisconnect; @@ -61,8 +61,7 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation rampUpActionOnLogoff; /* - * The time in minutes to wait before performing the desired session handling action when a user logs off during - * the ramp up period. + * The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp up period. */ @JsonProperty(value = "rampUpMinutesToWaitOnLogoff") private Integer rampUpMinutesToWaitOnLogoff; @@ -86,8 +85,7 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation peakActionOnDisconnect; /* - * The time in minutes to wait before performing the desired session handling action when a user disconnects during - * the peak period. + * The time in minutes to wait before performing the desired session handling action when a user disconnects during the peak period. */ @JsonProperty(value = "peakMinutesToWaitOnDisconnect") private Integer peakMinutesToWaitOnDisconnect; @@ -99,8 +97,7 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation peakActionOnLogoff; /* - * The time in minutes to wait before performing the desired session handling action when a user logs off during - * the peak period. + * The time in minutes to wait before performing the desired session handling action when a user logs off during the peak period. */ @JsonProperty(value = "peakMinutesToWaitOnLogoff") private Integer peakMinutesToWaitOnLogoff; @@ -124,8 +121,7 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation rampDownActionOnDisconnect; /* - * The time in minutes to wait before performing the desired session handling action when a user disconnects during - * the ramp down period. + * The time in minutes to wait before performing the desired session handling action when a user disconnects during the ramp down period. */ @JsonProperty(value = "rampDownMinutesToWaitOnDisconnect") private Integer rampDownMinutesToWaitOnDisconnect; @@ -137,8 +133,7 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation rampDownActionOnLogoff; /* - * The time in minutes to wait before performing the desired session handling action when a user logs off during - * the ramp down period. + * The time in minutes to wait before performing the desired session handling action when a user logs off during the ramp down period. */ @JsonProperty(value = "rampDownMinutesToWaitOnLogoff") private Integer rampDownMinutesToWaitOnLogoff; @@ -162,8 +157,7 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation offPeakActionOnDisconnect; /* - * The time in minutes to wait before performing the desired session handling action when a user disconnects during - * the off-peak period. + * The time in minutes to wait before performing the desired session handling action when a user disconnects during the off-peak period. */ @JsonProperty(value = "offPeakMinutesToWaitOnDisconnect") private Integer offPeakMinutesToWaitOnDisconnect; @@ -175,19 +169,20 @@ public final class ScalingPlanPersonalScheduleProperties { private SessionHandlingOperation offPeakActionOnLogoff; /* - * The time in minutes to wait before performing the desired session handling action when a user logs off during - * the off-peak period. + * The time in minutes to wait before performing the desired session handling action when a user logs off during the off-peak period. */ @JsonProperty(value = "offPeakMinutesToWaitOnLogoff") private Integer offPeakMinutesToWaitOnLogoff; - /** Creates an instance of ScalingPlanPersonalScheduleProperties class. */ + /** + * Creates an instance of ScalingPlanPersonalScheduleProperties class. + */ public ScalingPlanPersonalScheduleProperties() { } /** * Get the daysOfWeek property: Set of days of the week on which this schedule is active. - * + * * @return the daysOfWeek value. */ public List daysOfWeek() { @@ -196,7 +191,7 @@ public List daysOfWeek() { /** * Set the daysOfWeek property: Set of days of the week on which this schedule is active. - * + * * @param daysOfWeek the daysOfWeek value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -207,7 +202,7 @@ public ScalingPlanPersonalScheduleProperties withDaysOfWeek(List days /** * Get the rampUpStartTime property: Starting time for ramp up period. - * + * * @return the rampUpStartTime value. */ public Time rampUpStartTime() { @@ -216,7 +211,7 @@ public Time rampUpStartTime() { /** * Set the rampUpStartTime property: Starting time for ramp up period. - * + * * @param rampUpStartTime the rampUpStartTime value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -228,7 +223,7 @@ public ScalingPlanPersonalScheduleProperties withRampUpStartTime(Time rampUpStar /** * Get the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in * the hostpool. - * + * * @return the rampUpAutoStartHosts value. */ public StartupBehavior rampUpAutoStartHosts() { @@ -238,7 +233,7 @@ public StartupBehavior rampUpAutoStartHosts() { /** * Set the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in * the hostpool. - * + * * @param rampUpAutoStartHosts the rampUpAutoStartHosts value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -251,7 +246,7 @@ public ScalingPlanPersonalScheduleProperties withRampUpAutoStartHosts(StartupBeh * Get the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning * them on manually. - * + * * @return the rampUpStartVMOnConnect value. */ public SetStartVMOnConnect rampUpStartVMOnConnect() { @@ -262,19 +257,19 @@ public SetStartVMOnConnect rampUpStartVMOnConnect() { * Set the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning * them on manually. - * + * * @param rampUpStartVMOnConnect the rampUpStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampUpStartVMOnConnect( - SetStartVMOnConnect rampUpStartVMOnConnect) { + public ScalingPlanPersonalScheduleProperties + withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect) { this.rampUpStartVMOnConnect = rampUpStartVMOnConnect; return this; } /** * Get the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. - * + * * @return the rampUpActionOnDisconnect value. */ public SessionHandlingOperation rampUpActionOnDisconnect() { @@ -283,12 +278,12 @@ public SessionHandlingOperation rampUpActionOnDisconnect() { /** * Set the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. - * + * * @param rampUpActionOnDisconnect the rampUpActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampUpActionOnDisconnect( - SessionHandlingOperation rampUpActionOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withRampUpActionOnDisconnect(SessionHandlingOperation rampUpActionOnDisconnect) { this.rampUpActionOnDisconnect = rampUpActionOnDisconnect; return this; } @@ -296,7 +291,7 @@ public ScalingPlanPersonalScheduleProperties withRampUpActionOnDisconnect( /** * Get the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnDisconnect value. */ public Integer rampUpMinutesToWaitOnDisconnect() { @@ -306,19 +301,19 @@ public Integer rampUpMinutesToWaitOnDisconnect() { /** * Set the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp up period. - * + * * @param rampUpMinutesToWaitOnDisconnect the rampUpMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampUpMinutesToWaitOnDisconnect( - Integer rampUpMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect) { this.rampUpMinutesToWaitOnDisconnect = rampUpMinutesToWaitOnDisconnect; return this; } /** * Get the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. - * + * * @return the rampUpActionOnLogoff value. */ public SessionHandlingOperation rampUpActionOnLogoff() { @@ -327,12 +322,12 @@ public SessionHandlingOperation rampUpActionOnLogoff() { /** * Set the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. - * + * * @param rampUpActionOnLogoff the rampUpActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampUpActionOnLogoff( - SessionHandlingOperation rampUpActionOnLogoff) { + public ScalingPlanPersonalScheduleProperties + withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff) { this.rampUpActionOnLogoff = rampUpActionOnLogoff; return this; } @@ -340,7 +335,7 @@ public ScalingPlanPersonalScheduleProperties withRampUpActionOnLogoff( /** * Get the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnLogoff value. */ public Integer rampUpMinutesToWaitOnLogoff() { @@ -350,7 +345,7 @@ public Integer rampUpMinutesToWaitOnLogoff() { /** * Set the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp up period. - * + * * @param rampUpMinutesToWaitOnLogoff the rampUpMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -361,7 +356,7 @@ public ScalingPlanPersonalScheduleProperties withRampUpMinutesToWaitOnLogoff(Int /** * Get the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ public Time peakStartTime() { @@ -370,7 +365,7 @@ public Time peakStartTime() { /** * Set the peakStartTime property: Starting time for peak period. - * + * * @param peakStartTime the peakStartTime value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -382,7 +377,7 @@ public ScalingPlanPersonalScheduleProperties withPeakStartTime(Time peakStartTim /** * Get the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the peak phase. - * + * * @return the peakStartVMOnConnect value. */ public SetStartVMOnConnect peakStartVMOnConnect() { @@ -392,7 +387,7 @@ public SetStartVMOnConnect peakStartVMOnConnect() { /** * Set the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the peak phase. - * + * * @param peakStartVMOnConnect the peakStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -403,7 +398,7 @@ public ScalingPlanPersonalScheduleProperties withPeakStartVMOnConnect(SetStartVM /** * Get the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. - * + * * @return the peakActionOnDisconnect value. */ public SessionHandlingOperation peakActionOnDisconnect() { @@ -412,12 +407,12 @@ public SessionHandlingOperation peakActionOnDisconnect() { /** * Set the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. - * + * * @param peakActionOnDisconnect the peakActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withPeakActionOnDisconnect( - SessionHandlingOperation peakActionOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect) { this.peakActionOnDisconnect = peakActionOnDisconnect; return this; } @@ -425,7 +420,7 @@ public ScalingPlanPersonalScheduleProperties withPeakActionOnDisconnect( /** * Get the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session * handling action when a user disconnects during the peak period. - * + * * @return the peakMinutesToWaitOnDisconnect value. */ public Integer peakMinutesToWaitOnDisconnect() { @@ -435,19 +430,19 @@ public Integer peakMinutesToWaitOnDisconnect() { /** * Set the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session * handling action when a user disconnects during the peak period. - * + * * @param peakMinutesToWaitOnDisconnect the peakMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withPeakMinutesToWaitOnDisconnect( - Integer peakMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect) { this.peakMinutesToWaitOnDisconnect = peakMinutesToWaitOnDisconnect; return this; } /** * Get the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. - * + * * @return the peakActionOnLogoff value. */ public SessionHandlingOperation peakActionOnLogoff() { @@ -456,7 +451,7 @@ public SessionHandlingOperation peakActionOnLogoff() { /** * Set the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. - * + * * @param peakActionOnLogoff the peakActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -468,7 +463,7 @@ public ScalingPlanPersonalScheduleProperties withPeakActionOnLogoff(SessionHandl /** * Get the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the peak period. - * + * * @return the peakMinutesToWaitOnLogoff value. */ public Integer peakMinutesToWaitOnLogoff() { @@ -478,7 +473,7 @@ public Integer peakMinutesToWaitOnLogoff() { /** * Set the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the peak period. - * + * * @param peakMinutesToWaitOnLogoff the peakMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -489,7 +484,7 @@ public ScalingPlanPersonalScheduleProperties withPeakMinutesToWaitOnLogoff(Integ /** * Get the rampDownStartTime property: Starting time for ramp down period. - * + * * @return the rampDownStartTime value. */ public Time rampDownStartTime() { @@ -498,7 +493,7 @@ public Time rampDownStartTime() { /** * Set the rampDownStartTime property: Starting time for ramp down period. - * + * * @param rampDownStartTime the rampDownStartTime value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -510,7 +505,7 @@ public ScalingPlanPersonalScheduleProperties withRampDownStartTime(Time rampDown /** * Get the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp down phase. - * + * * @return the rampDownStartVMOnConnect value. */ public SetStartVMOnConnect rampDownStartVMOnConnect() { @@ -520,12 +515,12 @@ public SetStartVMOnConnect rampDownStartVMOnConnect() { /** * Set the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp down phase. - * + * * @param rampDownStartVMOnConnect the rampDownStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampDownStartVMOnConnect( - SetStartVMOnConnect rampDownStartVMOnConnect) { + public ScalingPlanPersonalScheduleProperties + withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect) { this.rampDownStartVMOnConnect = rampDownStartVMOnConnect; return this; } @@ -533,7 +528,7 @@ public ScalingPlanPersonalScheduleProperties withRampDownStartVMOnConnect( /** * Get the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down * period. - * + * * @return the rampDownActionOnDisconnect value. */ public SessionHandlingOperation rampDownActionOnDisconnect() { @@ -543,12 +538,12 @@ public SessionHandlingOperation rampDownActionOnDisconnect() { /** * Set the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down * period. - * + * * @param rampDownActionOnDisconnect the rampDownActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampDownActionOnDisconnect( - SessionHandlingOperation rampDownActionOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withRampDownActionOnDisconnect(SessionHandlingOperation rampDownActionOnDisconnect) { this.rampDownActionOnDisconnect = rampDownActionOnDisconnect; return this; } @@ -556,7 +551,7 @@ public ScalingPlanPersonalScheduleProperties withRampDownActionOnDisconnect( /** * Get the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnDisconnect value. */ public Integer rampDownMinutesToWaitOnDisconnect() { @@ -566,19 +561,19 @@ public Integer rampDownMinutesToWaitOnDisconnect() { /** * Set the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp down period. - * + * * @param rampDownMinutesToWaitOnDisconnect the rampDownMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampDownMinutesToWaitOnDisconnect( - Integer rampDownMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect) { this.rampDownMinutesToWaitOnDisconnect = rampDownMinutesToWaitOnDisconnect; return this; } /** * Get the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. - * + * * @return the rampDownActionOnLogoff value. */ public SessionHandlingOperation rampDownActionOnLogoff() { @@ -587,12 +582,12 @@ public SessionHandlingOperation rampDownActionOnLogoff() { /** * Set the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. - * + * * @param rampDownActionOnLogoff the rampDownActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampDownActionOnLogoff( - SessionHandlingOperation rampDownActionOnLogoff) { + public ScalingPlanPersonalScheduleProperties + withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff) { this.rampDownActionOnLogoff = rampDownActionOnLogoff; return this; } @@ -600,7 +595,7 @@ public ScalingPlanPersonalScheduleProperties withRampDownActionOnLogoff( /** * Get the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnLogoff value. */ public Integer rampDownMinutesToWaitOnLogoff() { @@ -610,19 +605,19 @@ public Integer rampDownMinutesToWaitOnLogoff() { /** * Set the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp down period. - * + * * @param rampDownMinutesToWaitOnLogoff the rampDownMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withRampDownMinutesToWaitOnLogoff( - Integer rampDownMinutesToWaitOnLogoff) { + public ScalingPlanPersonalScheduleProperties + withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff) { this.rampDownMinutesToWaitOnLogoff = rampDownMinutesToWaitOnLogoff; return this; } /** * Get the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ public Time offPeakStartTime() { @@ -631,7 +626,7 @@ public Time offPeakStartTime() { /** * Set the offPeakStartTime property: Starting time for off-peak period. - * + * * @param offPeakStartTime the offPeakStartTime value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ @@ -643,7 +638,7 @@ public ScalingPlanPersonalScheduleProperties withOffPeakStartTime(Time offPeakSt /** * Get the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the off-peak phase. - * + * * @return the offPeakStartVMOnConnect value. */ public SetStartVMOnConnect offPeakStartVMOnConnect() { @@ -653,12 +648,12 @@ public SetStartVMOnConnect offPeakStartVMOnConnect() { /** * Set the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the off-peak phase. - * + * * @param offPeakStartVMOnConnect the offPeakStartVMOnConnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withOffPeakStartVMOnConnect( - SetStartVMOnConnect offPeakStartVMOnConnect) { + public ScalingPlanPersonalScheduleProperties + withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect) { this.offPeakStartVMOnConnect = offPeakStartVMOnConnect; return this; } @@ -666,7 +661,7 @@ public ScalingPlanPersonalScheduleProperties withOffPeakStartVMOnConnect( /** * Get the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak * period. - * + * * @return the offPeakActionOnDisconnect value. */ public SessionHandlingOperation offPeakActionOnDisconnect() { @@ -676,12 +671,12 @@ public SessionHandlingOperation offPeakActionOnDisconnect() { /** * Set the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak * period. - * + * * @param offPeakActionOnDisconnect the offPeakActionOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withOffPeakActionOnDisconnect( - SessionHandlingOperation offPeakActionOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withOffPeakActionOnDisconnect(SessionHandlingOperation offPeakActionOnDisconnect) { this.offPeakActionOnDisconnect = offPeakActionOnDisconnect; return this; } @@ -689,7 +684,7 @@ public ScalingPlanPersonalScheduleProperties withOffPeakActionOnDisconnect( /** * Get the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnDisconnect value. */ public Integer offPeakMinutesToWaitOnDisconnect() { @@ -699,19 +694,19 @@ public Integer offPeakMinutesToWaitOnDisconnect() { /** * Set the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the off-peak period. - * + * * @param offPeakMinutesToWaitOnDisconnect the offPeakMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withOffPeakMinutesToWaitOnDisconnect( - Integer offPeakMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleProperties + withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect) { this.offPeakMinutesToWaitOnDisconnect = offPeakMinutesToWaitOnDisconnect; return this; } /** * Get the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. - * + * * @return the offPeakActionOnLogoff value. */ public SessionHandlingOperation offPeakActionOnLogoff() { @@ -720,12 +715,12 @@ public SessionHandlingOperation offPeakActionOnLogoff() { /** * Set the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. - * + * * @param offPeakActionOnLogoff the offPeakActionOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withOffPeakActionOnLogoff( - SessionHandlingOperation offPeakActionOnLogoff) { + public ScalingPlanPersonalScheduleProperties + withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff) { this.offPeakActionOnLogoff = offPeakActionOnLogoff; return this; } @@ -733,7 +728,7 @@ public ScalingPlanPersonalScheduleProperties withOffPeakActionOnLogoff( /** * Get the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnLogoff value. */ public Integer offPeakMinutesToWaitOnLogoff() { @@ -743,19 +738,19 @@ public Integer offPeakMinutesToWaitOnLogoff() { /** * Set the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the off-peak period. - * + * * @param offPeakMinutesToWaitOnLogoff the offPeakMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalScheduleProperties object itself. */ - public ScalingPlanPersonalScheduleProperties withOffPeakMinutesToWaitOnLogoff( - Integer offPeakMinutesToWaitOnLogoff) { + public ScalingPlanPersonalScheduleProperties + withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff) { this.offPeakMinutesToWaitOnLogoff = offPeakMinutesToWaitOnLogoff; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 index 42558d7dc480..e864315f34d8 100644 --- 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 @@ -15,46 +15,50 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Represents a ScalingPlanPooledSchedule definition. */ +/** + * 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() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. + * Creates an instance of ScalingPlanPooledScheduleInner class. */ - public SystemData systemData() { - return this.systemData; + public ScalingPlanPooledScheduleInner() { } /** * Get the innerProperties property: Detailed properties for ScalingPlanPooledSchedule. - * + * * @return the innerProperties value. */ private ScalingPlanPooledScheduleProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the daysOfWeek property: Set of days of the week on which this schedule is active. - * + * * @return the daysOfWeek value. */ public List daysOfWeek() { @@ -63,7 +67,7 @@ public List 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. */ @@ -77,7 +81,7 @@ public ScalingPlanPooledScheduleInner withDaysOfWeek(List daysOfWeek) /** * Get the rampUpStartTime property: Starting time for ramp up period. - * + * * @return the rampUpStartTime value. */ public Time rampUpStartTime() { @@ -86,7 +90,7 @@ public Time rampUpStartTime() { /** * Set the rampUpStartTime property: Starting time for ramp up period. - * + * * @param rampUpStartTime the rampUpStartTime value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -100,7 +104,7 @@ public ScalingPlanPooledScheduleInner withRampUpStartTime(Time rampUpStartTime) /** * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. - * + * * @return the rampUpLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { @@ -109,12 +113,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledScheduleInner + withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -124,7 +128,7 @@ public ScalingPlanPooledScheduleInner withRampUpLoadBalancingAlgorithm( /** * Get the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. - * + * * @return the rampUpMinimumHostsPct value. */ public Integer rampUpMinimumHostsPct() { @@ -133,7 +137,7 @@ public Integer rampUpMinimumHostsPct() { /** * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. - * + * * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -147,7 +151,7 @@ public ScalingPlanPooledScheduleInner withRampUpMinimumHostsPct(Integer rampUpMi /** * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @return the rampUpCapacityThresholdPct value. */ public Integer rampUpCapacityThresholdPct() { @@ -156,7 +160,7 @@ public Integer rampUpCapacityThresholdPct() { /** * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -170,7 +174,7 @@ public ScalingPlanPooledScheduleInner withRampUpCapacityThresholdPct(Integer ram /** * Get the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ public Time peakStartTime() { @@ -179,7 +183,7 @@ public Time peakStartTime() { /** * Set the peakStartTime property: Starting time for peak period. - * + * * @param peakStartTime the peakStartTime value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -193,7 +197,7 @@ public ScalingPlanPooledScheduleInner withPeakStartTime(Time peakStartTime) { /** * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. - * + * * @return the peakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { @@ -202,12 +206,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledScheduleInner + withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -217,7 +221,7 @@ public ScalingPlanPooledScheduleInner withPeakLoadBalancingAlgorithm( /** * Get the rampDownStartTime property: Starting time for ramp down period. - * + * * @return the rampDownStartTime value. */ public Time rampDownStartTime() { @@ -226,7 +230,7 @@ public Time rampDownStartTime() { /** * Set the rampDownStartTime property: Starting time for ramp down period. - * + * * @param rampDownStartTime the rampDownStartTime value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -240,7 +244,7 @@ public ScalingPlanPooledScheduleInner withRampDownStartTime(Time rampDownStartTi /** * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. - * + * * @return the rampDownLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { @@ -249,12 +253,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledScheduleInner + withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -264,7 +268,7 @@ public ScalingPlanPooledScheduleInner withRampDownLoadBalancingAlgorithm( /** * Get the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. - * + * * @return the rampDownMinimumHostsPct value. */ public Integer rampDownMinimumHostsPct() { @@ -273,7 +277,7 @@ public Integer rampDownMinimumHostsPct() { /** * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. - * + * * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -287,7 +291,7 @@ public ScalingPlanPooledScheduleInner withRampDownMinimumHostsPct(Integer rampDo /** * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @return the rampDownCapacityThresholdPct value. */ public Integer rampDownCapacityThresholdPct() { @@ -296,7 +300,7 @@ public Integer rampDownCapacityThresholdPct() { /** * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -310,7 +314,7 @@ public ScalingPlanPooledScheduleInner withRampDownCapacityThresholdPct(Integer r /** * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. - * + * * @return the rampDownForceLogoffUsers value. */ public Boolean rampDownForceLogoffUsers() { @@ -319,7 +323,7 @@ public Boolean 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. */ @@ -333,7 +337,7 @@ public ScalingPlanPooledScheduleInner withRampDownForceLogoffUsers(Boolean rampD /** * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. - * + * * @return the rampDownStopHostsWhen value. */ public StopHostsWhen rampDownStopHostsWhen() { @@ -342,7 +346,7 @@ public StopHostsWhen 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. */ @@ -356,7 +360,7 @@ public ScalingPlanPooledScheduleInner withRampDownStopHostsWhen(StopHostsWhen ra /** * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. - * + * * @return the rampDownWaitTimeMinutes value. */ public Integer rampDownWaitTimeMinutes() { @@ -365,7 +369,7 @@ public Integer 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. */ @@ -379,7 +383,7 @@ public ScalingPlanPooledScheduleInner withRampDownWaitTimeMinutes(Integer rampDo /** * Get the rampDownNotificationMessage property: Notification message for users during ramp down period. - * + * * @return the rampDownNotificationMessage value. */ public String rampDownNotificationMessage() { @@ -388,7 +392,7 @@ public String 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. */ @@ -402,7 +406,7 @@ public ScalingPlanPooledScheduleInner withRampDownNotificationMessage(String ram /** * Get the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ public Time offPeakStartTime() { @@ -411,7 +415,7 @@ public Time offPeakStartTime() { /** * Set the offPeakStartTime property: Starting time for off-peak period. - * + * * @param offPeakStartTime the offPeakStartTime value to set. * @return the ScalingPlanPooledScheduleInner object itself. */ @@ -425,7 +429,7 @@ public ScalingPlanPooledScheduleInner withOffPeakStartTime(Time offPeakStartTime /** * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. - * + * * @return the offPeakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { @@ -434,12 +438,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledScheduleInner + withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -449,15 +453,14 @@ public ScalingPlanPooledScheduleInner withOffPeakLoadBalancingAlgorithm( /** * 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")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property innerProperties in model ScalingPlanPooledScheduleInner")); } else { innerProperties().validate(); } 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 index 93b650a07c2f..0a76a8238f3e 100644 --- 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 @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A ScalingPlanPooledSchedule. */ +/** + * A ScalingPlanPooledSchedule. + */ @Fluent public final class ScalingPlanPooledScheduleProperties { /* @@ -117,13 +119,15 @@ public final class ScalingPlanPooledScheduleProperties { @JsonProperty(value = "offPeakLoadBalancingAlgorithm") private SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm; - /** Creates an instance of ScalingPlanPooledScheduleProperties class. */ + /** + * 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() { @@ -132,7 +136,7 @@ public List 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. */ @@ -143,7 +147,7 @@ public ScalingPlanPooledScheduleProperties withDaysOfWeek(List daysOf /** * Get the rampUpStartTime property: Starting time for ramp up period. - * + * * @return the rampUpStartTime value. */ public Time rampUpStartTime() { @@ -152,7 +156,7 @@ public Time rampUpStartTime() { /** * Set the rampUpStartTime property: Starting time for ramp up period. - * + * * @param rampUpStartTime the rampUpStartTime value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -163,7 +167,7 @@ public ScalingPlanPooledScheduleProperties withRampUpStartTime(Time rampUpStartT /** * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. - * + * * @return the rampUpLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { @@ -172,19 +176,19 @@ public SessionHostLoadBalancingAlgorithm 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) { + 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() { @@ -193,7 +197,7 @@ public Integer rampUpMinimumHostsPct() { /** * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. - * + * * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -204,7 +208,7 @@ public ScalingPlanPooledScheduleProperties withRampUpMinimumHostsPct(Integer ram /** * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @return the rampUpCapacityThresholdPct value. */ public Integer rampUpCapacityThresholdPct() { @@ -213,7 +217,7 @@ public Integer rampUpCapacityThresholdPct() { /** * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -224,7 +228,7 @@ public ScalingPlanPooledScheduleProperties withRampUpCapacityThresholdPct(Intege /** * Get the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ public Time peakStartTime() { @@ -233,7 +237,7 @@ public Time peakStartTime() { /** * Set the peakStartTime property: Starting time for peak period. - * + * * @param peakStartTime the peakStartTime value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -244,7 +248,7 @@ public ScalingPlanPooledScheduleProperties withPeakStartTime(Time peakStartTime) /** * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. - * + * * @return the peakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { @@ -253,19 +257,19 @@ public SessionHostLoadBalancingAlgorithm 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) { + 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() { @@ -274,7 +278,7 @@ public Time rampDownStartTime() { /** * Set the rampDownStartTime property: Starting time for ramp down period. - * + * * @param rampDownStartTime the rampDownStartTime value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -285,7 +289,7 @@ public ScalingPlanPooledScheduleProperties withRampDownStartTime(Time rampDownSt /** * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. - * + * * @return the rampDownLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { @@ -294,19 +298,19 @@ public SessionHostLoadBalancingAlgorithm 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) { + 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() { @@ -315,7 +319,7 @@ public Integer rampDownMinimumHostsPct() { /** * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. - * + * * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -326,7 +330,7 @@ public ScalingPlanPooledScheduleProperties withRampDownMinimumHostsPct(Integer r /** * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @return the rampDownCapacityThresholdPct value. */ public Integer rampDownCapacityThresholdPct() { @@ -335,7 +339,7 @@ public Integer rampDownCapacityThresholdPct() { /** * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -346,7 +350,7 @@ public ScalingPlanPooledScheduleProperties withRampDownCapacityThresholdPct(Inte /** * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. - * + * * @return the rampDownForceLogoffUsers value. */ public Boolean rampDownForceLogoffUsers() { @@ -355,7 +359,7 @@ public Boolean 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. */ @@ -366,7 +370,7 @@ public ScalingPlanPooledScheduleProperties withRampDownForceLogoffUsers(Boolean /** * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. - * + * * @return the rampDownStopHostsWhen value. */ public StopHostsWhen rampDownStopHostsWhen() { @@ -375,7 +379,7 @@ public StopHostsWhen 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. */ @@ -386,7 +390,7 @@ public ScalingPlanPooledScheduleProperties withRampDownStopHostsWhen(StopHostsWh /** * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. - * + * * @return the rampDownWaitTimeMinutes value. */ public Integer rampDownWaitTimeMinutes() { @@ -395,7 +399,7 @@ public Integer 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. */ @@ -406,7 +410,7 @@ public ScalingPlanPooledScheduleProperties withRampDownWaitTimeMinutes(Integer r /** * Get the rampDownNotificationMessage property: Notification message for users during ramp down period. - * + * * @return the rampDownNotificationMessage value. */ public String rampDownNotificationMessage() { @@ -415,7 +419,7 @@ public String 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. */ @@ -426,7 +430,7 @@ public ScalingPlanPooledScheduleProperties withRampDownNotificationMessage(Strin /** * Get the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ public Time offPeakStartTime() { @@ -435,7 +439,7 @@ public Time offPeakStartTime() { /** * Set the offPeakStartTime property: Starting time for off-peak period. - * + * * @param offPeakStartTime the offPeakStartTime value to set. * @return the ScalingPlanPooledScheduleProperties object itself. */ @@ -446,7 +450,7 @@ public ScalingPlanPooledScheduleProperties withOffPeakStartTime(Time offPeakStar /** * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. - * + * * @return the offPeakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { @@ -455,19 +459,19 @@ public SessionHostLoadBalancingAlgorithm 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) { + 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() { 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 73fcf6c87140..0684107ca20b 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 @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Scaling plan properties. */ +/** + * Scaling plan properties. + */ @Fluent public final class ScalingPlanProperties { /* @@ -63,13 +65,15 @@ public final class ScalingPlanProperties { @JsonProperty(value = "hostPoolReferences") private List hostPoolReferences; - /** Creates an instance of ScalingPlanProperties class. */ + /** + * Creates an instance of ScalingPlanProperties class. + */ public ScalingPlanProperties() { } /** * Get the objectId property: ObjectId of scaling plan. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -78,7 +82,7 @@ public String objectId() { /** * Get the description property: Description of scaling plan. - * + * * @return the description value. */ public String description() { @@ -87,7 +91,7 @@ public String description() { /** * Set the description property: Description of scaling plan. - * + * * @param description the description value to set. * @return the ScalingPlanProperties object itself. */ @@ -98,7 +102,7 @@ public ScalingPlanProperties withDescription(String description) { /** * Get the friendlyName property: User friendly name of scaling plan. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -107,7 +111,7 @@ public String friendlyName() { /** * Set the friendlyName property: User friendly name of scaling plan. - * + * * @param friendlyName the friendlyName value to set. * @return the ScalingPlanProperties object itself. */ @@ -118,7 +122,7 @@ public ScalingPlanProperties withFriendlyName(String friendlyName) { /** * Get the timeZone property: Timezone of the scaling plan. - * + * * @return the timeZone value. */ public String timeZone() { @@ -127,7 +131,7 @@ public String timeZone() { /** * Set the timeZone property: Timezone of the scaling plan. - * + * * @param timeZone the timeZone value to set. * @return the ScalingPlanProperties object itself. */ @@ -138,7 +142,7 @@ public ScalingPlanProperties withTimeZone(String timeZone) { /** * Get the hostPoolType property: HostPool type for desktop. - * + * * @return the hostPoolType value. */ public ScalingHostPoolType hostPoolType() { @@ -147,7 +151,7 @@ public ScalingHostPoolType hostPoolType() { /** * Set the hostPoolType property: HostPool type for desktop. - * + * * @param hostPoolType the hostPoolType value to set. * @return the ScalingPlanProperties object itself. */ @@ -158,7 +162,7 @@ public ScalingPlanProperties withHostPoolType(ScalingHostPoolType hostPoolType) /** * Get the exclusionTag property: Exclusion tag for scaling plan. - * + * * @return the exclusionTag value. */ public String exclusionTag() { @@ -167,7 +171,7 @@ public String exclusionTag() { /** * Set the exclusionTag property: Exclusion tag for scaling plan. - * + * * @param exclusionTag the exclusionTag value to set. * @return the ScalingPlanProperties object itself. */ @@ -178,7 +182,7 @@ public ScalingPlanProperties withExclusionTag(String exclusionTag) { /** * Get the schedules property: List of ScalingPlanPooledSchedule definitions. - * + * * @return the schedules value. */ public List schedules() { @@ -187,7 +191,7 @@ public List schedules() { /** * Set the schedules property: List of ScalingPlanPooledSchedule definitions. - * + * * @param schedules the schedules value to set. * @return the ScalingPlanProperties object itself. */ @@ -198,7 +202,7 @@ public ScalingPlanProperties withSchedules(List schedules) { /** * Get the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @return the hostPoolReferences value. */ public List hostPoolReferences() { @@ -207,7 +211,7 @@ public List hostPoolReferences() { /** * Set the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @param hostPoolReferences the hostPoolReferences value to set. * @return the ScalingPlanProperties object itself. */ @@ -218,14 +222,13 @@ public ScalingPlanProperties withHostPoolReferences(List e.validate()); 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 fa94341d807a..4f61ad114178 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 @@ -14,46 +14,50 @@ import java.time.OffsetDateTime; import java.util.List; -/** Represents a SessionHost definition. */ +/** + * Represents a SessionHost definition. + */ @Fluent public final class SessionHostInner 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 SessionHost */ @JsonProperty(value = "properties") private SessionHostProperties innerProperties; - /** Creates an instance of SessionHostInner class. */ - public SessionHostInner() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. + * Creates an instance of SessionHostInner class. */ - public SystemData systemData() { - return this.systemData; + public SessionHostInner() { } /** * Get the innerProperties property: Detailed properties for SessionHost. - * + * * @return the innerProperties value. */ private SessionHostProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the objectId property: ObjectId of SessionHost. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -62,7 +66,7 @@ public String objectId() { /** * Get the lastHeartBeat property: Last heart beat from SessionHost. - * + * * @return the lastHeartBeat value. */ public OffsetDateTime lastHeartBeat() { @@ -71,7 +75,7 @@ public OffsetDateTime lastHeartBeat() { /** * Set the lastHeartBeat property: Last heart beat from SessionHost. - * + * * @param lastHeartBeat the lastHeartBeat value to set. * @return the SessionHostInner object itself. */ @@ -85,7 +89,7 @@ public SessionHostInner withLastHeartBeat(OffsetDateTime lastHeartBeat) { /** * Get the sessions property: Number of sessions on SessionHost. - * + * * @return the sessions value. */ public Integer sessions() { @@ -94,7 +98,7 @@ public Integer sessions() { /** * Set the sessions property: Number of sessions on SessionHost. - * + * * @param sessions the sessions value to set. * @return the SessionHostInner object itself. */ @@ -108,7 +112,7 @@ public SessionHostInner withSessions(Integer sessions) { /** * Get the agentVersion property: Version of agent on SessionHost. - * + * * @return the agentVersion value. */ public String agentVersion() { @@ -117,7 +121,7 @@ public String agentVersion() { /** * Set the agentVersion property: Version of agent on SessionHost. - * + * * @param agentVersion the agentVersion value to set. * @return the SessionHostInner object itself. */ @@ -131,7 +135,7 @@ public SessionHostInner withAgentVersion(String agentVersion) { /** * Get the allowNewSession property: Allow a new session. - * + * * @return the allowNewSession value. */ public Boolean allowNewSession() { @@ -140,7 +144,7 @@ public Boolean allowNewSession() { /** * Set the allowNewSession property: Allow a new session. - * + * * @param allowNewSession the allowNewSession value to set. * @return the SessionHostInner object itself. */ @@ -154,7 +158,7 @@ public SessionHostInner withAllowNewSession(Boolean allowNewSession) { /** * Get the virtualMachineId property: Virtual Machine Id of SessionHost's underlying virtual machine. - * + * * @return the virtualMachineId value. */ public String virtualMachineId() { @@ -163,7 +167,7 @@ public String virtualMachineId() { /** * Get the resourceId property: Resource Id of SessionHost's underlying virtual machine. - * + * * @return the resourceId value. */ public String resourceId() { @@ -172,7 +176,7 @@ public String resourceId() { /** * Get the assignedUser property: User assigned to SessionHost. - * + * * @return the assignedUser value. */ public String assignedUser() { @@ -181,7 +185,7 @@ public String assignedUser() { /** * Set the assignedUser property: User assigned to SessionHost. - * + * * @param assignedUser the assignedUser value to set. * @return the SessionHostInner object itself. */ @@ -195,7 +199,7 @@ public SessionHostInner withAssignedUser(String assignedUser) { /** * Get the friendlyName property: Friendly name of SessionHost. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -204,7 +208,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of SessionHost. - * + * * @param friendlyName the friendlyName value to set. * @return the SessionHostInner object itself. */ @@ -218,7 +222,7 @@ public SessionHostInner withFriendlyName(String friendlyName) { /** * Get the status property: Status for a SessionHost. - * + * * @return the status value. */ public Status status() { @@ -227,7 +231,7 @@ public Status status() { /** * Set the status property: Status for a SessionHost. - * + * * @param status the status value to set. * @return the SessionHostInner object itself. */ @@ -241,7 +245,7 @@ public SessionHostInner withStatus(Status status) { /** * Get the statusTimestamp property: The timestamp of the status. - * + * * @return the statusTimestamp value. */ public OffsetDateTime statusTimestamp() { @@ -250,7 +254,7 @@ public OffsetDateTime statusTimestamp() { /** * Get the osVersion property: The version of the OS on the session host. - * + * * @return the osVersion value. */ public String osVersion() { @@ -259,7 +263,7 @@ public String osVersion() { /** * Set the osVersion property: The version of the OS on the session host. - * + * * @param osVersion the osVersion value to set. * @return the SessionHostInner object itself. */ @@ -273,7 +277,7 @@ public SessionHostInner withOsVersion(String osVersion) { /** * Get the sxSStackVersion property: The version of the side by side stack on the session host. - * + * * @return the sxSStackVersion value. */ public String sxSStackVersion() { @@ -282,7 +286,7 @@ public String sxSStackVersion() { /** * Set the sxSStackVersion property: The version of the side by side stack on the session host. - * + * * @param sxSStackVersion the sxSStackVersion value to set. * @return the SessionHostInner object itself. */ @@ -296,7 +300,7 @@ public SessionHostInner withSxSStackVersion(String sxSStackVersion) { /** * Get the updateState property: Update state of a SessionHost. - * + * * @return the updateState value. */ public UpdateState updateState() { @@ -305,7 +309,7 @@ public UpdateState updateState() { /** * Set the updateState property: Update state of a SessionHost. - * + * * @param updateState the updateState value to set. * @return the SessionHostInner object itself. */ @@ -319,7 +323,7 @@ public SessionHostInner withUpdateState(UpdateState updateState) { /** * Get the lastUpdateTime property: The timestamp of the last update. - * + * * @return the lastUpdateTime value. */ public OffsetDateTime lastUpdateTime() { @@ -328,7 +332,7 @@ public OffsetDateTime lastUpdateTime() { /** * Get the updateErrorMessage property: The error message. - * + * * @return the updateErrorMessage value. */ public String updateErrorMessage() { @@ -337,7 +341,7 @@ public String updateErrorMessage() { /** * Set the updateErrorMessage property: The error message. - * + * * @param updateErrorMessage the updateErrorMessage value to set. * @return the SessionHostInner object itself. */ @@ -351,7 +355,7 @@ public SessionHostInner withUpdateErrorMessage(String updateErrorMessage) { /** * Get the sessionHostHealthCheckResults property: List of SessionHostHealthCheckReports. - * + * * @return the sessionHostHealthCheckResults value. */ public List sessionHostHealthCheckResults() { @@ -360,7 +364,7 @@ public List sessionHostHealthCheckResults() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostPatchProperties.java index 9a71b1b6ab2a..69212bf61f7f 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** SessionHost properties that can be patched. */ +/** + * SessionHost properties that can be patched. + */ @Fluent public final class SessionHostPatchProperties { /* @@ -28,13 +30,15 @@ public final class SessionHostPatchProperties { @JsonProperty(value = "friendlyName") private String friendlyName; - /** Creates an instance of SessionHostPatchProperties class. */ + /** + * Creates an instance of SessionHostPatchProperties class. + */ public SessionHostPatchProperties() { } /** * Get the allowNewSession property: Allow a new session. - * + * * @return the allowNewSession value. */ public Boolean allowNewSession() { @@ -43,7 +47,7 @@ public Boolean allowNewSession() { /** * Set the allowNewSession property: Allow a new session. - * + * * @param allowNewSession the allowNewSession value to set. * @return the SessionHostPatchProperties object itself. */ @@ -54,7 +58,7 @@ public SessionHostPatchProperties withAllowNewSession(Boolean allowNewSession) { /** * Get the assignedUser property: User assigned to SessionHost. - * + * * @return the assignedUser value. */ public String assignedUser() { @@ -63,7 +67,7 @@ public String assignedUser() { /** * Set the assignedUser property: User assigned to SessionHost. - * + * * @param assignedUser the assignedUser value to set. * @return the SessionHostPatchProperties object itself. */ @@ -74,7 +78,7 @@ public SessionHostPatchProperties withAssignedUser(String assignedUser) { /** * Get the friendlyName property: Friendly name of SessionHost. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -83,7 +87,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of SessionHost. - * + * * @param friendlyName the friendlyName value to set. * @return the SessionHostPatchProperties object itself. */ @@ -94,7 +98,7 @@ public SessionHostPatchProperties withFriendlyName(String friendlyName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/SessionHostProperties.java index e59277002883..de5d37ee7234 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 @@ -12,7 +12,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Schema for SessionHost properties. */ +/** + * Schema for SessionHost properties. + */ @Fluent public final class SessionHostProperties { /* @@ -117,13 +119,15 @@ public final class SessionHostProperties { @JsonProperty(value = "sessionHostHealthCheckResults", access = JsonProperty.Access.WRITE_ONLY) private List sessionHostHealthCheckResults; - /** Creates an instance of SessionHostProperties class. */ + /** + * Creates an instance of SessionHostProperties class. + */ public SessionHostProperties() { } /** * Get the objectId property: ObjectId of SessionHost. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -132,7 +136,7 @@ public String objectId() { /** * Get the lastHeartBeat property: Last heart beat from SessionHost. - * + * * @return the lastHeartBeat value. */ public OffsetDateTime lastHeartBeat() { @@ -141,7 +145,7 @@ public OffsetDateTime lastHeartBeat() { /** * Set the lastHeartBeat property: Last heart beat from SessionHost. - * + * * @param lastHeartBeat the lastHeartBeat value to set. * @return the SessionHostProperties object itself. */ @@ -152,7 +156,7 @@ public SessionHostProperties withLastHeartBeat(OffsetDateTime lastHeartBeat) { /** * Get the sessions property: Number of sessions on SessionHost. - * + * * @return the sessions value. */ public Integer sessions() { @@ -161,7 +165,7 @@ public Integer sessions() { /** * Set the sessions property: Number of sessions on SessionHost. - * + * * @param sessions the sessions value to set. * @return the SessionHostProperties object itself. */ @@ -172,7 +176,7 @@ public SessionHostProperties withSessions(Integer sessions) { /** * Get the agentVersion property: Version of agent on SessionHost. - * + * * @return the agentVersion value. */ public String agentVersion() { @@ -181,7 +185,7 @@ public String agentVersion() { /** * Set the agentVersion property: Version of agent on SessionHost. - * + * * @param agentVersion the agentVersion value to set. * @return the SessionHostProperties object itself. */ @@ -192,7 +196,7 @@ public SessionHostProperties withAgentVersion(String agentVersion) { /** * Get the allowNewSession property: Allow a new session. - * + * * @return the allowNewSession value. */ public Boolean allowNewSession() { @@ -201,7 +205,7 @@ public Boolean allowNewSession() { /** * Set the allowNewSession property: Allow a new session. - * + * * @param allowNewSession the allowNewSession value to set. * @return the SessionHostProperties object itself. */ @@ -212,7 +216,7 @@ public SessionHostProperties withAllowNewSession(Boolean allowNewSession) { /** * Get the virtualMachineId property: Virtual Machine Id of SessionHost's underlying virtual machine. - * + * * @return the virtualMachineId value. */ public String virtualMachineId() { @@ -221,7 +225,7 @@ public String virtualMachineId() { /** * Get the resourceId property: Resource Id of SessionHost's underlying virtual machine. - * + * * @return the resourceId value. */ public String resourceId() { @@ -230,7 +234,7 @@ public String resourceId() { /** * Get the assignedUser property: User assigned to SessionHost. - * + * * @return the assignedUser value. */ public String assignedUser() { @@ -239,7 +243,7 @@ public String assignedUser() { /** * Set the assignedUser property: User assigned to SessionHost. - * + * * @param assignedUser the assignedUser value to set. * @return the SessionHostProperties object itself. */ @@ -250,7 +254,7 @@ public SessionHostProperties withAssignedUser(String assignedUser) { /** * Get the friendlyName property: Friendly name of SessionHost. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -259,7 +263,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of SessionHost. - * + * * @param friendlyName the friendlyName value to set. * @return the SessionHostProperties object itself. */ @@ -270,7 +274,7 @@ public SessionHostProperties withFriendlyName(String friendlyName) { /** * Get the status property: Status for a SessionHost. - * + * * @return the status value. */ public Status status() { @@ -279,7 +283,7 @@ public Status status() { /** * Set the status property: Status for a SessionHost. - * + * * @param status the status value to set. * @return the SessionHostProperties object itself. */ @@ -290,7 +294,7 @@ public SessionHostProperties withStatus(Status status) { /** * Get the statusTimestamp property: The timestamp of the status. - * + * * @return the statusTimestamp value. */ public OffsetDateTime statusTimestamp() { @@ -299,7 +303,7 @@ public OffsetDateTime statusTimestamp() { /** * Get the osVersion property: The version of the OS on the session host. - * + * * @return the osVersion value. */ public String osVersion() { @@ -308,7 +312,7 @@ public String osVersion() { /** * Set the osVersion property: The version of the OS on the session host. - * + * * @param osVersion the osVersion value to set. * @return the SessionHostProperties object itself. */ @@ -319,7 +323,7 @@ public SessionHostProperties withOsVersion(String osVersion) { /** * Get the sxSStackVersion property: The version of the side by side stack on the session host. - * + * * @return the sxSStackVersion value. */ public String sxSStackVersion() { @@ -328,7 +332,7 @@ public String sxSStackVersion() { /** * Set the sxSStackVersion property: The version of the side by side stack on the session host. - * + * * @param sxSStackVersion the sxSStackVersion value to set. * @return the SessionHostProperties object itself. */ @@ -339,7 +343,7 @@ public SessionHostProperties withSxSStackVersion(String sxSStackVersion) { /** * Get the updateState property: Update state of a SessionHost. - * + * * @return the updateState value. */ public UpdateState updateState() { @@ -348,7 +352,7 @@ public UpdateState updateState() { /** * Set the updateState property: Update state of a SessionHost. - * + * * @param updateState the updateState value to set. * @return the SessionHostProperties object itself. */ @@ -359,7 +363,7 @@ public SessionHostProperties withUpdateState(UpdateState updateState) { /** * Get the lastUpdateTime property: The timestamp of the last update. - * + * * @return the lastUpdateTime value. */ public OffsetDateTime lastUpdateTime() { @@ -368,7 +372,7 @@ public OffsetDateTime lastUpdateTime() { /** * Get the updateErrorMessage property: The error message. - * + * * @return the updateErrorMessage value. */ public String updateErrorMessage() { @@ -377,7 +381,7 @@ public String updateErrorMessage() { /** * Set the updateErrorMessage property: The error message. - * + * * @param updateErrorMessage the updateErrorMessage value to set. * @return the SessionHostProperties object itself. */ @@ -388,7 +392,7 @@ public SessionHostProperties withUpdateErrorMessage(String updateErrorMessage) { /** * Get the sessionHostHealthCheckResults property: List of SessionHostHealthCheckReports. - * + * * @return the sessionHostHealthCheckResults value. */ public List sessionHostHealthCheckResults() { @@ -397,7 +401,7 @@ public List sessionHostHealthCheckResults() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemInner.java index 7e6345c2bab5..995015b50ed6 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 @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents a StartMenuItem definition. */ +/** + * Represents a StartMenuItem definition. + */ @Fluent public final class StartMenuItemInner extends ProxyResource { /* @@ -17,22 +20,39 @@ public final class StartMenuItemInner extends ProxyResource { @JsonProperty(value = "properties") private StartMenuItemProperties innerProperties; - /** Creates an instance of StartMenuItemInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of StartMenuItemInner class. + */ public StartMenuItemInner() { } /** * Get the innerProperties property: Detailed properties for StartMenuItem. - * + * * @return the innerProperties value. */ private StartMenuItemProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the appAlias property: Alias of StartMenuItem. - * + * * @return the appAlias value. */ public String appAlias() { @@ -41,7 +61,7 @@ public String appAlias() { /** * Set the appAlias property: Alias of StartMenuItem. - * + * * @param appAlias the appAlias value to set. * @return the StartMenuItemInner object itself. */ @@ -55,7 +75,7 @@ public StartMenuItemInner withAppAlias(String appAlias) { /** * Get the filePath property: Path to the file of StartMenuItem. - * + * * @return the filePath value. */ public String filePath() { @@ -64,7 +84,7 @@ public String filePath() { /** * Set the filePath property: Path to the file of StartMenuItem. - * + * * @param filePath the filePath value to set. * @return the StartMenuItemInner object itself. */ @@ -78,7 +98,7 @@ public StartMenuItemInner withFilePath(String filePath) { /** * Get the commandLineArguments property: Command line arguments for StartMenuItem. - * + * * @return the commandLineArguments value. */ public String commandLineArguments() { @@ -87,7 +107,7 @@ public String commandLineArguments() { /** * Set the commandLineArguments property: Command line arguments for StartMenuItem. - * + * * @param commandLineArguments the commandLineArguments value to set. * @return the StartMenuItemInner object itself. */ @@ -101,7 +121,7 @@ public StartMenuItemInner withCommandLineArguments(String commandLineArguments) /** * Get the iconPath property: Path to the icon. - * + * * @return the iconPath value. */ public String iconPath() { @@ -110,7 +130,7 @@ public String iconPath() { /** * Set the iconPath property: Path to the icon. - * + * * @param iconPath the iconPath value to set. * @return the StartMenuItemInner object itself. */ @@ -124,7 +144,7 @@ public StartMenuItemInner withIconPath(String iconPath) { /** * Get the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ public Integer iconIndex() { @@ -133,7 +153,7 @@ public Integer iconIndex() { /** * Set the iconIndex property: Index of the icon. - * + * * @param iconIndex the iconIndex value to set. * @return the StartMenuItemInner object itself. */ @@ -147,7 +167,7 @@ public StartMenuItemInner withIconIndex(Integer iconIndex) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/StartMenuItemProperties.java index 6ae58ea60c2f..3765033e9997 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for StartMenuItem properties. */ +/** + * Schema for StartMenuItem properties. + */ @Fluent public final class StartMenuItemProperties { /* @@ -40,13 +42,15 @@ public final class StartMenuItemProperties { @JsonProperty(value = "iconIndex") private Integer iconIndex; - /** Creates an instance of StartMenuItemProperties class. */ + /** + * Creates an instance of StartMenuItemProperties class. + */ public StartMenuItemProperties() { } /** * Get the appAlias property: Alias of StartMenuItem. - * + * * @return the appAlias value. */ public String appAlias() { @@ -55,7 +59,7 @@ public String appAlias() { /** * Set the appAlias property: Alias of StartMenuItem. - * + * * @param appAlias the appAlias value to set. * @return the StartMenuItemProperties object itself. */ @@ -66,7 +70,7 @@ public StartMenuItemProperties withAppAlias(String appAlias) { /** * Get the filePath property: Path to the file of StartMenuItem. - * + * * @return the filePath value. */ public String filePath() { @@ -75,7 +79,7 @@ public String filePath() { /** * Set the filePath property: Path to the file of StartMenuItem. - * + * * @param filePath the filePath value to set. * @return the StartMenuItemProperties object itself. */ @@ -86,7 +90,7 @@ public StartMenuItemProperties withFilePath(String filePath) { /** * Get the commandLineArguments property: Command line arguments for StartMenuItem. - * + * * @return the commandLineArguments value. */ public String commandLineArguments() { @@ -95,7 +99,7 @@ public String commandLineArguments() { /** * Set the commandLineArguments property: Command line arguments for StartMenuItem. - * + * * @param commandLineArguments the commandLineArguments value to set. * @return the StartMenuItemProperties object itself. */ @@ -106,7 +110,7 @@ public StartMenuItemProperties withCommandLineArguments(String commandLineArgume /** * Get the iconPath property: Path to the icon. - * + * * @return the iconPath value. */ public String iconPath() { @@ -115,7 +119,7 @@ public String iconPath() { /** * Set the iconPath property: Path to the icon. - * + * * @param iconPath the iconPath value to set. * @return the StartMenuItemProperties object itself. */ @@ -126,7 +130,7 @@ public StartMenuItemProperties withIconPath(String iconPath) { /** * Get the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ public Integer iconIndex() { @@ -135,7 +139,7 @@ public Integer iconIndex() { /** * Set the iconIndex property: Index of the icon. - * + * * @param iconIndex the iconIndex value to set. * @return the StartMenuItemProperties object itself. */ @@ -146,7 +150,7 @@ public StartMenuItemProperties withIconIndex(Integer iconIndex) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionInner.java index 2246919d2539..fe21deb0e9a4 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 @@ -12,46 +12,50 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Represents a UserSession definition. */ +/** + * Represents a UserSession definition. + */ @Fluent public final class UserSessionInner 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 UserSession */ @JsonProperty(value = "properties") private UserSessionProperties innerProperties; - /** Creates an instance of UserSessionInner class. */ - public UserSessionInner() { - } + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. + * Creates an instance of UserSessionInner class. */ - public SystemData systemData() { - return this.systemData; + public UserSessionInner() { } /** * Get the innerProperties property: Detailed properties for UserSession. - * + * * @return the innerProperties value. */ private UserSessionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the objectId property: ObjectId of user session. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -60,7 +64,7 @@ public String objectId() { /** * Get the userPrincipalName property: The user principal name. - * + * * @return the userPrincipalName value. */ public String userPrincipalName() { @@ -69,7 +73,7 @@ public String userPrincipalName() { /** * Set the userPrincipalName property: The user principal name. - * + * * @param userPrincipalName the userPrincipalName value to set. * @return the UserSessionInner object itself. */ @@ -83,7 +87,7 @@ public UserSessionInner withUserPrincipalName(String userPrincipalName) { /** * Get the applicationType property: Application type of application. - * + * * @return the applicationType value. */ public ApplicationType applicationType() { @@ -92,7 +96,7 @@ public ApplicationType applicationType() { /** * Set the applicationType property: Application type of application. - * + * * @param applicationType the applicationType value to set. * @return the UserSessionInner object itself. */ @@ -106,7 +110,7 @@ public UserSessionInner withApplicationType(ApplicationType applicationType) { /** * Get the sessionState property: State of user session. - * + * * @return the sessionState value. */ public SessionState sessionState() { @@ -115,7 +119,7 @@ public SessionState sessionState() { /** * Set the sessionState property: State of user session. - * + * * @param sessionState the sessionState value to set. * @return the UserSessionInner object itself. */ @@ -129,7 +133,7 @@ public UserSessionInner withSessionState(SessionState sessionState) { /** * Get the activeDirectoryUsername property: The active directory user name. - * + * * @return the activeDirectoryUsername value. */ public String activeDirectoryUsername() { @@ -138,7 +142,7 @@ public String activeDirectoryUsername() { /** * Set the activeDirectoryUsername property: The active directory user name. - * + * * @param activeDirectoryUsername the activeDirectoryUsername value to set. * @return the UserSessionInner object itself. */ @@ -152,7 +156,7 @@ public UserSessionInner withActiveDirectoryUsername(String activeDirectoryUserna /** * Get the createTime property: The timestamp of the user session create. - * + * * @return the createTime value. */ public OffsetDateTime createTime() { @@ -161,7 +165,7 @@ public OffsetDateTime createTime() { /** * Set the createTime property: The timestamp of the user session create. - * + * * @param createTime the createTime value to set. * @return the UserSessionInner object itself. */ @@ -175,7 +179,7 @@ public UserSessionInner withCreateTime(OffsetDateTime createTime) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/UserSessionProperties.java index 925653d0fdf5..d46fade3d3a3 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Schema for UserSession properties. */ +/** + * Schema for UserSession properties. + */ @Fluent public final class UserSessionProperties { /* @@ -49,13 +51,15 @@ public final class UserSessionProperties { @JsonProperty(value = "createTime") private OffsetDateTime createTime; - /** Creates an instance of UserSessionProperties class. */ + /** + * Creates an instance of UserSessionProperties class. + */ public UserSessionProperties() { } /** * Get the objectId property: ObjectId of user session. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -64,7 +68,7 @@ public String objectId() { /** * Get the userPrincipalName property: The user principal name. - * + * * @return the userPrincipalName value. */ public String userPrincipalName() { @@ -73,7 +77,7 @@ public String userPrincipalName() { /** * Set the userPrincipalName property: The user principal name. - * + * * @param userPrincipalName the userPrincipalName value to set. * @return the UserSessionProperties object itself. */ @@ -84,7 +88,7 @@ public UserSessionProperties withUserPrincipalName(String userPrincipalName) { /** * Get the applicationType property: Application type of application. - * + * * @return the applicationType value. */ public ApplicationType applicationType() { @@ -93,7 +97,7 @@ public ApplicationType applicationType() { /** * Set the applicationType property: Application type of application. - * + * * @param applicationType the applicationType value to set. * @return the UserSessionProperties object itself. */ @@ -104,7 +108,7 @@ public UserSessionProperties withApplicationType(ApplicationType applicationType /** * Get the sessionState property: State of user session. - * + * * @return the sessionState value. */ public SessionState sessionState() { @@ -113,7 +117,7 @@ public SessionState sessionState() { /** * Set the sessionState property: State of user session. - * + * * @param sessionState the sessionState value to set. * @return the UserSessionProperties object itself. */ @@ -124,7 +128,7 @@ public UserSessionProperties withSessionState(SessionState sessionState) { /** * Get the activeDirectoryUsername property: The active directory user name. - * + * * @return the activeDirectoryUsername value. */ public String activeDirectoryUsername() { @@ -133,7 +137,7 @@ public String activeDirectoryUsername() { /** * Set the activeDirectoryUsername property: The active directory user name. - * + * * @param activeDirectoryUsername the activeDirectoryUsername value to set. * @return the UserSessionProperties object itself. */ @@ -144,7 +148,7 @@ public UserSessionProperties withActiveDirectoryUsername(String activeDirectoryU /** * Get the createTime property: The timestamp of the user session create. - * + * * @return the createTime value. */ public OffsetDateTime createTime() { @@ -153,7 +157,7 @@ public OffsetDateTime createTime() { /** * Set the createTime property: The timestamp of the user session create. - * + * * @param createTime the createTime value to set. * @return the UserSessionProperties object itself. */ @@ -164,7 +168,7 @@ public UserSessionProperties withCreateTime(OffsetDateTime createTime) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceInner.java index 6af070c09a8f..61271c8a4e61 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 @@ -5,7 +5,6 @@ package com.azure.resourcemanager.desktopvirtualization.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; @@ -16,86 +15,89 @@ import java.util.List; import java.util.Map; -/** Represents a Workspace definition. */ +/** + * Represents a Workspace definition. + */ @Fluent public final class WorkspaceInner extends ResourceModelWithAllowedPropertySet { - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - /* * Detailed properties for Workspace */ @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. - * - * @return the systemData value. + * Creates an instance of WorkspaceInner class. */ - public SystemData systemData() { - return this.systemData; + public WorkspaceInner() { } /** * Get the innerProperties property: Detailed properties for Workspace. - * + * * @return the innerProperties value. */ private WorkspaceProperties innerProperties() { return this.innerProperties; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withManagedBy(String managedBy) { super.withManagedBy(managedBy); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withKind(String kind) { super.withKind(kind); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withIdentity(ResourceModelWithAllowedPropertySetIdentity identity) { super.withIdentity(identity); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withSku(ResourceModelWithAllowedPropertySetSku sku) { super.withSku(sku); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withPlan(ResourceModelWithAllowedPropertySetPlan plan) { super.withPlan(plan); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public WorkspaceInner withTags(Map tags) { super.withTags(tags); @@ -104,7 +106,7 @@ public WorkspaceInner withTags(Map tags) { /** * Get the objectId property: ObjectId of Workspace. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -113,7 +115,7 @@ public String objectId() { /** * Get the description property: Description of Workspace. - * + * * @return the description value. */ public String description() { @@ -122,7 +124,7 @@ public String description() { /** * Set the description property: Description of Workspace. - * + * * @param description the description value to set. * @return the WorkspaceInner object itself. */ @@ -136,7 +138,7 @@ public WorkspaceInner withDescription(String description) { /** * Get the friendlyName property: Friendly name of Workspace. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -145,7 +147,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Workspace. - * + * * @param friendlyName the friendlyName value to set. * @return the WorkspaceInner object itself. */ @@ -159,7 +161,7 @@ public WorkspaceInner withFriendlyName(String friendlyName) { /** * Get the applicationGroupReferences property: List of applicationGroup resource Ids. - * + * * @return the applicationGroupReferences value. */ public List applicationGroupReferences() { @@ -168,7 +170,7 @@ public List applicationGroupReferences() { /** * Set the applicationGroupReferences property: List of applicationGroup resource Ids. - * + * * @param applicationGroupReferences the applicationGroupReferences value to set. * @return the WorkspaceInner object itself. */ @@ -182,7 +184,7 @@ public WorkspaceInner withApplicationGroupReferences(List applicationGro /** * Get the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ public Boolean cloudPcResource() { @@ -192,7 +194,7 @@ public Boolean cloudPcResource() { /** * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { @@ -202,7 +204,7 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspaceInner object itself. */ @@ -217,7 +219,7 @@ public WorkspaceInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkA /** * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified * resource. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -226,7 +228,7 @@ public List privateEndpointConnections() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 4ec700cac29a..73daddaf28ff 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Workspace properties that can be patched. */ +/** + * Workspace properties that can be patched. + */ @Fluent public final class WorkspacePatchProperties { /* @@ -36,13 +38,15 @@ public final class WorkspacePatchProperties { @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; - /** Creates an instance of WorkspacePatchProperties class. */ + /** + * Creates an instance of WorkspacePatchProperties class. + */ public WorkspacePatchProperties() { } /** * Get the description property: Description of Workspace. - * + * * @return the description value. */ public String description() { @@ -51,7 +55,7 @@ public String description() { /** * Set the description property: Description of Workspace. - * + * * @param description the description value to set. * @return the WorkspacePatchProperties object itself. */ @@ -62,7 +66,7 @@ public WorkspacePatchProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of Workspace. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -71,7 +75,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Workspace. - * + * * @param friendlyName the friendlyName value to set. * @return the WorkspacePatchProperties object itself. */ @@ -82,7 +86,7 @@ public WorkspacePatchProperties withFriendlyName(String friendlyName) { /** * Get the applicationGroupReferences property: List of applicationGroup links. - * + * * @return the applicationGroupReferences value. */ public List applicationGroupReferences() { @@ -91,7 +95,7 @@ public List applicationGroupReferences() { /** * Set the applicationGroupReferences property: List of applicationGroup links. - * + * * @param applicationGroupReferences the applicationGroupReferences value to set. * @return the WorkspacePatchProperties object itself. */ @@ -102,7 +106,7 @@ public WorkspacePatchProperties withApplicationGroupReferences(List appl /** * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { @@ -111,7 +115,7 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspacePatchProperties object itself. */ @@ -122,7 +126,7 @@ public WorkspacePatchProperties withPublicNetworkAccess(PublicNetworkAccess publ /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/WorkspaceProperties.java index aec93ac5b3cd..f07c7c731313 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Schema for Workspace properties. */ +/** + * Schema for Workspace properties. + */ @Fluent public final class WorkspaceProperties { /* @@ -44,8 +46,7 @@ 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; @@ -56,13 +57,15 @@ public final class WorkspaceProperties { @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) private List privateEndpointConnections; - /** Creates an instance of WorkspaceProperties class. */ + /** + * Creates an instance of WorkspaceProperties class. + */ public WorkspaceProperties() { } /** * Get the objectId property: ObjectId of Workspace. (internal use). - * + * * @return the objectId value. */ public String objectId() { @@ -71,7 +74,7 @@ public String objectId() { /** * Get the description property: Description of Workspace. - * + * * @return the description value. */ public String description() { @@ -80,7 +83,7 @@ public String description() { /** * Set the description property: Description of Workspace. - * + * * @param description the description value to set. * @return the WorkspaceProperties object itself. */ @@ -91,7 +94,7 @@ public WorkspaceProperties withDescription(String description) { /** * Get the friendlyName property: Friendly name of Workspace. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -100,7 +103,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Workspace. - * + * * @param friendlyName the friendlyName value to set. * @return the WorkspaceProperties object itself. */ @@ -111,7 +114,7 @@ public WorkspaceProperties withFriendlyName(String friendlyName) { /** * Get the applicationGroupReferences property: List of applicationGroup resource Ids. - * + * * @return the applicationGroupReferences value. */ public List applicationGroupReferences() { @@ -120,7 +123,7 @@ public List applicationGroupReferences() { /** * Set the applicationGroupReferences property: List of applicationGroup resource Ids. - * + * * @param applicationGroupReferences the applicationGroupReferences value to set. * @return the WorkspaceProperties object itself. */ @@ -131,7 +134,7 @@ public WorkspaceProperties withApplicationGroupReferences(List applicati /** * Get the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ public Boolean cloudPcResource() { @@ -141,7 +144,7 @@ public Boolean cloudPcResource() { /** * Get the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { @@ -151,7 +154,7 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspaceProperties object itself. */ @@ -163,7 +166,7 @@ public WorkspaceProperties withPublicNetworkAccess(PublicNetworkAccess publicNet /** * Get the privateEndpointConnections property: List of private endpoint connection associated with the specified * resource. - * + * * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { @@ -172,7 +175,7 @@ public List privateEndpointConnections() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/package-info.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/package-info.java index 54e0b1a1a656..ee25116a1bbf 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/package-info.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for DesktopVirtualizationApiClient. null. */ +/** + * Package containing the inner data models for DesktopVirtualizationApiClient. + * null. + */ package com.azure.resourcemanager.desktopvirtualization.fluent.models; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/package-info.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/package-info.java index fd55e7d10125..5637a294910c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/package-info.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for DesktopVirtualizationApiClient. null. */ +/** + * Package containing the service clients for DesktopVirtualizationApiClient. + * null. + */ package com.azure.resourcemanager.desktopvirtualization.fluent; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageImpl.java new file mode 100644 index 000000000000..1cc118040ec9 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageImpl.java @@ -0,0 +1,180 @@ +// Copyright (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.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackage; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackagePatch; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackagePatchProperties; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageProperties; +import java.util.Collections; +import java.util.Map; + +public final class AppAttachPackageImpl + implements AppAttachPackage, AppAttachPackage.Definition, AppAttachPackage.Update { + private AppAttachPackageInner 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 String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public AppAttachPackageProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AppAttachPackageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String appAttachPackageName; + + private AppAttachPackagePatch updateAppAttachPackagePatch; + + public AppAttachPackageImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public AppAttachPackage create() { + this.innerObject = serviceManager.serviceClient() + .getAppAttachPackages() + .createOrUpdateWithResponse(resourceGroupName, appAttachPackageName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public AppAttachPackage create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAppAttachPackages() + .createOrUpdateWithResponse(resourceGroupName, appAttachPackageName, this.innerModel(), context) + .getValue(); + return this; + } + + AppAttachPackageImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerObject = new AppAttachPackageInner(); + this.serviceManager = serviceManager; + this.appAttachPackageName = name; + } + + public AppAttachPackageImpl update() { + this.updateAppAttachPackagePatch = new AppAttachPackagePatch(); + return this; + } + + public AppAttachPackage apply() { + this.innerObject = serviceManager.serviceClient() + .getAppAttachPackages() + .updateWithResponse(resourceGroupName, appAttachPackageName, updateAppAttachPackagePatch, Context.NONE) + .getValue(); + return this; + } + + public AppAttachPackage apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAppAttachPackages() + .updateWithResponse(resourceGroupName, appAttachPackageName, updateAppAttachPackagePatch, context) + .getValue(); + return this; + } + + AppAttachPackageImpl(AppAttachPackageInner innerObject, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.appAttachPackageName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "appAttachPackages"); + } + + public AppAttachPackage refresh() { + this.innerObject = serviceManager.serviceClient() + .getAppAttachPackages() + .getByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, Context.NONE) + .getValue(); + return this; + } + + public AppAttachPackage refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getAppAttachPackages() + .getByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, context) + .getValue(); + return this; + } + + public AppAttachPackageImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AppAttachPackageImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AppAttachPackageImpl withProperties(AppAttachPackageProperties properties) { + this.innerModel().withProperties(properties); + return this; + } + + public AppAttachPackageImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public AppAttachPackageImpl withProperties(AppAttachPackagePatchProperties properties) { + this.updateAppAttachPackagePatch.withProperties(properties); + return this; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesClientImpl.java new file mode 100644 index 000000000000..b9833c9928dc --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesClientImpl.java @@ -0,0 +1,312 @@ +// Copyright (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.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +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.AppAttachPackageInfoesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageList; +import com.azure.resourcemanager.desktopvirtualization.models.ImportPackageInfoRequest; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AppAttachPackageInfoesClient. + */ +public final class AppAttachPackageInfoesClientImpl implements AppAttachPackageInfoesClient { + /** + * The proxy service used to perform REST calls. + */ + private final AppAttachPackageInfoesService service; + + /** + * The service client containing this operation class. + */ + private final DesktopVirtualizationApiClientImpl client; + + /** + * Initializes an instance of AppAttachPackageInfoesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AppAttachPackageInfoesClientImpl(DesktopVirtualizationApiClientImpl client) { + this.service = RestProxy.create(AppAttachPackageInfoesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DesktopVirtualizationApiClientAppAttachPackageInfoes to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DesktopVirtualizatio") + public interface AppAttachPackageInfoesService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/importAppAttachPackageInfo") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> importMethod(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @BodyParam("application/json") ImportPackageInfoRequest importPackageInfoRequest, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> importMethodNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> importMethodSinglePageAsync(String resourceGroupName, + String hostPoolName, ImportPackageInfoRequest importPackageInfoRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (importPackageInfoRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter importPackageInfoRequest is required and cannot be null.")); + } else { + importPackageInfoRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.importMethod(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, importPackageInfoRequest, 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())); + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> importMethodSinglePageAsync(String resourceGroupName, + String hostPoolName, ImportPackageInfoRequest importPackageInfoRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); + } + if (importPackageInfoRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter importPackageInfoRequest is required and cannot be null.")); + } else { + importPackageInfoRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .importMethod(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, importPackageInfoRequest, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux importMethodAsync(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest) { + return new PagedFlux<>( + () -> importMethodSinglePageAsync(resourceGroupName, hostPoolName, importPackageInfoRequest), + nextLink -> importMethodNextSinglePageAsync(nextLink)); + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux importMethodAsync(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest, Context context) { + return new PagedFlux<>( + () -> importMethodSinglePageAsync(resourceGroupName, hostPoolName, importPackageInfoRequest, context), + nextLink -> importMethodNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest) { + return new PagedIterable<>(importMethodAsync(resourceGroupName, hostPoolName, importPackageInfoRequest)); + } + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest, Context context) { + return new PagedIterable<>( + importMethodAsync(resourceGroupName, hostPoolName, importPackageInfoRequest, 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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> importMethodNextSinglePageAsync(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.importMethodNext(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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> importMethodNextSinglePageAsync(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.importMethodNext(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/AppAttachPackageInfoesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesImpl.java new file mode 100644 index 000000000000..69b5dc6355d2 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.fluent.AppAttachPackageInfoesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackage; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageInfoes; +import com.azure.resourcemanager.desktopvirtualization.models.ImportPackageInfoRequest; + +public final class AppAttachPackageInfoesImpl implements AppAttachPackageInfoes { + private static final ClientLogger LOGGER = new ClientLogger(AppAttachPackageInfoesImpl.class); + + private final AppAttachPackageInfoesClient innerClient; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + public AppAttachPackageInfoesImpl(AppAttachPackageInfoesClient innerClient, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest) { + PagedIterable inner + = this.serviceClient().importMethod(resourceGroupName, hostPoolName, importPackageInfoRequest); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest, Context context) { + PagedIterable inner + = this.serviceClient().importMethod(resourceGroupName, hostPoolName, importPackageInfoRequest, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + private AppAttachPackageInfoesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackagesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackagesClientImpl.java new file mode 100644 index 000000000000..46049b5b9cc1 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackagesClientImpl.java @@ -0,0 +1,1063 @@ +// Copyright (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.AppAttachPackagesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageList; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackagePatch; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AppAttachPackagesClient. + */ +public final class AppAttachPackagesClientImpl implements AppAttachPackagesClient { + /** + * The proxy service used to perform REST calls. + */ + private final AppAttachPackagesService service; + + /** + * The service client containing this operation class. + */ + private final DesktopVirtualizationApiClientImpl client; + + /** + * Initializes an instance of AppAttachPackagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AppAttachPackagesClientImpl(DesktopVirtualizationApiClientImpl client) { + this.service + = RestProxy.create(AppAttachPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for DesktopVirtualizationApiClientAppAttachPackages to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "DesktopVirtualizatio") + public interface AppAttachPackagesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("appAttachPackageName") String appAttachPackageName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("appAttachPackageName") String appAttachPackageName, + @BodyParam("application/json") AppAttachPackageInner appAttachPackage, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}") + @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("appAttachPackageName") String appAttachPackageName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages/{appAttachPackageName}") + @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("appAttachPackageName") String appAttachPackageName, + @BodyParam("application/json") AppAttachPackagePatch appAttachPackagePatch, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/appAttachPackages") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/appAttachPackages") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app attach package along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String appAttachPackageName) { + 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appAttachPackageName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app attach package along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String appAttachPackageName, 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appAttachPackageName, accept, context); + } + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app attach package on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getByResourceGroupAsync(String resourceGroupName, String appAttachPackageName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, appAttachPackageName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app attach package along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, + String appAttachPackageName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, appAttachPackageName, context).block(); + } + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app attach package. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppAttachPackageInner getByResourceGroup(String resourceGroupName, String appAttachPackageName) { + return getByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, Context.NONE).getValue(); + } + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String appAttachPackageName, AppAttachPackageInner appAttachPackage) { + 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName is required and cannot be null.")); + } + if (appAttachPackage == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackage is required and cannot be null.")); + } else { + appAttachPackage.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appAttachPackageName, appAttachPackage, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String appAttachPackageName, AppAttachPackageInner appAttachPackage, 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName is required and cannot be null.")); + } + if (appAttachPackage == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackage is required and cannot be null.")); + } else { + appAttachPackage.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appAttachPackageName, appAttachPackage, accept, + context); + } + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateAsync(String resourceGroupName, String appAttachPackageName, + AppAttachPackageInner appAttachPackage) { + return createOrUpdateWithResponseAsync(resourceGroupName, appAttachPackageName, appAttachPackage) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String appAttachPackageName, AppAttachPackageInner appAttachPackage, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, appAttachPackageName, appAttachPackage, context) + .block(); + } + + /** + * Create or update an App Attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackage Object containing App Attach 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 App Attach Package properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppAttachPackageInner createOrUpdate(String resourceGroupName, String appAttachPackageName, + AppAttachPackageInner appAttachPackage) { + return createOrUpdateWithResponse(resourceGroupName, appAttachPackageName, appAttachPackage, Context.NONE) + .getValue(); + } + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteWithResponseAsync(String resourceGroupName, String appAttachPackageName) { + 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName 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, appAttachPackageName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 appAttachPackageName, + 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName 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, appAttachPackageName, accept, context); + } + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 appAttachPackageName) { + return deleteWithResponseAsync(resourceGroupName, appAttachPackageName).flatMap(ignored -> Mono.empty()); + } + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 appAttachPackageName, Context context) { + return deleteWithResponseAsync(resourceGroupName, appAttachPackageName, context).block(); + } + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 appAttachPackageName) { + deleteWithResponse(resourceGroupName, appAttachPackageName, Context.NONE); + } + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackagePatch Object containing App Attach Package definition. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Attach Package properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateWithResponseAsync(String resourceGroupName, + String appAttachPackageName, AppAttachPackagePatch appAttachPackagePatch) { + 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName is required and cannot be null.")); + } + if (appAttachPackagePatch != null) { + appAttachPackagePatch.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, appAttachPackageName, appAttachPackagePatch, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackagePatch Object containing App Attach Package definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Attach Package properties along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, + String appAttachPackageName, AppAttachPackagePatch appAttachPackagePatch, 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 (appAttachPackageName == null) { + return Mono + .error(new IllegalArgumentException("Parameter appAttachPackageName is required and cannot be null.")); + } + if (appAttachPackagePatch != null) { + appAttachPackagePatch.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, appAttachPackageName, appAttachPackagePatch, accept, context); + } + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Attach Package properties on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateAsync(String resourceGroupName, String appAttachPackageName) { + final AppAttachPackagePatch appAttachPackagePatch = null; + return updateWithResponseAsync(resourceGroupName, appAttachPackageName, appAttachPackagePatch) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param appAttachPackagePatch Object containing App Attach Package definition. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Attach Package properties along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String appAttachPackageName, + AppAttachPackagePatch appAttachPackagePatch, Context context) { + return updateWithResponseAsync(resourceGroupName, appAttachPackageName, appAttachPackagePatch, context).block(); + } + + /** + * Update an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Attach Package properties. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppAttachPackageInner update(String resourceGroupName, String appAttachPackageName) { + final AppAttachPackagePatch appAttachPackagePatch = null; + return updateWithResponse(resourceGroupName, appAttachPackageName, appAttachPackagePatch, Context.NONE) + .getValue(); + } + + /** + * List App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and host pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, 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 App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and 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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and host pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List App Attach packages in resource group. + * + * @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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final String filter = null; + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and 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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List App Attach packages in resource group. + * + * @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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final String filter = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter)); + } + + /** + * List App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, context)); + } + + /** + * List App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String filter) { + 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, 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 App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String filter, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), filter, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync(String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(filter), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List App Attach packages 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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listAsync() { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(filter), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(filter, context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List App Attach packages 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String filter = null; + return new PagedIterable<>(listAsync(filter)); + } + + /** + * List App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String filter, Context context) { + return new PagedIterable<>(listAsync(filter, 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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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 appAttachPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(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/AppAttachPackagesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackagesImpl.java new file mode 100644 index 000000000000..42bd35b4e26e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackagesImpl.java @@ -0,0 +1,149 @@ +// Copyright (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.AppAttachPackagesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackage; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackages; + +public final class AppAttachPackagesImpl implements AppAttachPackages { + private static final ClientLogger LOGGER = new ClientLogger(AppAttachPackagesImpl.class); + + private final AppAttachPackagesClient innerClient; + + private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; + + public AppAttachPackagesImpl(AppAttachPackagesClient innerClient, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, + String appAttachPackageName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AppAttachPackageImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AppAttachPackage getByResourceGroup(String resourceGroupName, String appAttachPackageName) { + AppAttachPackageInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, appAttachPackageName); + if (inner != null) { + return new AppAttachPackageImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String appAttachPackageName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, appAttachPackageName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String appAttachPackageName) { + this.serviceClient().delete(resourceGroupName, appAttachPackageName); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Context context) { + PagedIterable inner = this.serviceClient().list(filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public AppAttachPackage getById(String id) { + String resourceGroupName = ResourceManagerUtils.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 appAttachPackageName = ResourceManagerUtils.getValueFromIdByName(id, "appAttachPackages"); + if (appAttachPackageName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'appAttachPackages'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 appAttachPackageName = ResourceManagerUtils.getValueFromIdByName(id, "appAttachPackages"); + if (appAttachPackageName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'appAttachPackages'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.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 appAttachPackageName = ResourceManagerUtils.getValueFromIdByName(id, "appAttachPackages"); + if (appAttachPackageName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'appAttachPackages'.", id))); + } + this.deleteByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.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 appAttachPackageName = ResourceManagerUtils.getValueFromIdByName(id, "appAttachPackages"); + if (appAttachPackageName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'appAttachPackages'.", id))); + } + return this.deleteByResourceGroupWithResponse(resourceGroupName, appAttachPackageName, context); + } + + private AppAttachPackagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager() { + return this.serviceManager; + } + + public AppAttachPackageImpl define(String name) { + return new AppAttachPackageImpl(name, this.manager()); + } +} 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 b65a7681c141..cc8e13059c96 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 @@ -140,27 +140,23 @@ public ApplicationGroupImpl withExistingResourceGroup(String resourceGroupName) } public ApplicationGroup create() { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationGroups() - .createOrUpdateWithResponse(resourceGroupName, applicationGroupName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplicationGroups() + .createOrUpdateWithResponse(resourceGroupName, applicationGroupName, this.innerModel(), Context.NONE) + .getValue(); return this; } public ApplicationGroup create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationGroups() - .createOrUpdateWithResponse(resourceGroupName, applicationGroupName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplicationGroups() + .createOrUpdateWithResponse(resourceGroupName, applicationGroupName, this.innerModel(), context) + .getValue(); return this; } - ApplicationGroupImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + ApplicationGroupImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new ApplicationGroupInner(); this.serviceManager = serviceManager; this.applicationGroupName = name; @@ -172,51 +168,42 @@ public ApplicationGroupImpl update() { } public ApplicationGroup apply() { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationGroups() - .updateWithResponse(resourceGroupName, applicationGroupName, updateApplicationGroup, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplicationGroups() + .updateWithResponse(resourceGroupName, applicationGroupName, updateApplicationGroup, Context.NONE) + .getValue(); return this; } public ApplicationGroup apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationGroups() - .updateWithResponse(resourceGroupName, applicationGroupName, updateApplicationGroup, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplicationGroups() + .updateWithResponse(resourceGroupName, applicationGroupName, updateApplicationGroup, context) + .getValue(); return this; } - ApplicationGroupImpl( - ApplicationGroupInner innerObject, + ApplicationGroupImpl(ApplicationGroupInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.applicationGroupName = Utils.getValueFromIdByName(innerObject.id(), "applicationGroups"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.applicationGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applicationGroups"); } public ApplicationGroup refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationGroups() - .getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplicationGroups() + .getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, Context.NONE) + .getValue(); return this; } public ApplicationGroup refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplicationGroups() - .getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplicationGroups() + .getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, context) + .getValue(); return this; } 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 3235d74bac9c..a1a126236add 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 @@ -35,22 +35,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in ApplicationGroupsClient. + */ public final class ApplicationGroupsClientImpl implements ApplicationGroupsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ApplicationGroupsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of ApplicationGroupsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ApplicationGroupsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(ApplicationGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ApplicationGroupsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,117 +67,86 @@ public final class ApplicationGroupsClientImpl implements ApplicationGroupsClien @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface ApplicationGroupsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("applicationGroupName") String applicationGroupName, - @HeaderParam("Accept") String accept, + @PathParam("applicationGroupName") String applicationGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, - @BodyParam("application/json") ApplicationGroupInner applicationGroup, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationGroupInner applicationGroup, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("applicationGroupName") String applicationGroupName, - @HeaderParam("Accept") String accept, + @PathParam("applicationGroupName") String applicationGroupName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, - @BodyParam("application/json") ApplicationGroupPatch applicationGroup, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationGroupPatch applicationGroup, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @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); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @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); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/applicationGroups") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,19 +155,15 @@ Mono> listBySubscriptionNext( * @return an application group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String applicationGroupName) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String applicationGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -204,23 +175,14 @@ public Mono> getByResourceGroupWithResponseAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -230,19 +192,15 @@ public Mono> getByResourceGroupWithResponseAsync * @return an application group along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String applicationGroupName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String applicationGroupName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -254,20 +212,13 @@ private Mono> getByResourceGroupWithResponseAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,7 +234,7 @@ public Mono getByResourceGroupAsync(String resourceGroupN /** * 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. @@ -293,14 +244,14 @@ public Mono getByResourceGroupAsync(String resourceGroupN * @return an application group along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String applicationGroupName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, applicationGroupName, context).block(); } /** * 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. @@ -315,30 +266,26 @@ public ApplicationGroupInner getByResourceGroup(String resourceGroupName, String /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 represents a ApplicationGroup definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String applicationGroupName, ApplicationGroupInner applicationGroup) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -356,24 +303,15 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationGroup, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationGroup, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -381,26 +319,19 @@ public Mono> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 represents a ApplicationGroup definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupInner applicationGroup, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String applicationGroupName, ApplicationGroupInner applicationGroup, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -418,21 +349,14 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationGroup, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationGroup, accept, + context); } /** * 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. @@ -442,15 +366,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a ApplicationGroup definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { + public Mono createOrUpdateAsync(String resourceGroupName, String applicationGroupName, + ApplicationGroupInner applicationGroup) { return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -461,18 +385,15 @@ public Mono createOrUpdateAsync( * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupInner applicationGroup, - Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, + String applicationGroupName, ApplicationGroupInner applicationGroup, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context) .block(); } /** * 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. @@ -482,15 +403,15 @@ public Response createOrUpdateWithResponse( * @return represents a ApplicationGroup definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationGroupInner createOrUpdate( - String resourceGroupName, String applicationGroupName, ApplicationGroupInner applicationGroup) { + public ApplicationGroupInner createOrUpdate(String resourceGroupName, String applicationGroupName, + ApplicationGroupInner applicationGroup) { return createOrUpdateWithResponse(resourceGroupName, applicationGroupName, applicationGroup, Context.NONE) .getValue(); } /** * 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. @@ -501,16 +422,12 @@ public ApplicationGroupInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -522,23 +439,14 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -548,19 +456,15 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String applicationGroupName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -572,20 +476,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, accept, 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. @@ -600,7 +497,7 @@ public Mono deleteAsync(String resourceGroupName, String applicationGroupN /** * 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. @@ -616,7 +513,7 @@ public Response deleteWithResponse(String resourceGroupName, String applic /** * 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. @@ -630,30 +527,26 @@ public void delete(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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 represents a ApplicationGroup definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, ApplicationGroupPatch applicationGroup) { + public Mono> updateWithResponseAsync(String resourceGroupName, + String applicationGroupName, ApplicationGroupPatch applicationGroup) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -668,24 +561,15 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationGroup, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationGroup, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -693,26 +577,19 @@ public Mono> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 represents a ApplicationGroup definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupPatch applicationGroup, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String applicationGroupName, ApplicationGroupPatch applicationGroup, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -727,21 +604,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationGroup, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, applicationGroup, accept, context); } /** * 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. @@ -758,7 +627,7 @@ public Mono updateAsync(String resourceGroupName, String /** * 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. @@ -769,17 +638,14 @@ public Mono updateAsync(String resourceGroupName, String * @return represents a ApplicationGroup definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - ApplicationGroupPatch applicationGroup, - Context context) { + public Response updateWithResponse(String resourceGroupName, String applicationGroupName, + ApplicationGroupPatch applicationGroup, Context context) { return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationGroup, context).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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -795,7 +661,7 @@ public ApplicationGroupInner update(String resourceGroupName, String application /** * List applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -807,19 +673,15 @@ public ApplicationGroupInner update(String resourceGroupName, String application * @return applicationGroupList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -827,35 +689,17 @@ private Mono> listByResourceGroupSinglePage } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - filter, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, 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 applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -868,24 +712,15 @@ private Mono> listByResourceGroupSinglePage * @return applicationGroupList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String filter, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -894,31 +729,16 @@ private Mono> listByResourceGroupSinglePage final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - filter, - pageSize, - isDescending, - initialSkip, - accept, + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, filter, pageSize, isDescending, initialSkip, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -930,8 +750,8 @@ private Mono> listByResourceGroupSinglePage * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync( - String resourceGroupName, String filter, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); @@ -939,7 +759,7 @@ public PagedFlux listByResourceGroupAsync( /** * List applicationGroups. - * + * * @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. @@ -959,7 +779,7 @@ public PagedFlux listByResourceGroupAsync(String resource /** * List applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -972,23 +792,15 @@ public PagedFlux listByResourceGroupAsync(String resource * @return applicationGroupList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - return new PagedFlux<>( - () -> - listByResourceGroupSinglePageAsync( - resourceGroupName, filter, pageSize, isDescending, initialSkip, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, pageSize, + isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * List applicationGroups. - * + * * @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. @@ -1007,7 +819,7 @@ public PagedIterable listByResourceGroup(String resourceG /** * List applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -1020,20 +832,15 @@ public PagedIterable listByResourceGroup(String resourceG * @return applicationGroupList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedIterable<>( listByResourceGroupAsync(resourceGroupName, filter, pageSize, isDescending, initialSkip, 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 ManagementException thrown if the request is rejected by server. @@ -1043,44 +850,25 @@ public PagedIterable listByResourceGroup( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), filter, 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 applicationGroups in subscription. - * + * * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1091,41 +879,25 @@ private Mono> listSinglePageAsync(String fi @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), filter, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List applicationGroups in subscription. - * + * * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1134,13 +906,13 @@ private Mono> listSinglePageAsync(String fi */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(String filter) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List applicationGroups 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 applicationGroupList as paginated response with {@link PagedFlux}. @@ -1148,13 +920,13 @@ public PagedFlux listAsync(String filter) { @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { final String filter = null; - return new PagedFlux<>( - () -> listSinglePageAsync(filter), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(filter), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List applicationGroups in subscription. - * + * * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1164,14 +936,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter, context), + return new PagedFlux<>(() -> listSinglePageAsync(filter, context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * List applicationGroups 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 applicationGroupList as paginated response with {@link PagedIterable}. @@ -1184,7 +955,7 @@ public PagedIterable list() { /** * List applicationGroups in subscription. - * + * * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1199,9 +970,10 @@ public PagedIterable list(String filter, Context context) /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1213,32 +985,24 @@ private Mono> listByResourceGroupNextSingle 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.")); + 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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1246,37 +1010,28 @@ private Mono> listByResourceGroupNextSingle * @return applicationGroupList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(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.")); + 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 - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1288,32 +1043,24 @@ private Mono> listBySubscriptionNextSingleP 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.")); + 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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1321,29 +1068,19 @@ private Mono> listBySubscriptionNextSingleP * @return applicationGroupList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(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.")); + 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 - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(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/ApplicationGroupsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationGroupsImpl.java index b9289db001ba..d232201e4827 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 @@ -21,22 +21,18 @@ public final class ApplicationGroupsImpl implements ApplicationGroups { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public ApplicationGroupsImpl( - ApplicationGroupsClient innerClient, + public ApplicationGroupsImpl(ApplicationGroupsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String applicationGroupName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationGroupImpl(inner.getValue(), this.manager())); } else { return null; @@ -52,8 +48,8 @@ public ApplicationGroup getByResourceGroup(String resourceGroupName, String appl } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String applicationGroupName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, applicationGroupName, context); } @@ -63,113 +59,78 @@ public void deleteByResourceGroup(String resourceGroupName, String applicationGr public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); } - public PagedIterable listByResourceGroup( - String resourceGroupName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByResourceGroup(resourceGroupName, filter, pageSize, isDescending, initialSkip, context); - return Utils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); + public PagedIterable listByResourceGroup(String resourceGroupName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = this.serviceClient() + .listByResourceGroup(resourceGroupName, filter, pageSize, isDescending, initialSkip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); } public PagedIterable list(String filter, Context context) { PagedIterable inner = this.serviceClient().list(filter, context); - return Utils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationGroupImpl(inner1, this.manager())); } public ApplicationGroup getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, applicationGroupName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, applicationGroupName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, applicationGroupName, context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationImpl.java index e6928ad4fe64..32a5b21a85ad 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationImpl.java @@ -117,29 +117,25 @@ public ApplicationImpl withExistingApplicationGroup(String resourceGroupName, St } public Application create() { - this.innerObject = - serviceManager - .serviceClient() - .getApplications() - .createOrUpdateWithResponse( - resourceGroupName, applicationGroupName, applicationName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplications() + .createOrUpdateWithResponse(resourceGroupName, applicationGroupName, applicationName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public Application create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplications() - .createOrUpdateWithResponse( - resourceGroupName, applicationGroupName, applicationName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplications() + .createOrUpdateWithResponse(resourceGroupName, applicationGroupName, applicationName, this.innerModel(), + context) + .getValue(); return this; } - ApplicationImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + ApplicationImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new ApplicationInner(); this.serviceManager = serviceManager; this.applicationName = name; @@ -151,54 +147,44 @@ public ApplicationImpl update() { } public Application apply() { - this.innerObject = - serviceManager - .serviceClient() - .getApplications() - .updateWithResponse( - resourceGroupName, applicationGroupName, applicationName, updateApplication, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplications() + .updateWithResponse(resourceGroupName, applicationGroupName, applicationName, updateApplication, + Context.NONE) + .getValue(); return this; } public Application apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplications() - .updateWithResponse( - resourceGroupName, applicationGroupName, applicationName, updateApplication, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplications() + .updateWithResponse(resourceGroupName, applicationGroupName, applicationName, updateApplication, context) + .getValue(); return this; } - ApplicationImpl( - ApplicationInner innerObject, + ApplicationImpl(ApplicationInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.applicationGroupName = Utils.getValueFromIdByName(innerObject.id(), "applicationGroups"); - this.applicationName = Utils.getValueFromIdByName(innerObject.id(), "applications"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.applicationGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applicationGroups"); + this.applicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applications"); } public Application refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getApplications() - .getWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplications() + .getWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE) + .getValue(); return this; } public Application refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getApplications() - .getWithResponse(resourceGroupName, applicationGroupName, applicationName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getApplications() + .getWithResponse(resourceGroupName, applicationGroupName, applicationName, context) + .getValue(); return this; } 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 dab884f6e54e..a8a2844e7bc6 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 @@ -35,22 +35,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in ApplicationsClient. + */ public final class ApplicationsClientImpl implements ApplicationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ApplicationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of ApplicationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ApplicationsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,99 +67,74 @@ public final class ApplicationsClientImpl implements ApplicationsClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface ApplicationsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, - @PathParam("applicationName") String applicationName, - @HeaderParam("Accept") String accept, + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, @PathParam("applicationName") String applicationName, - @BodyParam("application/json") ApplicationInner application, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInner application, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, - @PathParam("applicationName") String applicationName, - @HeaderParam("Accept") String accept, + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, @PathParam("applicationName") String applicationName, - @BodyParam("application/json") ApplicationPatch application, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationPatch application, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("applicationGroupName") String applicationGroupName, @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, @QueryParam("initialSkip") Integer initialSkip, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * 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. @@ -163,19 +144,15 @@ Mono> listNext( * @return an application along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName) { + public Mono> getWithResponseAsync(String resourceGroupName, String applicationGroupName, + String applicationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -190,25 +167,14 @@ public Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter applicationName 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, - applicationGroupName, - applicationName, - accept, - context)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -219,19 +185,15 @@ public Mono> getWithResponseAsync( * @return an application along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String applicationGroupName, + String applicationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -247,21 +209,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, applicationName, accept, context); } /** * 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. @@ -271,15 +225,15 @@ private Mono> getWithResponseAsync( * @return an application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String applicationGroupName, String applicationName) { + public Mono getAsync(String resourceGroupName, String applicationGroupName, + String applicationName) { return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -290,14 +244,14 @@ public Mono getAsync( * @return an application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + public Response getWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, Context context) { return getWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); } /** * 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. @@ -313,7 +267,7 @@ public ApplicationInner get(String resourceGroupName, String applicationGroupNam /** * 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. @@ -324,19 +278,15 @@ public ApplicationInner get(String resourceGroupName, String applicationGroupNam * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String applicationGroupName, String applicationName, ApplicationInner application) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -357,25 +307,15 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationName, - application, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationName, application, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -387,23 +327,15 @@ public Mono> createOrUpdateWithResponseAsync( * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationInner application, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String applicationGroupName, String applicationName, ApplicationInner application, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -424,22 +356,14 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationName, - application, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationName, application, + accept, 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. @@ -450,15 +374,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return schema for Application properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { + public Mono createOrUpdateAsync(String resourceGroupName, String applicationGroupName, + String applicationName, ApplicationInner application) { return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -470,20 +394,15 @@ public Mono createOrUpdateAsync( * @return schema for Application properties along with {@link Response}. */ @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 Response createOrUpdateWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, ApplicationInner application, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application, + context).block(); } /** * 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. @@ -494,16 +413,15 @@ public Response createOrUpdateWithResponse( * @return schema for Application properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner createOrUpdate( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationInner application) { - return createOrUpdateWithResponse( - resourceGroupName, applicationGroupName, applicationName, application, Context.NONE) - .getValue(); + public ApplicationInner createOrUpdate(String resourceGroupName, String applicationGroupName, + String applicationName, ApplicationInner application) { + return createOrUpdateWithResponse(resourceGroupName, applicationGroupName, applicationName, application, + Context.NONE).getValue(); } /** * 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. @@ -513,19 +431,15 @@ public ApplicationInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName, + String applicationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -540,25 +454,14 @@ public Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter applicationName 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, - applicationGroupName, - applicationName, - accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -569,19 +472,15 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String applicationGroupName, + String applicationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -597,21 +496,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, applicationName, accept, 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. @@ -628,7 +519,7 @@ public Mono deleteAsync(String resourceGroupName, String applicationGroupN /** * 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. @@ -639,14 +530,14 @@ public Mono deleteAsync(String resourceGroupName, String applicationGroupN * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, Context context) { return deleteWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, context).block(); } /** * 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. @@ -661,7 +552,7 @@ public void delete(String resourceGroupName, String applicationGroupName, String /** * 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. @@ -672,19 +563,15 @@ public void delete(String resourceGroupName, String applicationGroupName, String * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String applicationName, ApplicationPatch application) { + public Mono> updateWithResponseAsync(String resourceGroupName, + String applicationGroupName, String applicationName, ApplicationPatch application) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -703,25 +590,15 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationName, - application, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, applicationName, application, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -733,23 +610,15 @@ public Mono> updateWithResponseAsync( * @return schema for Application properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String applicationGroupName, - String applicationName, - ApplicationPatch application, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String applicationGroupName, String applicationName, ApplicationPatch application, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -768,22 +637,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - applicationName, - application, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, applicationName, application, accept, 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. @@ -793,8 +653,8 @@ private Mono> updateWithResponseAsync( * @return schema for Application properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String applicationGroupName, String applicationName) { + 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())); @@ -802,7 +662,7 @@ public Mono updateAsync( /** * 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. @@ -814,19 +674,15 @@ public Mono updateAsync( * @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) { + public Response updateWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, ApplicationPatch application, Context context) { return updateWithResponseAsync(resourceGroupName, applicationGroupName, applicationName, application, context) .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. @@ -844,7 +700,7 @@ public ApplicationInner update(String resourceGroupName, String applicationGroup /** * 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. @@ -856,23 +712,15 @@ public ApplicationInner update(String resourceGroupName, String applicationGroup * @return applicationList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + private Mono> listSinglePageAsync(String resourceGroupName, + String applicationGroupName, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -884,35 +732,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, 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 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. @@ -925,24 +755,15 @@ private Mono> listSinglePageAsync( * @return applicationList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String applicationGroupName, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -955,31 +776,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), 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. @@ -991,12 +796,8 @@ private Mono> listSinglePageAsync( * @return applicationList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + public PagedFlux listAsync(String resourceGroupName, String applicationGroupName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -1004,7 +805,7 @@ public PagedFlux listAsync( /** * List applications. - * + * * @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. @@ -1024,7 +825,7 @@ public PagedFlux listAsync(String resourceGroupName, String ap /** * 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. @@ -1037,23 +838,15 @@ public PagedFlux listAsync(String resourceGroupName, String ap * @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, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, + isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List applications. - * + * * @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. @@ -1072,7 +865,7 @@ public PagedIterable list(String resourceGroupName, String app /** * 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. @@ -1085,22 +878,18 @@ public PagedIterable list(String resourceGroupName, String app * @return applicationList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1112,31 +901,22 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)) + 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. + * + * 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. @@ -1149,23 +929,13 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)); + 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/ApplicationsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ApplicationsImpl.java index acbdfe53b165..d45004c16ea5 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 @@ -21,22 +21,18 @@ public final class ApplicationsImpl implements Applications { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public ApplicationsImpl( - ApplicationsClient innerClient, + public ApplicationsImpl(ApplicationsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, applicationGroupName, applicationName, context); + public Response getWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, applicationGroupName, applicationName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationImpl(inner.getValue(), this.manager())); } else { return null; @@ -52,10 +48,9 @@ public Application get(String resourceGroupName, String applicationGroupName, St } } - public Response deleteWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context) { - return this - .serviceClient() + public Response deleteWithResponse(String resourceGroupName, String applicationGroupName, + String applicationName, Context context) { + return this.serviceClient() .deleteWithResponse(resourceGroupName, applicationGroupName, applicationName, context); } @@ -65,131 +60,88 @@ public void delete(String resourceGroupName, String applicationGroupName, String public PagedIterable list(String resourceGroupName, String applicationGroupName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, applicationGroupName); - return Utils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } - 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 ApplicationImpl(inner1, this.manager())); + 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 ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); } public Application getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } - String applicationName = Utils.getValueFromIdByName(id, "applications"); + String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } return this.getWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } - String applicationName = Utils.getValueFromIdByName(id, "applications"); + String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } return this.getWithResponse(resourceGroupName, applicationGroupName, applicationName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } - String applicationName = Utils.getValueFromIdByName(id, "applications"); + String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } this.deleteWithResponse(resourceGroupName, applicationGroupName, applicationName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String applicationGroupName = Utils.getValueFromIdByName(id, "applicationGroups"); + String applicationGroupName = ResourceManagerUtils.getValueFromIdByName(id, "applicationGroups"); if (applicationGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applicationGroups'.", id))); } - String applicationName = Utils.getValueFromIdByName(id, "applications"); + String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications"); if (applicationName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } return this.deleteWithResponse(resourceGroupName, applicationGroupName, applicationName, context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopImpl.java index 66148437c948..43d2c0d3a5ab 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopImpl.java @@ -13,8 +13,7 @@ public final class DesktopImpl implements Desktop { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - DesktopImpl( - DesktopInner innerObject, + DesktopImpl(DesktopInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 e626cc117f2b..72ab11caf13d 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 @@ -14,17 +14,19 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the DesktopVirtualizationApiClientImpl type. */ -@ServiceClientBuilder(serviceClients = {DesktopVirtualizationApiClientImpl.class}) +/** + * A builder for creating a new instance of the DesktopVirtualizationApiClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { DesktopVirtualizationApiClientImpl.class }) public final class DesktopVirtualizationApiClientBuilder { /* - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The ID of the target subscription. - * + * Sets The ID of the target subscription. The value must be an UUID. + * * @param subscriptionId the subscriptionId value. * @return the DesktopVirtualizationApiClientBuilder. */ @@ -40,7 +42,7 @@ public DesktopVirtualizationApiClientBuilder subscriptionId(String subscriptionI /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the DesktopVirtualizationApiClientBuilder. */ @@ -56,7 +58,7 @@ public DesktopVirtualizationApiClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the DesktopVirtualizationApiClientBuilder. */ @@ -72,7 +74,7 @@ public DesktopVirtualizationApiClientBuilder environment(AzureEnvironment enviro /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the DesktopVirtualizationApiClientBuilder. */ @@ -88,7 +90,7 @@ public DesktopVirtualizationApiClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the DesktopVirtualizationApiClientBuilder. */ @@ -104,7 +106,7 @@ public DesktopVirtualizationApiClientBuilder defaultPollInterval(Duration defaul /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the DesktopVirtualizationApiClientBuilder. */ @@ -115,30 +117,22 @@ public DesktopVirtualizationApiClientBuilder serializerAdapter(SerializerAdapter /** * Builds an instance of DesktopVirtualizationApiClientImpl with the provided parameters. - * + * * @return an instance of DesktopVirtualizationApiClientImpl. */ public DesktopVirtualizationApiClientImpl buildClient() { 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( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + 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(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientImpl.java index d56062c1038a..fe0d2bd66533 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.desktopvirtualization.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -22,10 +23,12 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.desktopvirtualization.fluent.AppAttachPackageInfoesClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.AppAttachPackagesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.ApplicationGroupsClient; import com.azure.resourcemanager.desktopvirtualization.fluent.ApplicationsClient; -import com.azure.resourcemanager.desktopvirtualization.fluent.DesktopVirtualizationApiClient; import com.azure.resourcemanager.desktopvirtualization.fluent.DesktopsClient; +import com.azure.resourcemanager.desktopvirtualization.fluent.DesktopVirtualizationApiClient; import com.azure.resourcemanager.desktopvirtualization.fluent.HostPoolsClient; import com.azure.resourcemanager.desktopvirtualization.fluent.MsixImagesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.MsixPackagesClient; @@ -48,296 +51,365 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the DesktopVirtualizationApiClientImpl type. */ +/** + * Initializes a new instance of the DesktopVirtualizationApiClientImpl type. + */ @ServiceClient(builder = DesktopVirtualizationApiClientBuilder.class) public final class DesktopVirtualizationApiClientImpl implements DesktopVirtualizationApiClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** - * Gets The ID of the target subscription. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The WorkspacesClient object to access its operations. */ + /** + * The WorkspacesClient object to access its operations. + */ private final WorkspacesClient workspaces; /** * Gets the WorkspacesClient object to access its operations. - * + * * @return the WorkspacesClient object. */ public WorkspacesClient getWorkspaces() { return this.workspaces; } - /** The PrivateEndpointConnectionsClient object to access its operations. */ + /** + * 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. */ + /** + * 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. */ + /** + * The ScalingPlansClient object to access its operations. + */ private final ScalingPlansClient scalingPlans; /** * Gets the ScalingPlansClient object to access its operations. - * + * * @return the ScalingPlansClient object. */ public ScalingPlansClient getScalingPlans() { return this.scalingPlans; } - /** The ScalingPlanPooledSchedulesClient object to access its operations. */ + /** + * 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 ScalingPlanPersonalSchedulesClient object to access its operations. */ + /** + * The ScalingPlanPersonalSchedulesClient object to access its operations. + */ private final ScalingPlanPersonalSchedulesClient scalingPlanPersonalSchedules; /** * Gets the ScalingPlanPersonalSchedulesClient object to access its operations. - * + * * @return the ScalingPlanPersonalSchedulesClient object. */ public ScalingPlanPersonalSchedulesClient getScalingPlanPersonalSchedules() { return this.scalingPlanPersonalSchedules; } - /** The ApplicationGroupsClient object to access its operations. */ + /** + * The ApplicationGroupsClient object to access its operations. + */ private final ApplicationGroupsClient applicationGroups; /** * Gets the ApplicationGroupsClient object to access its operations. - * + * * @return the ApplicationGroupsClient object. */ public ApplicationGroupsClient getApplicationGroups() { return this.applicationGroups; } - /** The StartMenuItemsClient object to access its operations. */ + /** + * The StartMenuItemsClient object to access its operations. + */ private final StartMenuItemsClient startMenuItems; /** * Gets the StartMenuItemsClient object to access its operations. - * + * * @return the StartMenuItemsClient object. */ public StartMenuItemsClient getStartMenuItems() { return this.startMenuItems; } - /** The ApplicationsClient object to access its operations. */ + /** + * The ApplicationsClient object to access its operations. + */ private final ApplicationsClient applications; /** * Gets the ApplicationsClient object to access its operations. - * + * * @return the ApplicationsClient object. */ public ApplicationsClient getApplications() { return this.applications; } - /** The DesktopsClient object to access its operations. */ + /** + * The DesktopsClient object to access its operations. + */ private final DesktopsClient desktops; /** * Gets the DesktopsClient object to access its operations. - * + * * @return the DesktopsClient object. */ public DesktopsClient getDesktops() { return this.desktops; } - /** The HostPoolsClient object to access its operations. */ + /** + * The HostPoolsClient object to access its operations. + */ private final HostPoolsClient hostPools; /** * Gets the HostPoolsClient object to access its operations. - * + * * @return the HostPoolsClient object. */ public HostPoolsClient getHostPools() { return this.hostPools; } - /** The UserSessionsClient object to access its operations. */ + /** + * The UserSessionsClient object to access its operations. + */ private final UserSessionsClient userSessions; /** * Gets the UserSessionsClient object to access its operations. - * + * * @return the UserSessionsClient object. */ public UserSessionsClient getUserSessions() { return this.userSessions; } - /** The SessionHostsClient object to access its operations. */ + /** + * The SessionHostsClient object to access its operations. + */ private final SessionHostsClient sessionHosts; /** * Gets the SessionHostsClient object to access its operations. - * + * * @return the SessionHostsClient object. */ public SessionHostsClient getSessionHosts() { return this.sessionHosts; } - /** The MsixPackagesClient object to access its operations. */ + /** + * The MsixPackagesClient object to access its operations. + */ private final MsixPackagesClient msixPackages; /** * Gets the MsixPackagesClient object to access its operations. - * + * * @return the MsixPackagesClient object. */ public MsixPackagesClient getMsixPackages() { return this.msixPackages; } - /** The MsixImagesClient object to access its operations. */ + /** + * The AppAttachPackageInfoesClient object to access its operations. + */ + private final AppAttachPackageInfoesClient appAttachPackageInfoes; + + /** + * Gets the AppAttachPackageInfoesClient object to access its operations. + * + * @return the AppAttachPackageInfoesClient object. + */ + public AppAttachPackageInfoesClient getAppAttachPackageInfoes() { + return this.appAttachPackageInfoes; + } + + /** + * The MsixImagesClient object to access its operations. + */ private final MsixImagesClient msixImages; /** * Gets the MsixImagesClient object to access its operations. - * + * * @return the MsixImagesClient object. */ public MsixImagesClient getMsixImages() { return this.msixImages; } + /** + * The AppAttachPackagesClient object to access its operations. + */ + private final AppAttachPackagesClient appAttachPackages; + + /** + * Gets the AppAttachPackagesClient object to access its operations. + * + * @return the AppAttachPackagesClient object. + */ + public AppAttachPackagesClient getAppAttachPackages() { + return this.appAttachPackages; + } + /** * Initializes an instance of DesktopVirtualizationApiClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - DesktopVirtualizationApiClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + DesktopVirtualizationApiClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-09-05"; + this.apiVersion = "2024-04-03"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); @@ -353,12 +425,14 @@ public MsixImagesClient getMsixImages() { this.userSessions = new UserSessionsClientImpl(this); this.sessionHosts = new SessionHostsClientImpl(this); this.msixPackages = new MsixPackagesClientImpl(this); + this.appAttachPackageInfoes = new AppAttachPackageInfoesClientImpl(this); this.msixImages = new MsixImagesClientImpl(this); + this.appAttachPackages = new AppAttachPackagesClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -367,7 +441,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -377,7 +451,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -387,26 +461,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -419,19 +482,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -472,7 +532,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { 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 cf1f79593d59..31dc61f9c3f8 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 @@ -33,17 +33,23 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in DesktopsClient. + */ public final class DesktopsClientImpl implements DesktopsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DesktopsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of DesktopsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DesktopsClientImpl(DesktopVirtualizationApiClientImpl client) { @@ -58,68 +64,49 @@ public final class DesktopsClientImpl implements DesktopsClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface DesktopsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, - @PathParam("desktopName") String desktopName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("desktopName") String desktopName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("applicationGroupName") String applicationGroupName, - @PathParam("desktopName") String desktopName, - @BodyParam("application/json") DesktopPatch desktop, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("desktopName") String desktopName, @BodyParam("application/json") DesktopPatch desktop, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("applicationGroupName") String applicationGroupName, @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, @QueryParam("initialSkip") Integer initialSkip, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * 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. @@ -129,19 +116,15 @@ Mono> listNext( * @return a desktop along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String desktopName) { + public Mono> getWithResponseAsync(String resourceGroupName, String applicationGroupName, + String desktopName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -156,24 +139,14 @@ public Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - desktopName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, desktopName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -184,19 +157,15 @@ public Mono> getWithResponseAsync( * @return a desktop along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String applicationGroupName, String desktopName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String applicationGroupName, + String desktopName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -211,21 +180,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - desktopName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, desktopName, accept, context); } /** * 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. @@ -242,7 +203,7 @@ public Mono getAsync(String resourceGroupName, String applicationG /** * 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. @@ -253,14 +214,14 @@ public Mono getAsync(String resourceGroupName, String applicationG * @return a desktop along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String desktopName, Context context) { + public Response getWithResponse(String resourceGroupName, String applicationGroupName, + String desktopName, Context context) { return getWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, context).block(); } /** * 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. @@ -276,7 +237,7 @@ public DesktopInner get(String resourceGroupName, String applicationGroupName, S /** * 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. @@ -287,19 +248,15 @@ public DesktopInner get(String resourceGroupName, String applicationGroupName, S * @return schema for Desktop properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String applicationGroupName, String desktopName, DesktopPatch desktop) { + public Mono> updateWithResponseAsync(String resourceGroupName, String applicationGroupName, + String desktopName, DesktopPatch desktop) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -317,25 +274,15 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - desktopName, - desktop, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, desktopName, desktop, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -347,23 +294,15 @@ public Mono> updateWithResponseAsync( * @return schema for Desktop properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String applicationGroupName, - String desktopName, - DesktopPatch desktop, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String applicationGroupName, + String desktopName, DesktopPatch desktop, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -381,22 +320,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - desktopName, - desktop, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, desktopName, desktop, accept, 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. @@ -414,7 +344,7 @@ public Mono updateAsync(String resourceGroupName, String applicati /** * 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. @@ -426,18 +356,14 @@ public Mono updateAsync(String resourceGroupName, String applicati * @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) { + public Response updateWithResponse(String resourceGroupName, String applicationGroupName, + String desktopName, DesktopPatch desktop, Context context) { return updateWithResponseAsync(resourceGroupName, applicationGroupName, desktopName, desktop, context).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. @@ -455,7 +381,7 @@ public DesktopInner update(String resourceGroupName, String applicationGroupName /** * 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. @@ -467,23 +393,15 @@ public DesktopInner update(String resourceGroupName, String applicationGroupName * @return desktopList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + private Mono> listSinglePageAsync(String resourceGroupName, String applicationGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -495,35 +413,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, 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 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. @@ -536,24 +436,15 @@ private Mono> listSinglePageAsync( * @return desktopList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String applicationGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -566,31 +457,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), 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. @@ -602,12 +477,8 @@ private Mono> listSinglePageAsync( * @return desktopList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + public PagedFlux listAsync(String resourceGroupName, String applicationGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -615,7 +486,7 @@ public PagedFlux listAsync( /** * List desktops. - * + * * @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. @@ -635,7 +506,7 @@ public PagedFlux listAsync(String resourceGroupName, String applic /** * 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. @@ -648,23 +519,15 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, + isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List desktops. - * + * * @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. @@ -683,7 +546,7 @@ public PagedIterable list(String resourceGroupName, String applica /** * 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. @@ -696,22 +559,18 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -723,31 +582,22 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + 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)) + 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. + * + * 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. @@ -760,23 +610,13 @@ private Mono> listNextSinglePageAsync(String nextLin 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.")); + 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)); + 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/DesktopsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopsImpl.java index d0c88cc6d185..018ae1a083ea 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 @@ -22,22 +22,18 @@ public final class DesktopsImpl implements Desktops { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public DesktopsImpl( - DesktopsClient innerClient, + public DesktopsImpl(DesktopsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String applicationGroupName, String desktopName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, applicationGroupName, desktopName, context); + public Response getWithResponse(String resourceGroupName, String applicationGroupName, String desktopName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, applicationGroupName, desktopName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DesktopImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,21 +49,12 @@ public Desktop get(String resourceGroupName, String applicationGroupName, String } } - public Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String desktopName, - DesktopPatch desktop, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, applicationGroupName, desktopName, desktop, context); + public Response updateWithResponse(String resourceGroupName, String applicationGroupName, + String desktopName, DesktopPatch desktop, Context context) { + Response inner = this.serviceClient() + .updateWithResponse(resourceGroupName, applicationGroupName, desktopName, desktop, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DesktopImpl(inner.getValue(), this.manager())); } else { return null; @@ -85,21 +72,14 @@ public Desktop update(String resourceGroupName, String applicationGroupName, Str public PagedIterable list(String resourceGroupName, String applicationGroupName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, applicationGroupName); - return Utils.mapPage(inner, inner1 -> new DesktopImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DesktopImpl(inner1, this.manager())); } - 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())); + 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 ResourceManagerUtils.mapPage(inner, inner1 -> new DesktopImpl(inner1, this.manager())); } private DesktopsClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ExpandMsixImageImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ExpandMsixImageImpl.java index 5a674c57bce1..a20b790faf34 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ExpandMsixImageImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ExpandMsixImageImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.desktopvirtualization.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; import com.azure.resourcemanager.desktopvirtualization.models.ExpandMsixImage; import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; @@ -17,8 +18,7 @@ public final class ExpandMsixImageImpl implements ExpandMsixImage { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - ExpandMsixImageImpl( - ExpandMsixImageInner innerObject, + ExpandMsixImageImpl(ExpandMsixImageInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -36,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String packageAlias() { return this.innerModel().packageAlias(); } @@ -98,6 +102,14 @@ public List packageApplications() { } } + public String certificateName() { + return this.innerModel().certificateName(); + } + + public OffsetDateTime certificateExpiry() { + return this.innerModel().certificateExpiry(); + } + public ExpandMsixImageInner innerModel() { return this.innerObject; } 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 c1f35897f130..6bb45fc6740f 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 @@ -14,8 +14,8 @@ 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.HostPoolType; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; @@ -150,6 +150,15 @@ public List applicationGroupReferences() { } } + public List appAttachPackageReferences() { + List inner = this.innerModel().appAttachPackageReferences(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String ssoadfsAuthority() { return this.innerModel().ssoadfsAuthority(); } @@ -227,27 +236,23 @@ public HostPoolImpl withExistingResourceGroup(String resourceGroupName) { } public HostPool create() { - this.innerObject = - serviceManager - .serviceClient() - .getHostPools() - .createOrUpdateWithResponse(resourceGroupName, hostPoolName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHostPools() + .createOrUpdateWithResponse(resourceGroupName, hostPoolName, this.innerModel(), Context.NONE) + .getValue(); return this; } public HostPool create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHostPools() - .createOrUpdateWithResponse(resourceGroupName, hostPoolName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHostPools() + .createOrUpdateWithResponse(resourceGroupName, hostPoolName, this.innerModel(), context) + .getValue(); return this; } - HostPoolImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + HostPoolImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new HostPoolInner(); this.serviceManager = serviceManager; this.hostPoolName = name; @@ -259,57 +264,47 @@ public HostPoolImpl update() { } public HostPool apply() { - this.innerObject = - serviceManager - .serviceClient() - .getHostPools() - .updateWithResponse(resourceGroupName, hostPoolName, updateHostPool, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHostPools() + .updateWithResponse(resourceGroupName, hostPoolName, updateHostPool, Context.NONE) + .getValue(); return this; } public HostPool apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHostPools() - .updateWithResponse(resourceGroupName, hostPoolName, updateHostPool, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHostPools() + .updateWithResponse(resourceGroupName, hostPoolName, updateHostPool, context) + .getValue(); return this; } - HostPoolImpl( - HostPoolInner innerObject, + HostPoolImpl(HostPoolInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.hostPoolName = Utils.getValueFromIdByName(innerObject.id(), "hostPools"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.hostPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "hostPools"); } public HostPool refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getHostPools() - .getByResourceGroupWithResponse(resourceGroupName, hostPoolName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHostPools() + .getByResourceGroupWithResponse(resourceGroupName, hostPoolName, Context.NONE) + .getValue(); return this; } public HostPool refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getHostPools() - .getByResourceGroupWithResponse(resourceGroupName, hostPoolName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getHostPools() + .getByResourceGroupWithResponse(resourceGroupName, hostPoolName, context) + .getValue(); return this; } public Response retrieveRegistrationTokenWithResponse(Context context) { - return serviceManager - .hostPools() + return serviceManager.hostPools() .retrieveRegistrationTokenWithResponse(resourceGroupName, hostPoolName, context); } 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 fe4dac4abd98..8a313ac02d06 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 @@ -8,8 +8,8 @@ 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.HostPoolType; import com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType; import com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType; import com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType; @@ -24,8 +24,7 @@ public final class HostPoolPropertiesImpl implements HostPoolProperties { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - HostPoolPropertiesImpl( - HostPoolPropertiesInner innerObject, + HostPoolPropertiesImpl(HostPoolPropertiesInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -93,6 +92,15 @@ public List applicationGroupReferences() { } } + public List appAttachPackageReferences() { + List inner = this.innerModel().appAttachPackageReferences(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String ssoadfsAuthority() { return this.innerModel().ssoadfsAuthority(); } 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 6a4a43fd2ab3..055d5021dad0 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 @@ -37,22 +37,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in HostPoolsClient. + */ public final class HostPoolsClientImpl implements HostPoolsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final HostPoolsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of HostPoolsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ HostPoolsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(HostPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(HostPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -63,133 +69,91 @@ public final class HostPoolsClientImpl implements HostPoolsClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface HostPoolsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @HeaderParam("Accept") String accept, - Context context); + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @BodyParam("application/json") HostPoolInner hostPool, - @HeaderParam("Accept") String accept, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @BodyParam("application/json") HostPoolInner hostPool, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @QueryParam("force") Boolean force, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @QueryParam("force") Boolean force, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}") + @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("hostPoolName") String hostPoolName, - @BodyParam("application/json") HostPoolPatch hostPool, - @HeaderParam("Accept") String accept, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @BodyParam("application/json") HostPoolPatch hostPool, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @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); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @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); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/hostPools") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - 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); + 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); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> retrieveRegistrationToken( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @HeaderParam("Accept") String accept, - Context context); + Mono> retrieveRegistrationToken(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -198,19 +162,15 @@ Mono> listNext( * @return a host pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String hostPoolName) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String hostPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -221,23 +181,14 @@ public Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -247,19 +198,15 @@ public Mono> getByResourceGroupWithResponseAsync( * @return a host pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String hostPoolName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String hostPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -270,20 +217,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -299,7 +239,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Str /** * 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. @@ -309,14 +249,14 @@ public Mono getByResourceGroupAsync(String resourceGroupName, Str * @return a host pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String hostPoolName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String hostPoolName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, hostPoolName, context).block(); } /** * 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. @@ -331,7 +271,7 @@ public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoo /** * 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. @@ -341,19 +281,15 @@ public HostPoolInner getByResourceGroup(String resourceGroupName, String hostPoo * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String hostPoolName, + HostPoolInner hostPool) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -369,24 +305,14 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - hostPool, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, hostPool, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -397,19 +323,15 @@ public Mono> createOrUpdateWithResponseAsync( * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String hostPoolName, + HostPoolInner hostPool, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -425,21 +347,13 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - hostPool, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, hostPool, accept, 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. @@ -449,15 +363,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a HostPool definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool) { + public Mono createOrUpdateAsync(String resourceGroupName, String hostPoolName, + HostPoolInner hostPool) { return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -468,14 +382,14 @@ public Mono createOrUpdateAsync( * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolInner hostPool, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String hostPoolName, + HostPoolInner hostPool, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).block(); } /** * 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. @@ -491,7 +405,7 @@ public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolNam /** * 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. @@ -503,16 +417,12 @@ public HostPoolInner createOrUpdate(String resourceGroupName, String hostPoolNam @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -523,24 +433,14 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - force, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, force, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -551,19 +451,15 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, Boolean force, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, Boolean force, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -574,21 +470,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - force, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, force, accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -604,7 +492,7 @@ public Mono deleteAsync(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. @@ -615,14 +503,14 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName) { * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, Boolean force, Context context) { + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, Boolean force, + Context context) { return deleteWithResponseAsync(resourceGroupName, hostPoolName, force, context).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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -637,7 +525,7 @@ public void delete(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. @@ -647,19 +535,15 @@ public void delete(String resourceGroupName, String hostPoolName) { * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool) { + public Mono> updateWithResponseAsync(String resourceGroupName, String hostPoolName, + HostPoolPatch hostPool) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -673,24 +557,14 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - hostPool, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, hostPool, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -701,19 +575,15 @@ public Mono> updateWithResponseAsync( * @return represents a HostPool definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String hostPoolName, + HostPoolPatch hostPool, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -727,21 +597,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - hostPool, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, hostPool, accept, context); } /** * 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. @@ -758,7 +620,7 @@ public Mono updateAsync(String resourceGroupName, String 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. * @param hostPool Object containing HostPool definitions. @@ -769,14 +631,14 @@ public Mono updateAsync(String resourceGroupName, String hostPool * @return represents a HostPool definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String hostPoolName, HostPoolPatch hostPool, Context context) { + public Response updateWithResponse(String resourceGroupName, String hostPoolName, + HostPoolPatch hostPool, Context context) { return updateWithResponseAsync(resourceGroupName, hostPoolName, hostPool, context).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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -792,7 +654,7 @@ public HostPoolInner update(String resourceGroupName, String hostPoolName) { /** * 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. @@ -803,19 +665,15 @@ public HostPoolInner update(String resourceGroupName, String hostPoolName) { * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -823,34 +681,17 @@ private Mono> listByResourceGroupSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 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. @@ -862,19 +703,15 @@ private Mono> listByResourceGroupSinglePageAsync( * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -882,31 +719,15 @@ private Mono> listByResourceGroupSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List hostPools. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param pageSize Number of items per page. * @param isDescending Indicates whether the collection is descending. @@ -917,8 +738,8 @@ private Mono> listByResourceGroupSinglePageAsync( * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); @@ -926,7 +747,7 @@ public PagedFlux listByResourceGroupAsync( /** * 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. @@ -945,7 +766,7 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNam /** * List hostPools. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param pageSize Number of items per page. * @param isDescending Indicates whether the collection is descending. @@ -957,8 +778,8 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNam * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); @@ -966,7 +787,7 @@ private PagedFlux listByResourceGroupAsync( /** * 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. @@ -983,7 +804,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName /** * 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. @@ -995,15 +816,15 @@ public PagedIterable listByResourceGroup(String resourceGroupName * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context 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. @@ -1013,49 +834,28 @@ public PagedIterable listByResourceGroup( * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 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. @@ -1066,46 +866,28 @@ private Mono> listSinglePageAsync( * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), pageSize, + isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List hostPools in subscription. - * + * * @param pageSize Number of items per page. * @param isDescending Indicates whether the collection is descending. * @param initialSkip Initial number of items to skip. @@ -1116,14 +898,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip) { - return new PagedFlux<>( - () -> listSinglePageAsync(pageSize, isDescending, 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}. @@ -1133,14 +914,13 @@ public PagedFlux listAsync() { final Integer pageSize = null; final Boolean isDescending = null; final Integer initialSkip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + 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. @@ -1151,16 +931,15 @@ public PagedFlux listAsync() { * @return hostPoolList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), + private PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * 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 PagedIterable}. @@ -1175,7 +954,7 @@ public PagedIterable list() { /** * 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. @@ -1186,36 +965,32 @@ public PagedIterable list() { * @return hostPoolList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + public PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, + Context context) { return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip, 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 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}. + * @return represents a RegistrationInfo definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> retrieveRegistrationTokenWithResponseAsync( - String resourceGroupName, String hostPoolName) { + public Mono> retrieveRegistrationTokenWithResponseAsync(String resourceGroupName, + String hostPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1227,45 +1002,33 @@ public Mono> retrieveRegistrationTokenWithRespon final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .retrieveRegistrationToken( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - accept, - context)) + context -> service.retrieveRegistrationToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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 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}. + * @return represents a RegistrationInfo definition along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> retrieveRegistrationTokenWithResponseAsync( - String resourceGroupName, String hostPoolName, Context context) { + private Mono> retrieveRegistrationTokenWithResponseAsync(String resourceGroupName, + String hostPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1276,20 +1039,13 @@ private Mono> retrieveRegistrationTokenWithRespo } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .retrieveRegistrationToken( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - accept, - context); + return service.retrieveRegistrationToken(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, accept, 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. @@ -1305,7 +1061,7 @@ public Mono retrieveRegistrationTokenAsync(String resourc /** * 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. @@ -1315,14 +1071,14 @@ public Mono retrieveRegistrationTokenAsync(String resourc * @return represents a RegistrationInfo definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context) { + public Response retrieveRegistrationTokenWithResponse(String resourceGroupName, + String hostPoolName, Context context) { return retrieveRegistrationTokenWithResponseAsync(resourceGroupName, hostPoolName, context).block(); } /** * 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. @@ -1337,9 +1093,10 @@ public RegistrationInfoInner retrieveRegistrationToken(String resourceGroupName, /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1351,32 +1108,24 @@ private Mono> listByResourceGroupNextSinglePageAsyn 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.")); + 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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1384,37 +1133,28 @@ private Mono> listByResourceGroupNextSinglePageAsyn * @return hostPoolList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(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.")); + 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 - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1426,31 +1166,22 @@ private Mono> listNextSinglePageAsync(String nextLi 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.")); + 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)) + 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. + * + * 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. @@ -1463,23 +1194,13 @@ private Mono> listNextSinglePageAsync(String nextLi 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.")); + 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)); + 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/HostPoolsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/HostPoolsImpl.java index 7ae460fcf6fa..3da4880df5af 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 @@ -23,22 +23,18 @@ public final class HostPoolsImpl implements HostPools { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public HostPoolsImpl( - HostPoolsClient innerClient, + public HostPoolsImpl(HostPoolsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String hostPoolName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, hostPoolName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String hostPoolName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, hostPoolName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new HostPoolImpl(inner.getValue(), this.manager())); } else { return null; @@ -54,8 +50,8 @@ public HostPool getByResourceGroup(String resourceGroupName, String hostPoolName } } - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, Boolean force, Context context) { + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, Boolean force, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, hostPoolName, force, context); } @@ -65,35 +61,32 @@ public void delete(String resourceGroupName, String hostPoolName) { public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } - 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())); + public PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, pageSize, isDescending, initialSkip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } 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())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new HostPoolImpl(inner1, this.manager())); } - public Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context) { - Response inner = - this.serviceClient().retrieveRegistrationTokenWithResponse(resourceGroupName, hostPoolName, context); + public Response retrieveRegistrationTokenWithResponse(String resourceGroupName, + String hostPoolName, Context context) { + Response inner + = this.serviceClient().retrieveRegistrationTokenWithResponse(resourceGroupName, hostPoolName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RegistrationInfoImpl(inner.getValue(), this.manager())); } else { return null; @@ -110,78 +103,58 @@ public RegistrationInfo retrieveRegistrationToken(String resourceGroupName, Stri } public HostPool getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, hostPoolName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, hostPoolName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } Boolean localForce = null; this.deleteWithResponse(resourceGroupName, hostPoolName, localForce, Context.NONE); } public Response deleteByIdWithResponse(String id, Boolean force, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } return this.deleteWithResponse(resourceGroupName, hostPoolName, force, context); } 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 31da5db4dea2..fb3bf4d04b2c 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 @@ -33,22 +33,28 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in MsixImagesClient. */ +/** + * An instance of this class provides access to all the operations defined in MsixImagesClient. + */ public final class MsixImagesClientImpl implements MsixImagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MsixImagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of MsixImagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MsixImagesClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(MsixImagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(MsixImagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -59,35 +65,27 @@ public final class MsixImagesClientImpl implements MsixImagesClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface MsixImagesService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> expand( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @BodyParam("application/json") MsixImageUri msixImageUri, - @HeaderParam("Accept") String accept, + Mono> expand(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @BodyParam("application/json") MsixImageUri msixImageUri, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> expandNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> expandNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * 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. @@ -97,19 +95,15 @@ Mono> expandNext( * @return expandMsixImageList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandSinglePageAsync( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri) { + private Mono> expandSinglePageAsync(String resourceGroupName, + String hostPoolName, MsixImageUri msixImageUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -125,33 +119,16 @@ private Mono> expandSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixImageUri, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.expand(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, msixImageUri, 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())); } /** * 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. @@ -162,19 +139,15 @@ private Mono> expandSinglePageAsync( * @return expandMsixImageList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> expandSinglePageAsync( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, Context context) { + private Mono> expandSinglePageAsync(String resourceGroupName, + String hostPoolName, MsixImageUri msixImageUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -191,29 +164,15 @@ private Mono> expandSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .expand( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixImageUri, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .expand(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, msixImageUri, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * 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. @@ -223,16 +182,15 @@ private Mono> expandSinglePageAsync( * @return expandMsixImageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux expandAsync( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri) { - return new PagedFlux<>( - () -> expandSinglePageAsync(resourceGroupName, hostPoolName, msixImageUri), + public PagedFlux expandAsync(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri) { + return new PagedFlux<>(() -> expandSinglePageAsync(resourceGroupName, hostPoolName, msixImageUri), nextLink -> expandNextSinglePageAsync(nextLink)); } /** * 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. @@ -243,16 +201,15 @@ public PagedFlux expandAsync( * @return expandMsixImageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux expandAsync( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, Context context) { - return new PagedFlux<>( - () -> expandSinglePageAsync(resourceGroupName, hostPoolName, msixImageUri, context), + private PagedFlux expandAsync(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri, Context context) { + return new PagedFlux<>(() -> expandSinglePageAsync(resourceGroupName, hostPoolName, msixImageUri, context), nextLink -> expandNextSinglePageAsync(nextLink, context)); } /** * 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. @@ -262,14 +219,14 @@ private PagedFlux expandAsync( * @return expandMsixImageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable expand( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri) { + public PagedIterable expand(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri) { return new PagedIterable<>(expandAsync(resourceGroupName, hostPoolName, msixImageUri)); } /** * 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. @@ -280,16 +237,17 @@ public PagedIterable expand( * @return expandMsixImageList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable expand( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, Context context) { + public PagedIterable expand(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri, Context context) { return new PagedIterable<>(expandAsync(resourceGroupName, hostPoolName, msixImageUri, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -301,31 +259,22 @@ private Mono> expandNextSinglePageAsync(Stri 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.")); + 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.expandNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.expandNext(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. + * + * 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. @@ -338,23 +287,13 @@ private Mono> expandNextSinglePageAsync(Stri 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.")); + 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 - .expandNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.expandNext(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/MsixImagesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixImagesImpl.java index 859b1c66bc4b..3b19eb67bb19 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixImagesImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixImagesImpl.java @@ -10,8 +10,8 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.MsixImagesClient; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; import com.azure.resourcemanager.desktopvirtualization.models.ExpandMsixImage; -import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; import com.azure.resourcemanager.desktopvirtualization.models.MsixImages; +import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; public final class MsixImagesImpl implements MsixImages { private static final ClientLogger LOGGER = new ClientLogger(MsixImagesImpl.class); @@ -20,25 +20,24 @@ public final class MsixImagesImpl implements MsixImages { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public MsixImagesImpl( - MsixImagesClient innerClient, + public MsixImagesImpl(MsixImagesClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable expand( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri) { - PagedIterable inner = - this.serviceClient().expand(resourceGroupName, hostPoolName, msixImageUri); - return Utils.mapPage(inner, inner1 -> new ExpandMsixImageImpl(inner1, this.manager())); + public PagedIterable expand(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri) { + PagedIterable inner + = this.serviceClient().expand(resourceGroupName, hostPoolName, msixImageUri); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExpandMsixImageImpl(inner1, this.manager())); } - public PagedIterable expand( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, Context context) { - PagedIterable inner = - this.serviceClient().expand(resourceGroupName, hostPoolName, msixImageUri, context); - return Utils.mapPage(inner, inner1 -> new ExpandMsixImageImpl(inner1, this.manager())); + public PagedIterable expand(String resourceGroupName, String hostPoolName, + MsixImageUri msixImageUri, Context context) { + PagedIterable inner + = this.serviceClient().expand(resourceGroupName, hostPoolName, msixImageUri, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ExpandMsixImageImpl(inner1, this.manager())); } private MsixImagesClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackageImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackageImpl.java index ec574fed9577..12b4482726bd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackageImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackageImpl.java @@ -117,29 +117,25 @@ public MsixPackageImpl withExistingHostPool(String resourceGroupName, String hos } public MsixPackage create() { - this.innerObject = - serviceManager - .serviceClient() - .getMsixPackages() - .createOrUpdateWithResponse( - resourceGroupName, hostPoolName, msixPackageFullName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMsixPackages() + .createOrUpdateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public MsixPackage create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMsixPackages() - .createOrUpdateWithResponse( - resourceGroupName, hostPoolName, msixPackageFullName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMsixPackages() + .createOrUpdateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, this.innerModel(), + context) + .getValue(); return this; } - MsixPackageImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + MsixPackageImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new MsixPackageInner(); this.serviceManager = serviceManager; this.msixPackageFullName = name; @@ -151,53 +147,43 @@ public MsixPackageImpl update() { } public MsixPackage apply() { - this.innerObject = - serviceManager - .serviceClient() - .getMsixPackages() - .updateWithResponse( - resourceGroupName, hostPoolName, msixPackageFullName, updateMsixPackage, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMsixPackages() + .updateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, updateMsixPackage, Context.NONE) + .getValue(); return this; } public MsixPackage apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMsixPackages() - .updateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, updateMsixPackage, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMsixPackages() + .updateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, updateMsixPackage, context) + .getValue(); return this; } - MsixPackageImpl( - MsixPackageInner innerObject, + MsixPackageImpl(MsixPackageInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); - this.hostPoolName = Utils.getValueFromIdByName(innerObject.id(), "hostPools"); - this.msixPackageFullName = Utils.getValueFromIdByName(innerObject.id(), "msixPackages"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourcegroups"); + this.hostPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "hostPools"); + this.msixPackageFullName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "msixPackages"); } public MsixPackage refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getMsixPackages() - .getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMsixPackages() + .getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE) + .getValue(); return this; } public MsixPackage refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getMsixPackages() - .getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getMsixPackages() + .getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context) + .getValue(); return this; } 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 8ff9932a8c52..d03a811299ad 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 @@ -35,22 +35,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in MsixPackagesClient. + */ public final class MsixPackagesClientImpl implements MsixPackagesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final MsixPackagesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of MsixPackagesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ MsixPackagesClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(MsixPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(MsixPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,99 +67,69 @@ public final class MsixPackagesClientImpl implements MsixPackagesClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface MsixPackagesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") + @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("hostPoolName") String hostPoolName, - @PathParam("msixPackageFullName") String msixPackageFullName, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("msixPackageFullName") String msixPackageFullName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, @PathParam("msixPackageFullName") String msixPackageFullName, - @BodyParam("application/json") MsixPackageInner msixPackage, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") MsixPackageInner msixPackage, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @PathParam("msixPackageFullName") String msixPackageFullName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("msixPackageFullName") String msixPackageFullName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}") + @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("hostPoolName") String hostPoolName, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, @PathParam("msixPackageFullName") String msixPackageFullName, - @BodyParam("application/json") MsixPackagePatch msixPackage, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") MsixPackagePatch msixPackage, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages") + @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("hostPoolName") String hostPoolName, - @QueryParam("pageSize") Integer pageSize, - @QueryParam("isDescending") Boolean isDescending, - @QueryParam("initialSkip") Integer initialSkip, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * 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. @@ -163,19 +139,15 @@ Mono> listNext( * @return a msixpackage along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName) { + public Mono> getWithResponseAsync(String resourceGroupName, String hostPoolName, + String msixPackageFullName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -190,24 +162,14 @@ public Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, msixPackageFullName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -218,19 +180,15 @@ public Mono> getWithResponseAsync( * @return a msixpackage along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String hostPoolName, + String msixPackageFullName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -245,21 +203,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, msixPackageFullName, accept, context); } /** * 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. @@ -276,7 +226,7 @@ public Mono getAsync(String resourceGroupName, String hostPool /** * 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. @@ -287,14 +237,14 @@ public Mono getAsync(String resourceGroupName, String hostPool * @return a msixpackage along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + public Response getWithResponse(String resourceGroupName, String hostPoolName, + String msixPackageFullName, Context context) { return getWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); } /** * 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. @@ -310,7 +260,7 @@ public MsixPackageInner get(String resourceGroupName, String hostPoolName, Strin /** * 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. @@ -321,19 +271,15 @@ public MsixPackageInner get(String resourceGroupName, String hostPoolName, Strin * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -353,25 +299,15 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - msixPackage, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -383,23 +319,15 @@ public Mono> createOrUpdateWithResponseAsync( * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackageInner msixPackage, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -419,22 +347,14 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - msixPackage, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, accept, + 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. @@ -445,15 +365,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return schema for MSIX Package properties on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { + public Mono createOrUpdateAsync(String resourceGroupName, String hostPoolName, + String msixPackageFullName, MsixPackageInner msixPackage) { return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -465,20 +385,15 @@ public Mono createOrUpdateAsync( * @return schema for MSIX Package properties along with {@link Response}. */ @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 Response createOrUpdateWithResponse(String resourceGroupName, String hostPoolName, + String msixPackageFullName, MsixPackageInner msixPackage, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, + context).block(); } /** * 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. @@ -489,16 +404,15 @@ public Response createOrUpdateWithResponse( * @return schema for MSIX Package properties. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MsixPackageInner createOrUpdate( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackageInner msixPackage) { - return createOrUpdateWithResponse( - resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, Context.NONE) - .getValue(); + public MsixPackageInner createOrUpdate(String resourceGroupName, String hostPoolName, String msixPackageFullName, + MsixPackageInner msixPackage) { + return createOrUpdateWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, + Context.NONE).getValue(); } /** * 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. @@ -508,19 +422,15 @@ public MsixPackageInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, + String msixPackageFullName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -535,24 +445,14 @@ public Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, msixPackageFullName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -563,19 +463,15 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, + String msixPackageFullName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -590,21 +486,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, msixPackageFullName, accept, 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. @@ -621,7 +509,7 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str /** * 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. @@ -632,14 +520,14 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, String msixPackageFullName, + Context context) { return deleteWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, context).block(); } /** * 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. @@ -654,7 +542,7 @@ public void delete(String resourceGroupName, String hostPoolName, String msixPac /** * 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. @@ -665,19 +553,15 @@ public void delete(String resourceGroupName, String hostPoolName, String msixPac * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String hostPoolName, String msixPackageFullName, MsixPackagePatch msixPackage) { + public Mono> updateWithResponseAsync(String resourceGroupName, String hostPoolName, + String msixPackageFullName, MsixPackagePatch msixPackage) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -695,25 +579,15 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - msixPackage, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -725,23 +599,15 @@ public Mono> updateWithResponseAsync( * @return schema for MSIX Package properties along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String msixPackageFullName, - MsixPackagePatch msixPackage, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String hostPoolName, + String msixPackageFullName, MsixPackagePatch msixPackage, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -759,22 +625,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - msixPackageFullName, - msixPackage, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, accept, 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. @@ -784,8 +641,8 @@ private Mono> updateWithResponseAsync( * @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) { + 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())); @@ -793,7 +650,7 @@ public Mono updateAsync( /** * 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. @@ -805,19 +662,15 @@ public Mono updateAsync( * @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) { + public Response updateWithResponse(String resourceGroupName, String hostPoolName, + String msixPackageFullName, MsixPackagePatch msixPackage, Context context) { return updateWithResponseAsync(resourceGroupName, hostPoolName, msixPackageFullName, msixPackage, context) .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. @@ -835,7 +688,7 @@ public MsixPackageInner update(String resourceGroupName, String hostPoolName, St /** * 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. @@ -847,19 +700,15 @@ public MsixPackageInner update(String resourceGroupName, String hostPoolName, St * @return msixPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -870,35 +719,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List 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. @@ -911,24 +742,15 @@ private Mono> listSinglePageAsync( * @return msixPackageList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -940,31 +762,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List 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. @@ -976,8 +782,8 @@ private Mono> listSinglePageAsync( * @return msixPackageList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listAsync(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -985,7 +791,7 @@ public PagedFlux listAsync( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1005,7 +811,7 @@ public PagedFlux listAsync(String resourceGroupName, String ho /** * 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. @@ -1018,13 +824,8 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -1032,7 +833,7 @@ private PagedFlux listAsync( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1050,7 +851,7 @@ public PagedIterable list(String resourceGroupName, String hos /** * 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. @@ -1063,22 +864,18 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1090,31 +887,22 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)) + 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. + * + * 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. @@ -1127,23 +915,13 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)); + 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/MsixPackagesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/MsixPackagesImpl.java index ab3fad5320b7..53c623e98339 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 @@ -21,22 +21,18 @@ public final class MsixPackagesImpl implements MsixPackages { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public MsixPackagesImpl( - MsixPackagesClient innerClient, + public MsixPackagesImpl(MsixPackagesClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context); + public Response getWithResponse(String resourceGroupName, String hostPoolName, + String msixPackageFullName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new MsixPackageImpl(inner.getValue(), this.manager())); } else { return null; @@ -52,8 +48,8 @@ public MsixPackage get(String resourceGroupName, String hostPoolName, String msi } } - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, String msixPackageFullName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context); } @@ -63,121 +59,88 @@ public void delete(String resourceGroupName, String hostPoolName, String msixPac public PagedIterable list(String resourceGroupName, String hostPoolName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, hostPoolName); - return Utils.mapPage(inner, inner1 -> new MsixPackageImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new MsixPackageImpl(inner1, this.manager())); } - 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())); + 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 ResourceManagerUtils.mapPage(inner, inner1 -> new MsixPackageImpl(inner1, this.manager())); } public MsixPackage getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } - String msixPackageFullName = Utils.getValueFromIdByName(id, "msixPackages"); + String msixPackageFullName = ResourceManagerUtils.getValueFromIdByName(id, "msixPackages"); if (msixPackageFullName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); } return this.getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } - String msixPackageFullName = Utils.getValueFromIdByName(id, "msixPackages"); + String msixPackageFullName = ResourceManagerUtils.getValueFromIdByName(id, "msixPackages"); if (msixPackageFullName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); } return this.getWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } - String msixPackageFullName = Utils.getValueFromIdByName(id, "msixPackages"); + String msixPackageFullName = ResourceManagerUtils.getValueFromIdByName(id, "msixPackages"); if (msixPackageFullName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); } this.deleteWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); } - String hostPoolName = Utils.getValueFromIdByName(id, "hostPools"); + String hostPoolName = ResourceManagerUtils.getValueFromIdByName(id, "hostPools"); if (hostPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'hostPools'.", id))); } - String msixPackageFullName = Utils.getValueFromIdByName(id, "msixPackages"); + String msixPackageFullName = ResourceManagerUtils.getValueFromIdByName(id, "msixPackages"); if (msixPackageFullName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'msixPackages'.", id))); } return this.deleteWithResponse(resourceGroupName, hostPoolName, msixPackageFullName, context); } 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 b67605b22e27..08504b632235 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 @@ -30,22 +30,28 @@ import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,95 +62,71 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.DesktopVirtualization/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List all of the available operations the Desktop Virtualization resource provider supports. - * + * * @throws 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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 all of the available operations the Desktop Virtualization resource provider supports. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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 - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List all of the available operations the Desktop Virtualization resource provider supports. - * + * * @throws 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}. @@ -156,7 +138,7 @@ public PagedFlux listAsync() { /** * List all of the available operations the Desktop Virtualization resource provider supports. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -165,13 +147,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * List all of the available operations the Desktop Virtualization resource provider supports. - * + * * @throws 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 PagedIterable}. @@ -183,7 +165,7 @@ public PagedIterable list() { /** * List all of the available operations the Desktop Virtualization resource provider supports. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -197,14 +179,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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 result of the request to list operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -212,62 +195,43 @@ private Mono> listNextSinglePageAs 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.")); + 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)) + 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. + * + * 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 result of the request to list operations along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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/OperationsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsImpl.java index 3f70c8f7a57c..0fa3ba55ab1a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/OperationsImpl.java @@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public OperationsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceProviderOperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ResourceProviderOperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java index 56039e66e293..3b04ddc4c882 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionWithSystemDataImpl.java @@ -10,14 +10,15 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; +import java.util.Collections; +import java.util.List; public final class PrivateEndpointConnectionWithSystemDataImpl implements PrivateEndpointConnectionWithSystemData { private PrivateEndpointConnectionWithSystemDataInner innerObject; private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - PrivateEndpointConnectionWithSystemDataImpl( - PrivateEndpointConnectionWithSystemDataInner innerObject, + PrivateEndpointConnectionWithSystemDataImpl(PrivateEndpointConnectionWithSystemDataInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -35,6 +36,19 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List groupIds() { + List inner = this.innerModel().groupIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public PrivateEndpoint privateEndpoint() { return this.innerModel().privateEndpoint(); } @@ -47,10 +61,6 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerModel().provisioningState(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - public PrivateEndpointConnectionWithSystemDataInner innerModel() { return this.innerObject; } 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 af7c055d0ac6..edb5332f628c 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 @@ -34,24 +34,28 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionListResultWithSystemData; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateEndpointConnectionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateEndpointConnectionsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy - .create( - PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -62,175 +66,129 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface PrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByWorkspace( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + Mono> getByWorkspace(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteByWorkspace( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + Mono> deleteByWorkspace(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateByWorkspace( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnection connection, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnection connection, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHostPool( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @QueryParam("pageSize") Integer pageSize, - @QueryParam("isDescending") Boolean isDescending, - @QueryParam("initialSkip") Integer initialSkip, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByHostPool( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + Mono> getByHostPool(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteByHostPool( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + Mono> deleteByHostPool(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> updateByHostPool( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnection connection, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnection connection, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHostPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName) { + private Mono> + listByWorkspaceSinglePageAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -241,55 +199,36 @@ private Mono> listBy } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> + listByWorkspaceSinglePageAsync(String resourceGroupName, String workspaceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -301,47 +240,33 @@ private Mono> listBy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), + public PagedFlux listByWorkspaceAsync(String resourceGroupName, + String workspaceName) { + return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); } /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param context The context to associate with this operation. @@ -349,36 +274,35 @@ public PagedFlux listByWorkspaceAs * @throws 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}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), + private PagedFlux listByWorkspaceAsync(String resourceGroupName, + String workspaceName, Context context) { + return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context), nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); } /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName) { + public PagedIterable listByWorkspace(String resourceGroupName, + String workspaceName) { return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName)); } /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param context The context to associate with this operation. @@ -386,21 +310,21 @@ public PagedIterable listByWorkspa * @throws 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}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, Context 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 workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -410,16 +334,12 @@ public PagedIterable listByWorkspa public Mono> getByWorkspaceWithResponseAsync( String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -429,35 +349,24 @@ public Mono> getByWorkspa return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - accept, - context)) + .withContext(context -> service.getByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -468,16 +377,12 @@ public Mono> getByWorkspa private Mono> getByWorkspaceWithResponseAsync( String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -487,51 +392,42 @@ private Mono> getByWorksp return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - accept, - context); + return service.getByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, accept, + context); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByWorkspaceAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + public Mono getByWorkspaceAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName) { return getByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -539,57 +435,53 @@ public Mono getByWorkspaceAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { + public Response getByWorkspaceWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, Context context) { return getByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) .block(); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner getByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + public PrivateEndpointConnectionWithSystemDataInner getByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { return getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) .getValue(); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteByWorkspaceWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + public Mono> deleteByWorkspaceWithResponseAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -599,35 +491,24 @@ public Mono> deleteByWorkspaceWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - accept, - context)) + .withContext(context -> service.deleteByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -635,19 +516,15 @@ 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> deleteByWorkspaceWithResponseAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -657,51 +534,42 @@ private Mono> deleteByWorkspaceWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deleteByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - accept, - context); + return service.deleteByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, accept, + context); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteByWorkspaceAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + public Mono deleteByWorkspaceAsync(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { return deleteByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) .flatMap(ignored -> Mono.empty()); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -709,61 +577,54 @@ public Mono deleteByWorkspaceAsync( * @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 Response deleteByWorkspaceWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context) { + return deleteByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, + context).block(); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { + public void deleteByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { deleteByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateByWorkspaceWithResponseAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -773,10 +634,8 @@ public Mono> updateByWork return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (connection == null) { return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); @@ -785,55 +644,38 @@ public Mono> updateByWork } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - connection, - accept, - context)) + .withContext(context -> service.updateByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + connection, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateByWorkspaceWithResponseAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context) { + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, + PrivateEndpointConnection connection, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -843,10 +685,8 @@ private Mono> updateByWor return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (connection == null) { return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); @@ -855,26 +695,18 @@ private Mono> updateByWor } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - connection, - accept, - context); + return service.updateByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, privateEndpointConnectionName, + connection, accept, context); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -882,23 +714,19 @@ private Mono> updateByWor * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateByWorkspaceAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - return updateByWorkspaceWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, connection) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono updateByWorkspaceAsync(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { + return updateByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, + connection).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -908,23 +736,19 @@ public Mono updateByWorkspaceAsync */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateByWorkspaceWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context) { - return updateByWorkspaceWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context) - .block(); + String resourceGroupName, String workspaceName, String privateEndpointConnectionName, + PrivateEndpointConnection connection, Context context) { + return updateByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, + connection, context).block(); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -932,19 +756,15 @@ public Response updateByWorkspaceW * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - return updateByWorkspaceWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, connection, Context.NONE) - .getValue(); + public PrivateEndpointConnectionWithSystemDataInner updateByWorkspace(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { + return updateByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, + connection, Context.NONE).getValue(); } /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -953,23 +773,19 @@ public PrivateEndpointConnectionWithSystemDataInner updateByWorkspace( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -980,35 +796,18 @@ private Mono> listBy } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context)) + .withContext(context -> service.listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, + accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -1018,28 +817,20 @@ private Mono> listBy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, + String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1051,31 +842,15 @@ private Mono> listBy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -1085,11 +860,11 @@ private Mono> listBy * @throws 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}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByHostPoolAsync(String resourceGroupName, + String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); @@ -1097,18 +872,18 @@ public PagedFlux listByHostPoolAsy /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedFlux}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName) { + public PagedFlux listByHostPoolAsync(String resourceGroupName, + String hostPoolName) { final Integer pageSize = null; final Boolean isDescending = null; final Integer initialSkip = null; @@ -1119,7 +894,7 @@ public PagedFlux listByHostPoolAsy /** * 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. @@ -1130,37 +905,29 @@ public PagedFlux listByHostPoolAsy * @throws 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}. + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByHostPoolAsync( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - return new PagedFlux<>( - () -> - listByHostPoolSinglePageAsync( - resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + private PagedFlux listByHostPoolAsync(String resourceGroupName, + String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, + isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName) { + public PagedIterable listByHostPool(String resourceGroupName, + String hostPoolName) { final Integer pageSize = null; final Boolean isDescending = null; final Integer initialSkip = null; @@ -1170,7 +937,7 @@ public PagedIterable listByHostPoo /** * 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. @@ -1181,27 +948,22 @@ public PagedIterable listByHostPoo * @throws 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}. + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 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. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1211,16 +973,12 @@ public PagedIterable listByHostPoo public Mono> getByHostPoolWithResponseAsync( String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1230,35 +988,24 @@ public Mono> getByHostPoo return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - privateEndpointConnectionName, - accept, - context)) + .withContext(context -> service.getByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -1269,16 +1016,12 @@ public Mono> getByHostPoo private Mono> getByHostPoolWithResponseAsync( String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1288,51 +1031,42 @@ private Mono> getByHostPo return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - privateEndpointConnectionName, - accept, - context); + return service.getByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, privateEndpointConnectionName, accept, + context); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getByHostPoolAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + public Mono getByHostPoolAsync(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName) { return getByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -1340,57 +1074,53 @@ public Mono getByHostPoolAsync( * @return a private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { + public Response getByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, Context context) { return getByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, context) .block(); } /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner getByHostPool( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + public PrivateEndpointConnectionWithSystemDataInner getByHostPool(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName) { return getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, Context.NONE) .getValue(); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteByHostPoolWithResponseAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + public Mono> deleteByHostPoolWithResponseAsync(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1400,35 +1130,24 @@ public Mono> deleteByHostPoolWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .deleteByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - privateEndpointConnectionName, - accept, - context)) + .withContext(context -> service.deleteByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -1436,19 +1155,15 @@ 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> deleteByHostPoolWithResponseAsync(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1458,51 +1173,42 @@ private Mono> deleteByHostPoolWithResponseAsync( return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deleteByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - privateEndpointConnectionName, - accept, - context); + return service.deleteByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, privateEndpointConnectionName, accept, + context); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteByHostPoolAsync( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { + public Mono deleteByHostPoolAsync(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName) { return deleteByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName) .flatMap(ignored -> Mono.empty()); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -1510,20 +1216,19 @@ public Mono deleteByHostPoolAsync( * @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 Response deleteByHostPoolWithResponse(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, Context context) { + return deleteByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, + context).block(); } /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1535,35 +1240,29 @@ public void deleteByHostPool(String resourceGroupName, String hostPoolName, Stri /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateByHostPoolWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1573,10 +1272,8 @@ public Mono> updateByHost return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (connection == null) { return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); @@ -1585,55 +1282,38 @@ public Mono> updateByHost } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .updateByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - privateEndpointConnectionName, - connection, - accept, - context)) + .withContext(context -> service.updateByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, privateEndpointConnectionName, + connection, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateByHostPoolWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, - Context context) { + String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, + PrivateEndpointConnection connection, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1643,10 +1323,8 @@ private Mono> updateByHos return Mono.error(new IllegalArgumentException("Parameter hostPoolName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (connection == null) { return Mono.error(new IllegalArgumentException("Parameter connection is required and cannot be null.")); @@ -1655,26 +1333,18 @@ private Mono> updateByHos } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - privateEndpointConnectionName, - connection, - accept, - context); + return service.updateByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, + accept, context); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1682,23 +1352,19 @@ private Mono> updateByHos * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateByHostPoolAsync( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - return updateByHostPoolWithResponseAsync( - resourceGroupName, hostPoolName, privateEndpointConnectionName, connection) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Mono updateByHostPoolAsync(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection) { + return updateByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, + connection).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -1707,24 +1373,20 @@ public Mono updateByHostPoolAsync( * @return the Private Endpoint Connection resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateByHostPoolWithResponse( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, + public Response updateByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context) { - return updateByHostPoolWithResponseAsync( - resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context) - .block(); + return updateByHostPoolWithResponseAsync(resourceGroupName, hostPoolName, privateEndpointConnectionName, + connection, context).block(); } /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1732,167 +1394,131 @@ public Response updateByHostPoolWi * @return the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionWithSystemDataInner updateByHostPool( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - return updateByHostPoolWithResponse( - resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, Context.NONE) - .getValue(); + public PrivateEndpointConnectionWithSystemDataInner updateByHostPool(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, PrivateEndpointConnection connection) { + return updateByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, + Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

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

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolNextSinglePageAsync( - String nextLink) { + private Mono> + listByHostPoolNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + 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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account along with {@link - * PagedResponse} on successful completion of {@link Mono}. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listByHostPoolNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateEndpointConnectionsImpl.java index 9c1e1c9a0ca7..1b13deb5f8e9 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 @@ -12,8 +12,8 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnections; +import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); @@ -22,48 +22,44 @@ public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConn private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public PrivateEndpointConnectionsImpl( - PrivateEndpointConnectionsClient innerClient, + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + public PagedIterable listByWorkspace(String resourceGroupName, + String workspaceName) { + PagedIterable inner + = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + return ResourceManagerUtils.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 PagedIterable listByWorkspace(String resourceGroupName, + String workspaceName, Context context) { + PagedIterable inner + = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); } - public Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); + public Response getByWorkspaceWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnectionWithSystemData getByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - PrivateEndpointConnectionWithSystemDataInner inner = - this.serviceClient().getByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); + public PrivateEndpointConnectionWithSystemData getByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionWithSystemDataInner inner + = this.serviceClient().getByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); if (inner != null) { return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); } else { @@ -71,49 +67,35 @@ public PrivateEndpointConnectionWithSystemData getByWorkspace( } } - public Response deleteByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return this - .serviceClient() + 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) { + public void deleteByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName) { this.serviceClient().deleteByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName); } - public Response updateByWorkspaceWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, + public Response updateByWorkspaceWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context) { - Response inner = - this - .serviceClient() - .updateByWorkspaceWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, connection, context); + Response inner = this.serviceClient() + .updateByWorkspaceWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, connection, + context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnectionWithSystemData updateByWorkspace( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - PrivateEndpointConnectionWithSystemDataInner inner = - this - .serviceClient() - .updateByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName, connection); + public PrivateEndpointConnectionWithSystemData updateByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnection connection) { + PrivateEndpointConnectionWithSystemDataInner inner = this.serviceClient() + .updateByWorkspace(resourceGroupName, workspaceName, privateEndpointConnectionName, connection); if (inner != null) { return new PrivateEndpointConnectionWithSystemDataImpl(inner, this.manager()); } else { @@ -121,48 +103,38 @@ public PrivateEndpointConnectionWithSystemData updateByWorkspace( } } - 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) { + PagedIterable inner + = this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); } - public PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); - } - - public Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); + 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 ResourceManagerUtils.mapPage(inner, + inner1 -> new PrivateEndpointConnectionWithSystemDataImpl(inner1, this.manager())); + } + + public Response getByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnectionWithSystemData getByHostPool( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName) { - PrivateEndpointConnectionWithSystemDataInner inner = - this.serviceClient().getByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName); + 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 { @@ -170,10 +142,9 @@ public PrivateEndpointConnectionWithSystemData getByHostPool( } } - public Response deleteByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context) { - return this - .serviceClient() + public Response deleteByHostPoolWithResponse(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, Context context) { + return this.serviceClient() .deleteByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, context); } @@ -181,37 +152,24 @@ public void deleteByHostPool(String resourceGroupName, String hostPoolName, Stri this.serviceClient().deleteByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName); } - public Response updateByHostPoolWithResponse( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, + public Response updateByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context) { - Response inner = - this - .serviceClient() - .updateByHostPoolWithResponse( - resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, context); + Response inner = this.serviceClient() + .updateByHostPoolWithResponse(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection, + context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new PrivateEndpointConnectionWithSystemDataImpl(inner.getValue(), this.manager())); } else { return null; } } - public PrivateEndpointConnectionWithSystemData updateByHostPool( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection) { - PrivateEndpointConnectionWithSystemDataInner inner = - this - .serviceClient() - .updateByHostPool(resourceGroupName, hostPoolName, privateEndpointConnectionName, connection); + 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 { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java index 5719a5128e9e..24cd87756cfb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourceImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.desktopvirtualization.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource; import java.util.Collections; @@ -14,8 +15,7 @@ public final class PrivateLinkResourceImpl implements PrivateLinkResource { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - PrivateLinkResourceImpl( - PrivateLinkResourceInner innerObject, + PrivateLinkResourceImpl(PrivateLinkResourceInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -33,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String groupId() { return this.innerModel().groupId(); } 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 7900ce2c695b..798aa1f6c59b 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 @@ -30,23 +30,28 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResourceListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final PrivateLinkResourcesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ PrivateLinkResourcesClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy - .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,64 +62,46 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface PrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByWorkspace( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("pageSize") Integer pageSize, - @QueryParam("isDescending") Boolean isDescending, - @QueryParam("initialSkip") Integer initialSkip, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByWorkspace(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @QueryParam("pageSize") Integer pageSize, @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHostPool( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @QueryParam("pageSize") Integer pageSize, - @QueryParam("isDescending") Boolean isDescending, - @QueryParam("initialSkip") Integer initialSkip, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHostPool(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspaceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHostPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param pageSize Number of items per page. @@ -123,23 +110,19 @@ Mono> listByHostPoolNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, + String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -150,35 +133,17 @@ private Mono> listByWorkspaceSinglePageA } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param pageSize Number of items per page. @@ -188,28 +153,19 @@ private Mono> listByWorkspaceSinglePageA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByWorkspaceSinglePageAsync( - String resourceGroupName, - String workspaceName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listByWorkspaceSinglePageAsync(String resourceGroupName, + String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -221,31 +177,15 @@ private Mono> listByWorkspaceSinglePageA final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByWorkspace( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByWorkspace(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param pageSize Number of items per page. @@ -257,8 +197,8 @@ private Mono> listByWorkspaceSinglePageA * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByWorkspaceAsync( - String resourceGroupName, String workspaceName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip), nextLink -> listByWorkspaceNextSinglePageAsync(nextLink)); @@ -266,7 +206,7 @@ public PagedFlux listByWorkspaceAsync( /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,7 +226,7 @@ public PagedFlux listByWorkspaceAsync(String resourceG /** * 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. @@ -299,23 +239,15 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - return new PagedFlux<>( - () -> - listByWorkspaceSinglePageAsync( - resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context), - nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); + private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, pageSize, + isDescending, initialSkip, context), nextLink -> listByWorkspaceNextSinglePageAsync(nextLink, context)); } /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -334,7 +266,7 @@ public PagedIterable listByWorkspace(String resourceGr /** * 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. @@ -347,20 +279,15 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 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. @@ -369,23 +296,19 @@ public PagedIterable listByWorkspace( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listByHostPoolSinglePageAsync(String resourceGroupName, + String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -396,35 +319,17 @@ private Mono> listByHostPoolSinglePageAs } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List the private link resources available for this hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -434,28 +339,19 @@ private Mono> listByHostPoolSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listByHostPoolSinglePageAsync(String resourceGroupName, + String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -467,31 +363,15 @@ private Mono> listByHostPoolSinglePageAs final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List the private link resources available for this hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -503,8 +383,8 @@ private Mono> listByHostPoolSinglePageAs * @return a list of private link resources as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); @@ -512,7 +392,7 @@ public PagedFlux listByHostPoolAsync( /** * 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. @@ -532,7 +412,7 @@ public PagedFlux listByHostPoolAsync(String resourceGr /** * 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. @@ -545,23 +425,15 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - return new PagedFlux<>( - () -> - listByHostPoolSinglePageAsync( - resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, + isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } /** * List the private link resources available for this hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -580,7 +452,7 @@ public PagedIterable listByHostPool(String resourceGro /** * 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. @@ -593,27 +465,23 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 URL to get the next list of items - *

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

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByHostPoolNextSinglePageAsync(String nextLink) { @@ -697,62 +548,44 @@ private Mono> listByHostPoolNextSinglePa 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of private link resources along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByHostPoolNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/PrivateLinkResourcesImpl.java index bf1f3ace3c3a..864da3ae147d 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 @@ -19,51 +19,36 @@ public final class PrivateLinkResourcesImpl implements PrivateLinkResources { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public PrivateLinkResourcesImpl( - PrivateLinkResourcesClient innerClient, + public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PagedIterable listByWorkspace( - String resourceGroupName, - String workspaceName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByWorkspace(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = this.serviceClient() + .listByWorkspace(resourceGroupName, workspaceName, pageSize, isDescending, initialSkip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { - PagedIterable inner = - this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } - public PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByHostPool(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context); - return Utils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + 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 ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); } private PrivateLinkResourcesClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/RegistrationInfoImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/RegistrationInfoImpl.java index 407cb38ea853..0e857f9949b9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/RegistrationInfoImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/RegistrationInfoImpl.java @@ -14,8 +14,7 @@ public final class RegistrationInfoImpl implements RegistrationInfo { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - RegistrationInfoImpl( - RegistrationInfoInner innerObject, + RegistrationInfoImpl(RegistrationInfoInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/Utils.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ResourceManagerUtils.java similarity index 80% rename from sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/Utils.java rename to sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ResourceManagerUtils.java index d7ad6e805e92..4edabe20acd3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/Utils.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -60,7 +63,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -74,7 +77,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +87,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +127,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +189,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ResourceProviderOperationImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ResourceProviderOperationImpl.java index 25e1b3dad405..6c118650e835 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ResourceProviderOperationImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ResourceProviderOperationImpl.java @@ -14,8 +14,7 @@ public final class ResourceProviderOperationImpl implements ResourceProviderOper private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - ResourceProviderOperationImpl( - ResourceProviderOperationInner innerObject, + ResourceProviderOperationImpl(ResourceProviderOperationInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanImpl.java index 0a9b66424d62..4419c5172090 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 @@ -152,27 +152,23 @@ public ScalingPlanImpl withExistingResourceGroup(String resourceGroupName) { } public ScalingPlan create() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlans() - .createWithResponse(resourceGroupName, scalingPlanName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlans() + .createWithResponse(resourceGroupName, scalingPlanName, this.innerModel(), Context.NONE) + .getValue(); return this; } public ScalingPlan create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlans() - .createWithResponse(resourceGroupName, scalingPlanName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlans() + .createWithResponse(resourceGroupName, scalingPlanName, this.innerModel(), context) + .getValue(); return this; } - ScalingPlanImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + ScalingPlanImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new ScalingPlanInner(); this.serviceManager = serviceManager; this.scalingPlanName = name; @@ -184,51 +180,42 @@ public ScalingPlanImpl update() { } public ScalingPlan apply() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlans() - .updateWithResponse(resourceGroupName, scalingPlanName, updateScalingPlan, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlans() + .updateWithResponse(resourceGroupName, scalingPlanName, updateScalingPlan, Context.NONE) + .getValue(); return this; } public ScalingPlan apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlans() - .updateWithResponse(resourceGroupName, scalingPlanName, updateScalingPlan, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlans() + .updateWithResponse(resourceGroupName, scalingPlanName, updateScalingPlan, context) + .getValue(); return this; } - ScalingPlanImpl( - ScalingPlanInner innerObject, + ScalingPlanImpl(ScalingPlanInner 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.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.scalingPlanName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scalingPlans"); } public ScalingPlan refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlans() - .getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlans() + .getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, Context.NONE) + .getValue(); return this; } public ScalingPlan refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlans() - .getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlans() + .getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, context) + .getValue(); return this; } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java index 61281fff0eeb..8ce69bb08598 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalScheduleImpl.java @@ -175,29 +175,24 @@ public ScalingPlanPersonalScheduleImpl withExistingScalingPlan(String resourceGr } public ScalingPlanPersonalSchedule create() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPersonalSchedules() - .createWithResponse( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPersonalSchedules() + .createWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public ScalingPlanPersonalSchedule create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPersonalSchedules() - .createWithResponse( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPersonalSchedules() + .createWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), context) + .getValue(); return this; } - ScalingPlanPersonalScheduleImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + ScalingPlanPersonalScheduleImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new ScalingPlanPersonalScheduleInner(); this.serviceManager = serviceManager; this.scalingPlanScheduleName = name; @@ -209,58 +204,45 @@ public ScalingPlanPersonalScheduleImpl update() { } public ScalingPlanPersonalSchedule apply() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPersonalSchedules() - .updateWithResponse( - resourceGroupName, - scalingPlanName, - scalingPlanScheduleName, - updateScalingPlanSchedule, - Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPersonalSchedules() + .updateWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, updateScalingPlanSchedule, + Context.NONE) + .getValue(); return this; } public ScalingPlanPersonalSchedule apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPersonalSchedules() - .updateWithResponse( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, updateScalingPlanSchedule, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPersonalSchedules() + .updateWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, updateScalingPlanSchedule, + context) + .getValue(); return this; } - ScalingPlanPersonalScheduleImpl( - ScalingPlanPersonalScheduleInner innerObject, + ScalingPlanPersonalScheduleImpl(ScalingPlanPersonalScheduleInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.scalingPlanName = Utils.getValueFromIdByName(innerObject.id(), "scalingPlans"); - this.scalingPlanScheduleName = Utils.getValueFromIdByName(innerObject.id(), "personalSchedules"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.scalingPlanName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scalingPlans"); + this.scalingPlanScheduleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "personalSchedules"); } public ScalingPlanPersonalSchedule refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPersonalSchedules() - .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPersonalSchedules() + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) + .getValue(); return this; } public ScalingPlanPersonalSchedule refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPersonalSchedules() - .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPersonalSchedules() + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context) + .getValue(); return this; } @@ -304,8 +286,8 @@ public ScalingPlanPersonalScheduleImpl withRampUpStartVMOnConnect(SetStartVMOnCo } } - public ScalingPlanPersonalScheduleImpl withRampUpActionOnDisconnect( - SessionHandlingOperation rampUpActionOnDisconnect) { + public ScalingPlanPersonalScheduleImpl + withRampUpActionOnDisconnect(SessionHandlingOperation rampUpActionOnDisconnect) { if (isInCreateMode()) { this.innerModel().withRampUpActionOnDisconnect(rampUpActionOnDisconnect); return this; @@ -315,8 +297,8 @@ public ScalingPlanPersonalScheduleImpl withRampUpActionOnDisconnect( } } - public ScalingPlanPersonalScheduleImpl withRampUpMinutesToWaitOnDisconnect( - Integer rampUpMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleImpl + withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect) { if (isInCreateMode()) { this.innerModel().withRampUpMinutesToWaitOnDisconnect(rampUpMinutesToWaitOnDisconnect); return this; @@ -426,8 +408,8 @@ public ScalingPlanPersonalScheduleImpl withRampDownStartVMOnConnect(SetStartVMOn } } - public ScalingPlanPersonalScheduleImpl withRampDownActionOnDisconnect( - SessionHandlingOperation rampDownActionOnDisconnect) { + public ScalingPlanPersonalScheduleImpl + withRampDownActionOnDisconnect(SessionHandlingOperation rampDownActionOnDisconnect) { if (isInCreateMode()) { this.innerModel().withRampDownActionOnDisconnect(rampDownActionOnDisconnect); return this; @@ -437,8 +419,8 @@ public ScalingPlanPersonalScheduleImpl withRampDownActionOnDisconnect( } } - public ScalingPlanPersonalScheduleImpl withRampDownMinutesToWaitOnDisconnect( - Integer rampDownMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleImpl + withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect) { if (isInCreateMode()) { this.innerModel().withRampDownMinutesToWaitOnDisconnect(rampDownMinutesToWaitOnDisconnect); return this; @@ -488,8 +470,8 @@ public ScalingPlanPersonalScheduleImpl withOffPeakStartVMOnConnect(SetStartVMOnC } } - public ScalingPlanPersonalScheduleImpl withOffPeakActionOnDisconnect( - SessionHandlingOperation offPeakActionOnDisconnect) { + public ScalingPlanPersonalScheduleImpl + withOffPeakActionOnDisconnect(SessionHandlingOperation offPeakActionOnDisconnect) { if (isInCreateMode()) { this.innerModel().withOffPeakActionOnDisconnect(offPeakActionOnDisconnect); return this; @@ -499,8 +481,8 @@ public ScalingPlanPersonalScheduleImpl withOffPeakActionOnDisconnect( } } - public ScalingPlanPersonalScheduleImpl withOffPeakMinutesToWaitOnDisconnect( - Integer offPeakMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalScheduleImpl + withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect) { if (isInCreateMode()) { this.innerModel().withOffPeakMinutesToWaitOnDisconnect(offPeakMinutesToWaitOnDisconnect); return this; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java index 9003c60dcb0e..57e5fef7414b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesClientImpl.java @@ -35,24 +35,28 @@ import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ScalingPlanPersonalSchedulesClient. */ +/** + * An instance of this class provides access to all the operations defined in ScalingPlanPersonalSchedulesClient. + */ public final class ScalingPlanPersonalSchedulesClientImpl implements ScalingPlanPersonalSchedulesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ScalingPlanPersonalSchedulesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of ScalingPlanPersonalSchedulesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ScalingPlanPersonalSchedulesClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy - .create( - ScalingPlanPersonalSchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ScalingPlanPersonalSchedulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,99 +67,75 @@ public final class ScalingPlanPersonalSchedulesClientImpl implements ScalingPlan @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface ScalingPlanPersonalSchedulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + 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, + @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scalingPlanName") String scalingPlanName, @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, @BodyParam("application/json") ScalingPlanPersonalScheduleInner scalingPlanSchedule, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + 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, + @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules/{scalingPlanScheduleName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scalingPlanName") String scalingPlanName, @PathParam("scalingPlanScheduleName") String scalingPlanScheduleName, @BodyParam("application/json") ScalingPlanPersonalSchedulePatch scalingPlanSchedule, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/personalSchedules") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + 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); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -165,19 +145,15 @@ Mono> listNext( * @return a ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -188,30 +164,20 @@ public Mono> getWithResponseAsync( .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.")); + 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)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, scalingPlanScheduleName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -222,19 +188,15 @@ public Mono> getWithResponseAsync( * @return a ScalingPlanPersonalSchedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -245,27 +207,18 @@ private Mono> getWithResponseAsync( .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.")); + 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); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, scalingPlanScheduleName, accept, context); } /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -275,15 +228,15 @@ private Mono> getWithResponseAsync( * @return a ScalingPlanPersonalSchedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono getAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -294,14 +247,14 @@ public Mono getAsync( * @return a ScalingPlanPersonalSchedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + public Response getWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, Context context) { return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block(); } /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -311,14 +264,14 @@ public Response getWithResponse( * @return a ScalingPlanPersonalSchedule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanPersonalScheduleInner get( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public ScalingPlanPersonalScheduleInner get(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { return getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE).getValue(); } /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -327,25 +280,18 @@ public ScalingPlanPersonalScheduleInner get( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule) { + public Mono> createWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -356,9 +302,8 @@ public Mono> createWithResponseAsync( .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.")); + return Mono.error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); } if (scalingPlanSchedule == null) { return Mono @@ -368,25 +313,15 @@ public Mono> createWithResponseAsync( } 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)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, scalingPlanScheduleName, + scalingPlanSchedule, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -396,26 +331,19 @@ public Mono> createWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule, + private Mono> createWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -426,9 +354,8 @@ private Mono> createWithResponseAsync .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.")); + return Mono.error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); } if (scalingPlanSchedule == null) { return Mono @@ -438,22 +365,13 @@ private Mono> createWithResponseAsync } 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); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, accept, context); } /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -464,18 +382,15 @@ private Mono> createWithResponseAsync * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule) { + public Mono createAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule) { return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -487,20 +402,16 @@ public Mono createAsync( * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule, + public Response createWithResponse(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule, Context context) { - return createWithResponseAsync( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) - .block(); + return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, + context).block(); } /** * Create or update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -511,19 +422,15 @@ public Response createWithResponse( * @return represents a ScalingPlanPersonalSchedule definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanPersonalScheduleInner create( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalScheduleInner scalingPlanSchedule) { - return createWithResponse( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) - .getValue(); + public ScalingPlanPersonalScheduleInner create(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPersonalScheduleInner scalingPlanSchedule) { + return createWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, + Context.NONE).getValue(); } /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -533,19 +440,15 @@ public ScalingPlanPersonalScheduleInner create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -556,30 +459,20 @@ public Mono> deleteWithResponseAsync( .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.")); + 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)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, scalingPlanScheduleName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -590,19 +483,15 @@ public Mono> deleteWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -613,27 +502,18 @@ private Mono> deleteWithResponseAsync( .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.")); + 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); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, scalingPlanScheduleName, accept, context); } /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -650,7 +530,7 @@ public Mono deleteAsync(String resourceGroupName, String scalingPlanName, /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -661,14 +541,14 @@ public Mono deleteAsync(String resourceGroupName, String scalingPlanName, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, Context context) { return deleteWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context).block(); } /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -683,7 +563,7 @@ public void delete(String resourceGroupName, String scalingPlanName, String scal /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -692,25 +572,18 @@ public void delete(String resourceGroupName, String scalingPlanName, String scal * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalSchedulePatch scalingPlanSchedule) { + public Mono> updateWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalSchedulePatch scalingPlanSchedule) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -721,34 +594,23 @@ public Mono> updateWithResponseAsync( .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.")); + 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)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, scalingPlanScheduleName, + scalingPlanSchedule, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -758,26 +620,19 @@ public Mono> updateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalSchedulePatch scalingPlanSchedule, + private Mono> updateWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalSchedulePatch scalingPlanSchedule, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -788,31 +643,21 @@ private Mono> updateWithResponseAsync .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.")); + 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); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, accept, context); } /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -822,8 +667,8 @@ private Mono> updateWithResponseAsync * @return represents a ScalingPlanPersonalSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono updateAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { final ScalingPlanPersonalSchedulePatch scalingPlanSchedule = null; return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -831,7 +676,7 @@ public Mono updateAsync( /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -843,20 +688,16 @@ public Mono updateAsync( * @return represents a ScalingPlanPersonalSchedule definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPersonalSchedulePatch scalingPlanSchedule, + public Response updateWithResponse(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPersonalSchedulePatch scalingPlanSchedule, Context context) { - return updateWithResponseAsync( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, context) - .block(); + return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, + context).block(); } /** * Update a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -866,17 +707,16 @@ public Response updateWithResponse( * @return represents a ScalingPlanPersonalSchedule definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanPersonalScheduleInner update( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public ScalingPlanPersonalScheduleInner update(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { final ScalingPlanPersonalSchedulePatch scalingPlanSchedule = null; - return updateWithResponse( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) - .getValue(); + return updateWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, + Context.NONE).getValue(); } /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -885,23 +725,19 @@ public ScalingPlanPersonalScheduleInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -913,35 +749,17 @@ private Mono> listSinglePageAsyn } 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)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, pageSize, isDescending, + initialSkip, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -951,28 +769,19 @@ private Mono> listSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String scalingPlanName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -985,31 +794,15 @@ private Mono> listSinglePageAsyn 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(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -1021,8 +814,8 @@ private Mono> listSinglePageAsyn * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listAsync(String resourceGroupName, String scalingPlanName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -1030,7 +823,7 @@ public PagedFlux listAsync( /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1050,7 +843,7 @@ public PagedFlux listAsync(String resourceGrou /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -1063,13 +856,8 @@ public PagedFlux listAsync(String resourceGrou * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String scalingPlanName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + 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)); @@ -1077,7 +865,7 @@ private PagedFlux listAsync( /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1095,7 +883,7 @@ public PagedIterable list(String resourceGroup /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -1108,27 +896,23 @@ public PagedIterable list(String resourceGroup * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String scalingPlanName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + 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. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1136,62 +920,43 @@ private Mono> listNextSinglePage 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.")); + 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)) + 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. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return scalingPlanPersonalScheduleList along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java index 2624a4702113..533f86fb5eda 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlanPersonalSchedulesImpl.java @@ -21,32 +21,28 @@ public final class ScalingPlanPersonalSchedulesImpl implements ScalingPlanPerson private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public ScalingPlanPersonalSchedulesImpl( - ScalingPlanPersonalSchedulesClient innerClient, + public ScalingPlanPersonalSchedulesImpl(ScalingPlanPersonalSchedulesClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScalingPlanPersonalScheduleImpl(inner.getValue(), this.manager())); } else { return null; } } - public ScalingPlanPersonalSchedule get( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { - ScalingPlanPersonalScheduleInner inner = - this.serviceClient().get(resourceGroupName, scalingPlanName, scalingPlanScheduleName); + public ScalingPlanPersonalSchedule get(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { + ScalingPlanPersonalScheduleInner inner + = this.serviceClient().get(resourceGroupName, scalingPlanName, scalingPlanScheduleName); if (inner != null) { return new ScalingPlanPersonalScheduleImpl(inner, this.manager()); } else { @@ -54,10 +50,9 @@ public ScalingPlanPersonalSchedule get( } } - public Response deleteWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { - return this - .serviceClient() + public Response deleteWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, Context context) { + return this.serviceClient() .deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); } @@ -66,133 +61,93 @@ public void delete(String resourceGroupName, String scalingPlanName, String scal } public PagedIterable list(String resourceGroupName, String scalingPlanName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, scalingPlanName); - return Utils.mapPage(inner, inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, scalingPlanName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String scalingPlanName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip, context); - return Utils.mapPage(inner, inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager())); + public 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 ResourceManagerUtils.mapPage(inner, + inner1 -> new ScalingPlanPersonalScheduleImpl(inner1, this.manager())); } public ScalingPlanPersonalSchedule getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } - String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + String scalingPlanScheduleName = ResourceManagerUtils.getValueFromIdByName(id, "personalSchedules"); if (scalingPlanScheduleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); } - return this - .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) + return this.getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } - String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + String scalingPlanScheduleName = ResourceManagerUtils.getValueFromIdByName(id, "personalSchedules"); if (scalingPlanScheduleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); } return this.getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } - String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + String scalingPlanScheduleName = ResourceManagerUtils.getValueFromIdByName(id, "personalSchedules"); if (scalingPlanScheduleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); } this.deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } - String scalingPlanScheduleName = Utils.getValueFromIdByName(id, "personalSchedules"); + String scalingPlanScheduleName = ResourceManagerUtils.getValueFromIdByName(id, "personalSchedules"); if (scalingPlanScheduleName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'personalSchedules'.", id))); } return this.deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); } 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 index 7de704344ce7..ab84fb562dde 100644 --- 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 @@ -138,29 +138,24 @@ public ScalingPlanPooledScheduleImpl withExistingScalingPlan(String resourceGrou } public ScalingPlanPooledSchedule create() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPooledSchedules() - .createWithResponse( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), Context.NONE) - .getValue(); + 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(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPooledSchedules() + .createWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, this.innerModel(), context) + .getValue(); return this; } - ScalingPlanPooledScheduleImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + ScalingPlanPooledScheduleImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new ScalingPlanPooledScheduleInner(); this.serviceManager = serviceManager; this.scalingPlanScheduleName = name; @@ -172,58 +167,45 @@ public ScalingPlanPooledScheduleImpl update() { } public ScalingPlanPooledSchedule apply() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPooledSchedules() - .updateWithResponse( - resourceGroupName, - scalingPlanName, - scalingPlanScheduleName, - updateScalingPlanSchedule, - Context.NONE) - .getValue(); + 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(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPooledSchedules() + .updateWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, updateScalingPlanSchedule, + context) + .getValue(); return this; } - ScalingPlanPooledScheduleImpl( - ScalingPlanPooledScheduleInner innerObject, + 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"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.scalingPlanName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "scalingPlans"); + this.scalingPlanScheduleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "pooledSchedules"); } public ScalingPlanPooledSchedule refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getScalingPlanPooledSchedules() - .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) - .getValue(); + 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(); + this.innerObject = serviceManager.serviceClient() + .getScalingPlanPooledSchedules() + .getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context) + .getValue(); return this; } @@ -247,8 +229,8 @@ public ScalingPlanPooledScheduleImpl withRampUpStartTime(Time rampUpStartTime) { } } - public ScalingPlanPooledScheduleImpl withRampUpLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { + public ScalingPlanPooledScheduleImpl + withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { if (isInCreateMode()) { this.innerModel().withRampUpLoadBalancingAlgorithm(rampUpLoadBalancingAlgorithm); return this; @@ -288,8 +270,8 @@ public ScalingPlanPooledScheduleImpl withPeakStartTime(Time peakStartTime) { } } - public ScalingPlanPooledScheduleImpl withPeakLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { + public ScalingPlanPooledScheduleImpl + withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { if (isInCreateMode()) { this.innerModel().withPeakLoadBalancingAlgorithm(peakLoadBalancingAlgorithm); return this; @@ -309,8 +291,8 @@ public ScalingPlanPooledScheduleImpl withRampDownStartTime(Time rampDownStartTim } } - public ScalingPlanPooledScheduleImpl withRampDownLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { + public ScalingPlanPooledScheduleImpl + withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { if (isInCreateMode()) { this.innerModel().withRampDownLoadBalancingAlgorithm(rampDownLoadBalancingAlgorithm); return this; @@ -390,8 +372,8 @@ public ScalingPlanPooledScheduleImpl withOffPeakStartTime(Time offPeakStartTime) } } - public ScalingPlanPooledScheduleImpl withOffPeakLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { + public ScalingPlanPooledScheduleImpl + withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { if (isInCreateMode()) { this.innerModel().withOffPeakLoadBalancingAlgorithm(offPeakLoadBalancingAlgorithm); return this; 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 index 7f8850191754..930d041b1f3b 100644 --- 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 @@ -35,24 +35,28 @@ 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. */ +/** + * 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. */ + /** + * The proxy service used to perform REST calls. + */ private final ScalingPlanPooledSchedulesService service; - /** The service client containing this operation class. */ + /** + * 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.service = RestProxy.create(ScalingPlanPooledSchedulesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -63,99 +67,75 @@ public final class ScalingPlanPooledSchedulesClientImpl implements ScalingPlanPo @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}) + @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, + 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, + @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}) + @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, + 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); + @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}) + @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, + 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, + @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}) + @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, + 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); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}/pooledSchedules") - @ExpectedResponses({200}) + @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, + 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); + @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"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @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. @@ -165,19 +145,15 @@ Mono> listNext( * @return a ScalingPlanPooledSchedule along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono> getWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -188,30 +164,20 @@ public Mono> getWithResponseAsync( .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.")); + 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)) + .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. @@ -222,19 +188,15 @@ public Mono> getWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -245,27 +207,18 @@ private Mono> getWithResponseAsync( .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.")); + 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); + 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. @@ -275,15 +228,15 @@ private Mono> getWithResponseAsync( * @return a ScalingPlanPooledSchedule on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono getAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { return getWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -294,14 +247,14 @@ public Mono getAsync( * @return a ScalingPlanPooledSchedule along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + 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. @@ -311,14 +264,14 @@ public Response getWithResponse( * @return a ScalingPlanPooledSchedule. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanPooledScheduleInner get( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + 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. @@ -327,25 +280,18 @@ public ScalingPlanPooledScheduleInner get( * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledScheduleInner scalingPlanSchedule) { + public Mono> createWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPooledScheduleInner scalingPlanSchedule) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -356,9 +302,8 @@ public Mono> createWithResponseAsync( .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.")); + return Mono.error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); } if (scalingPlanSchedule == null) { return Mono @@ -368,25 +313,15 @@ public Mono> createWithResponseAsync( } 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)) + .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. @@ -396,26 +331,19 @@ public Mono> createWithResponseAsync( * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledScheduleInner scalingPlanSchedule, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -426,9 +354,8 @@ private Mono> createWithResponseAsync( .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.")); + return Mono.error( + new IllegalArgumentException("Parameter scalingPlanScheduleName is required and cannot be null.")); } if (scalingPlanSchedule == null) { return Mono @@ -438,22 +365,13 @@ private Mono> createWithResponseAsync( } 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); + 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. @@ -464,18 +382,15 @@ private Mono> createWithResponseAsync( * @return represents a ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledScheduleInner scalingPlanSchedule) { + public Mono createAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, ScalingPlanPooledScheduleInner scalingPlanSchedule) { return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or update a ScalingPlanPooledSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -487,20 +402,15 @@ public Mono createAsync( * @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(); + 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. @@ -511,19 +421,15 @@ public Response createWithResponse( * @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(); + 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. @@ -533,19 +439,15 @@ public ScalingPlanPooledScheduleInner create( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -556,30 +458,20 @@ public Mono> deleteWithResponseAsync( .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.")); + 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)) + .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. @@ -590,19 +482,15 @@ public Mono> deleteWithResponseAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -613,27 +501,18 @@ private Mono> deleteWithResponseAsync( .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.")); + 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); + 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. @@ -650,7 +529,7 @@ public Mono deleteAsync(String resourceGroupName, String scalingPlanName, /** * 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. @@ -661,14 +540,14 @@ public Mono deleteAsync(String resourceGroupName, String scalingPlanName, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { + 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. @@ -683,7 +562,7 @@ public void delete(String resourceGroupName, String scalingPlanName, String scal /** * 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. @@ -692,25 +571,18 @@ public void delete(String resourceGroupName, String scalingPlanName, String scal * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledSchedulePatch scalingPlanSchedule) { + public Mono> updateWithResponseAsync(String resourceGroupName, + String scalingPlanName, String scalingPlanScheduleName, ScalingPlanPooledSchedulePatch scalingPlanSchedule) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -721,34 +593,23 @@ public Mono> updateWithResponseAsync( .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.")); + 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)) + .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. @@ -758,26 +619,19 @@ public Mono> updateWithResponseAsync( * @throws 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}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String scalingPlanName, - String scalingPlanScheduleName, - ScalingPlanPooledSchedulePatch scalingPlanSchedule, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -788,31 +642,21 @@ private Mono> updateWithResponseAsync( .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.")); + 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); + 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. @@ -822,8 +666,8 @@ private Mono> updateWithResponseAsync( * @return represents a ScalingPlanPooledSchedule definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateAsync( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public Mono updateAsync(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { final ScalingPlanPooledSchedulePatch scalingPlanSchedule = null; return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -831,7 +675,7 @@ public Mono updateAsync( /** * 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. @@ -843,20 +687,15 @@ public Mono updateAsync( * @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(); + 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. @@ -866,17 +705,16 @@ public Response updateWithResponse( * @return represents a ScalingPlanPooledSchedule definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ScalingPlanPooledScheduleInner update( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName) { + public ScalingPlanPooledScheduleInner update(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName) { final ScalingPlanPooledSchedulePatch scalingPlanSchedule = null; - return updateWithResponse( - resourceGroupName, scalingPlanName, scalingPlanScheduleName, scalingPlanSchedule, Context.NONE) - .getValue(); + 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. @@ -888,19 +726,15 @@ public ScalingPlanPooledScheduleInner update( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -912,35 +746,17 @@ private Mono> listSinglePageAsync( } 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)) + .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. @@ -953,24 +769,15 @@ private Mono> listSinglePageAsync( * @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) { + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -983,31 +790,15 @@ private Mono> listSinglePageAsync( 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(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. @@ -1019,8 +810,8 @@ private Mono> listSinglePageAsync( * @return scalingPlanPooledScheduleList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, String scalingPlanName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listAsync(String resourceGroupName, String scalingPlanName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, scalingPlanName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -1028,7 +819,7 @@ public PagedFlux listAsync( /** * 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. @@ -1048,7 +839,7 @@ public PagedFlux listAsync(String resourceGroupN /** * 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. @@ -1061,13 +852,8 @@ public PagedFlux listAsync(String resourceGroupN * @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) { + 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)); @@ -1075,7 +861,7 @@ private PagedFlux listAsync( /** * 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. @@ -1093,7 +879,7 @@ public PagedIterable list(String resourceGroupNa /** * 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. @@ -1106,22 +892,18 @@ public PagedIterable list(String resourceGroupNa * @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) { + 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. + * + * 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. @@ -1133,31 +915,22 @@ private Mono> listNextSinglePageAs 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.")); + 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)) + 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. + * + * 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. @@ -1165,29 +938,19 @@ private Mono> listNextSinglePageAs * @return scalingPlanPooledScheduleList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { + 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.")); + 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)); + 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 index f9fa0d343303..041841991061 100644 --- 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 @@ -21,32 +21,28 @@ public final class ScalingPlanPooledSchedulesImpl implements ScalingPlanPooledSc private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public ScalingPlanPooledSchedulesImpl( - ScalingPlanPooledSchedulesClient innerClient, + 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); + 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(), + 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); + 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 { @@ -54,10 +50,9 @@ public ScalingPlanPooledSchedule get( } } - public Response deleteWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context) { - return this - .serviceClient() + public Response deleteWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, Context context) { + return this.serviceClient() .deleteWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, context); } @@ -66,129 +61,91 @@ public void delete(String resourceGroupName, String scalingPlanName, String scal } public PagedIterable list(String resourceGroupName, String scalingPlanName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, scalingPlanName); - return Utils.mapPage(inner, inner1 -> new ScalingPlanPooledScheduleImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, scalingPlanName); + return ResourceManagerUtils.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 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 ResourceManagerUtils.mapPage(inner, inner1 -> new ScalingPlanPooledScheduleImpl(inner1, this.manager())); } public ScalingPlanPooledSchedule getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + 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"); + String scalingPlanScheduleName = ResourceManagerUtils.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))); + 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) + return this.getWithResponse(resourceGroupName, scalingPlanName, scalingPlanScheduleName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + 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"); + String scalingPlanScheduleName = ResourceManagerUtils.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))); + 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"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + 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"); + String scalingPlanScheduleName = ResourceManagerUtils.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))); + 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"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + 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"); + String scalingPlanScheduleName = ResourceManagerUtils.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))); + 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); } 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 76774cd21245..f8001cd6618c 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 @@ -35,22 +35,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in ScalingPlansClient. + */ public final class ScalingPlansClientImpl implements ScalingPlansClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ScalingPlansService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of ScalingPlansClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ScalingPlansClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(ScalingPlansService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ScalingPlansService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,145 +67,105 @@ public final class ScalingPlansClientImpl implements ScalingPlansClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface ScalingPlansService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("scalingPlanName") String scalingPlanName, - @HeaderParam("Accept") String accept, + @PathParam("scalingPlanName") String scalingPlanName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> create(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scalingPlanName") String scalingPlanName, - @BodyParam("application/json") ScalingPlanInner scalingPlan, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ScalingPlanInner scalingPlan, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("scalingPlanName") String scalingPlanName, - @HeaderParam("Accept") String accept, + @PathParam("scalingPlanName") String scalingPlanName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("scalingPlanName") String scalingPlanName, - @BodyParam("application/json") ScalingPlanPatch scalingPlan, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ScalingPlanPatch scalingPlan, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @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); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @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); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - 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); + 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); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHostPool( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @QueryParam("pageSize") Integer pageSize, - @QueryParam("isDescending") Boolean isDescending, - @QueryParam("initialSkip") Integer initialSkip, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHostPool(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHostPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,19 +174,15 @@ Mono> listByHostPoolNext( * @return a scaling plan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String scalingPlanName) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String scalingPlanName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -232,23 +194,14 @@ public Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -258,19 +211,15 @@ public Mono> getByResourceGroupWithResponseAsync( * @return a scaling plan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String scalingPlanName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String scalingPlanName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -282,20 +231,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -311,7 +253,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, /** * 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. @@ -321,14 +263,14 @@ public Mono getByResourceGroupAsync(String resourceGroupName, * @return a scaling plan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String scalingPlanName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, scalingPlanName, context).block(); } /** * 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. @@ -343,7 +285,7 @@ public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scal /** * 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. @@ -353,19 +295,15 @@ public ScalingPlanInner getByResourceGroup(String resourceGroupName, String scal * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { + public Mono> createWithResponseAsync(String resourceGroupName, String scalingPlanName, + ScalingPlanInner scalingPlan) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -382,24 +320,14 @@ public Mono> createWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - scalingPlan, - accept, - context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, scalingPlan, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -410,19 +338,15 @@ public Mono> createWithResponseAsync( * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context) { + private Mono> createWithResponseAsync(String resourceGroupName, String scalingPlanName, + ScalingPlanInner scalingPlan, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -439,21 +363,13 @@ private Mono> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - scalingPlan, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, scalingPlan, accept, 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. @@ -463,15 +379,15 @@ private Mono> createWithResponseAsync( * @return scalingPlan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan) { + public Mono createAsync(String resourceGroupName, String scalingPlanName, + ScalingPlanInner scalingPlan) { return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -482,14 +398,14 @@ public Mono createAsync( * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanInner scalingPlan, Context context) { + public Response createWithResponse(String resourceGroupName, String scalingPlanName, + ScalingPlanInner scalingPlan, Context context) { return createWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).block(); } /** * 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. @@ -505,7 +421,7 @@ public ScalingPlanInner create(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. @@ -516,16 +432,12 @@ public ScalingPlanInner create(String resourceGroupName, String scalingPlanName, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -537,23 +449,14 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -563,19 +466,15 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String scalingPlanName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String scalingPlanName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -587,20 +486,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, accept, 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. @@ -615,7 +507,7 @@ public Mono deleteAsync(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. @@ -631,7 +523,7 @@ public Response deleteWithResponse(String resourceGroupName, String scalin /** * 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. @@ -645,7 +537,7 @@ public void delete(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. @@ -655,19 +547,15 @@ public void delete(String resourceGroupName, String scalingPlanName) { * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan) { + public Mono> updateWithResponseAsync(String resourceGroupName, String scalingPlanName, + ScalingPlanPatch scalingPlan) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -682,24 +570,14 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - scalingPlan, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, scalingPlanName, scalingPlan, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -710,19 +588,15 @@ public Mono> updateWithResponseAsync( * @return scalingPlan along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String scalingPlanName, + ScalingPlanPatch scalingPlan, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -737,21 +611,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - scalingPlanName, - scalingPlan, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, scalingPlanName, scalingPlan, accept, context); } /** * 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. @@ -768,7 +634,7 @@ public Mono updateAsync(String resourceGroupName, String scali /** * 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. @@ -779,14 +645,14 @@ public Mono updateAsync(String resourceGroupName, String scali * @return scalingPlan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String scalingPlanName, ScalingPlanPatch scalingPlan, Context context) { + public Response updateWithResponse(String resourceGroupName, String scalingPlanName, + ScalingPlanPatch scalingPlan, Context context) { return updateWithResponseAsync(resourceGroupName, scalingPlanName, scalingPlan, context).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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -802,7 +668,7 @@ public ScalingPlanInner update(String resourceGroupName, String scalingPlanName) /** * 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. @@ -813,19 +679,15 @@ public ScalingPlanInner update(String resourceGroupName, String scalingPlanName) * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -833,34 +695,17 @@ private Mono> listByResourceGroupSinglePageAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 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. @@ -872,19 +717,15 @@ private Mono> listByResourceGroupSinglePageAsync * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -892,31 +733,15 @@ private Mono> listByResourceGroupSinglePageAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), 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. @@ -927,8 +752,8 @@ private Mono> listByResourceGroupSinglePageAsync * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); @@ -936,7 +761,7 @@ public PagedFlux listByResourceGroupAsync( /** * 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 ManagementException thrown if the request is rejected by server. @@ -955,7 +780,7 @@ 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. @@ -967,8 +792,8 @@ public PagedFlux listByResourceGroupAsync(String resourceGroup * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); @@ -976,7 +801,7 @@ private PagedFlux listByResourceGroupAsync( /** * 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 ManagementException thrown if the request is rejected by server. @@ -993,7 +818,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN /** * 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. @@ -1005,15 +830,15 @@ public PagedIterable listByResourceGroup(String resourceGroupN * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context 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. @@ -1023,49 +848,28 @@ public PagedIterable listByResourceGroup( * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 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. @@ -1076,46 +880,28 @@ private Mono> listSinglePageAsync( * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private Mono> listSinglePageAsync(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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), pageSize, + isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List scaling plans in subscription. - * + * * @param pageSize Number of items per page. * @param isDescending Indicates whether the collection is descending. * @param initialSkip Initial number of items to skip. @@ -1126,14 +912,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip) { - return new PagedFlux<>( - () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + return new PagedFlux<>(() -> 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}. @@ -1143,14 +928,13 @@ public PagedFlux listAsync() { final Integer pageSize = null; final Boolean isDescending = null; final Integer initialSkip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(pageSize, isDescending, initialSkip), + 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. @@ -1161,16 +945,15 @@ public PagedFlux listAsync() { * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), + private PagedFlux listAsync(Integer pageSize, Boolean isDescending, Integer initialSkip, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(pageSize, isDescending, initialSkip, context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * 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 PagedIterable}. @@ -1185,7 +968,7 @@ public PagedIterable list() { /** * 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. @@ -1196,14 +979,14 @@ public PagedIterable list() { * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + public PagedIterable list(Integer pageSize, Boolean isDescending, Integer initialSkip, + Context context) { return new PagedIterable<>(listAsync(pageSize, isDescending, initialSkip, context)); } /** * List scaling plan associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -1215,19 +998,15 @@ public PagedIterable list( * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listByHostPoolSinglePageAsync(String resourceGroupName, + String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1238,35 +1017,17 @@ private Mono> listByHostPoolSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List 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. @@ -1279,24 +1040,15 @@ private Mono> listByHostPoolSinglePageAsync( * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listByHostPoolSinglePageAsync(String resourceGroupName, + String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1308,31 +1060,15 @@ private Mono> listByHostPoolSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List 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. @@ -1344,8 +1080,8 @@ private Mono> listByHostPoolSinglePageAsync( * @return scalingPlanList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); @@ -1353,7 +1089,7 @@ public PagedFlux listByHostPoolAsync( /** * 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. @@ -1373,7 +1109,7 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, /** * 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. @@ -1386,23 +1122,15 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, * @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, - Context context) { - return new PagedFlux<>( - () -> - listByHostPoolSinglePageAsync( - resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, pageSize, + isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } /** * List 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. @@ -1421,7 +1149,7 @@ public PagedIterable listByHostPool(String resourceGroupName, /** * 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. @@ -1434,22 +1162,18 @@ public PagedIterable listByHostPool(String resourceGroupName, * @return scalingPlanList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { return new PagedIterable<>( listByHostPoolAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1461,32 +1185,24 @@ private Mono> listByResourceGroupNextSinglePageA 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.")); + 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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1494,37 +1210,28 @@ private Mono> listByResourceGroupNextSinglePageA * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(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.")); + 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 - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1536,32 +1243,24 @@ private Mono> listBySubscriptionNextSinglePageAs 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.")); + 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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1569,37 +1268,28 @@ private Mono> listBySubscriptionNextSinglePageAs * @return scalingPlanList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(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.")); + 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 - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1611,31 +1301,23 @@ private Mono> listByHostPoolNextSinglePageAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1648,23 +1330,13 @@ private Mono> listByHostPoolNextSinglePageAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/ScalingPlansImpl.java index 4efb9b748a24..634b0ea66f7f 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 @@ -21,22 +21,18 @@ public final class ScalingPlansImpl implements ScalingPlans { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public ScalingPlansImpl( - ScalingPlansClient innerClient, + public ScalingPlansImpl(ScalingPlansClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String scalingPlanName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ScalingPlanImpl(inner.getValue(), this.manager())); } else { return null; @@ -52,8 +48,8 @@ public ScalingPlan getByResourceGroup(String resourceGroupName, String scalingPl } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String scalingPlanName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, scalingPlanName, context); } @@ -63,118 +59,91 @@ public void deleteByResourceGroup(String resourceGroupName, String scalingPlanNa public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } - 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())); + public PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, pageSize, isDescending, initialSkip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } - public PagedIterable list( - Integer pageSize, Boolean isDescending, Integer initialSkip, Context 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())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { PagedIterable inner = this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); - return Utils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ScalingPlanImpl(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 ScalingPlanImpl(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 ResourceManagerUtils.mapPage(inner, inner1 -> new ScalingPlanImpl(inner1, this.manager())); } public ScalingPlan getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, scalingPlanName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, scalingPlanName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + 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"); + String scalingPlanName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'scalingPlans'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, scalingPlanName, context); } 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 ec92cef6f5dc..70d75a4b9d9f 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 @@ -19,8 +19,7 @@ public final class SessionHostImpl implements SessionHost { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - SessionHostImpl( - SessionHostInner innerObject, + SessionHostImpl(SessionHostInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 06e5118701be..336ad37b00d6 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 @@ -34,22 +34,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in SessionHostsClient. + */ public final class SessionHostsClientImpl implements SessionHostsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final SessionHostsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of SessionHostsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ SessionHostsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(SessionHostsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(SessionHostsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -60,85 +66,58 @@ public final class SessionHostsClientImpl implements SessionHostsClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface SessionHostsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}") + @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("hostPoolName") String hostPoolName, - @PathParam("sessionHostName") String sessionHostname, - @HeaderParam("Accept") String accept, + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("sessionHostName") String sessionHostname, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @PathParam("sessionHostName") String sessionHostname, - @QueryParam("force") Boolean force, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("sessionHostName") String sessionHostname, @QueryParam("force") Boolean force, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}") + @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("hostPoolName") String hostPoolName, - @PathParam("sessionHostName") String sessionHostname, - @QueryParam("force") Boolean force, - @BodyParam("application/json") SessionHostPatch sessionHost, - @HeaderParam("Accept") String accept, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("sessionHostName") String sessionHostname, @QueryParam("force") Boolean force, + @BodyParam("application/json") SessionHostPatch sessionHost, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts") + @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("hostPoolName") String hostPoolName, - @QueryParam("pageSize") Integer pageSize, - @QueryParam("isDescending") Boolean isDescending, - @QueryParam("initialSkip") Integer initialSkip, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @QueryParam("pageSize") Integer pageSize, @QueryParam("isDescending") Boolean isDescending, + @QueryParam("initialSkip") Integer initialSkip, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * 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. @@ -148,19 +127,15 @@ Mono> listNext( * @return a session host along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname) { + public Mono> getWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -175,24 +150,14 @@ public Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -203,19 +168,15 @@ public Mono> getWithResponseAsync( * @return a session host along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -230,21 +191,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, sessionHostname, accept, context); } /** * 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. @@ -261,7 +214,7 @@ public Mono getAsync(String resourceGroupName, String hostPool /** * 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. @@ -272,14 +225,14 @@ public Mono getAsync(String resourceGroupName, String hostPool * @return a session host along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { + public Response getWithResponse(String resourceGroupName, String hostPoolName, + String sessionHostname, Context context) { return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, context).block(); } /** * 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. @@ -295,7 +248,7 @@ public SessionHostInner get(String resourceGroupName, String hostPoolName, Strin /** * 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. @@ -306,19 +259,15 @@ public SessionHostInner get(String resourceGroupName, String hostPoolName, Strin * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, Boolean force) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -332,26 +281,14 @@ public Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter sessionHostname 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, - hostPoolName, - sessionHostname, - force, - accept, - context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, force, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -363,19 +300,15 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, Boolean force, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -390,22 +323,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - force, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, sessionHostname, force, accept, 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. @@ -423,7 +347,7 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str /** * 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. @@ -435,14 +359,14 @@ public Mono deleteAsync(String resourceGroupName, String hostPoolName, Str * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context) { + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Boolean force, Context context) { return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, context).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. @@ -458,7 +382,7 @@ public void delete(String resourceGroupName, String hostPoolName, String session /** * 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. @@ -470,23 +394,15 @@ public void delete(String resourceGroupName, String hostPoolName, String session * @return represents a SessionHost definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost) { + public Mono> updateWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, Boolean force, SessionHostPatch sessionHost) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -504,26 +420,15 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - force, - sessionHost, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -536,24 +441,15 @@ public Mono> updateWithResponseAsync( * @return represents a SessionHost definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, Boolean force, SessionHostPatch sessionHost, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -571,23 +467,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - force, - sessionHost, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, accept, 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. @@ -606,7 +492,7 @@ public Mono updateAsync(String resourceGroupName, String hostP /** * 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. @@ -619,20 +505,15 @@ public Mono updateAsync(String resourceGroupName, String hostP * @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) { + public Response updateWithResponse(String resourceGroupName, String hostPoolName, + String sessionHostname, Boolean force, SessionHostPatch sessionHost, Context context) { return updateWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, context) .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. @@ -651,7 +532,7 @@ public SessionHostInner update(String resourceGroupName, String hostPoolName, St /** * 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. @@ -663,19 +544,15 @@ public SessionHostInner update(String resourceGroupName, String hostPoolName, St * @return sessionHostList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -686,35 +563,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, + accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List 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. @@ -727,24 +586,15 @@ private Mono> listSinglePageAsync( * @return sessionHostList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -756,31 +606,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List 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. @@ -792,8 +626,8 @@ private Mono> listSinglePageAsync( * @return sessionHostList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, String hostPoolName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listAsync(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -801,7 +635,7 @@ public PagedFlux listAsync( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -821,7 +655,7 @@ public PagedFlux listAsync(String resourceGroupName, String ho /** * 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. @@ -834,13 +668,8 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private PagedFlux listAsync(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, hostPoolName, pageSize, isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); @@ -848,7 +677,7 @@ private PagedFlux listAsync( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -866,7 +695,7 @@ public PagedIterable list(String resourceGroupName, String hos /** * 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. @@ -879,22 +708,18 @@ 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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 URL to get the next list of items - *

The nextLink parameter. + * + * 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,31 +731,22 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)) + 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. + * + * 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. @@ -943,23 +759,13 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)); + 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/SessionHostsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/SessionHostsImpl.java index 14fa001189c6..221be96abcf5 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 @@ -22,22 +22,18 @@ public final class SessionHostsImpl implements SessionHosts { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public SessionHostsImpl( - SessionHostsClient innerClient, + public SessionHostsImpl(SessionHostsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, hostPoolName, sessionHostname, context); + public Response getWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, hostPoolName, sessionHostname, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SessionHostImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,10 +49,9 @@ public SessionHost get(String resourceGroupName, String hostPoolName, String ses } } - public Response deleteWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Boolean force, Context context) { - return this - .serviceClient() + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Boolean force, Context context) { + return this.serviceClient() .deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, context); } @@ -64,22 +59,12 @@ public void delete(String resourceGroupName, String hostPoolName, String session this.serviceClient().delete(resourceGroupName, hostPoolName, sessionHostname); } - public Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, context); + public Response updateWithResponse(String resourceGroupName, String hostPoolName, + String sessionHostname, Boolean force, SessionHostPatch sessionHost, Context context) { + Response inner = this.serviceClient() + .updateWithResponse(resourceGroupName, hostPoolName, sessionHostname, force, sessionHost, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SessionHostImpl(inner.getValue(), this.manager())); } else { return null; @@ -97,19 +82,14 @@ public SessionHost update(String resourceGroupName, String hostPoolName, String public PagedIterable list(String resourceGroupName, String hostPoolName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, hostPoolName); - return Utils.mapPage(inner, inner1 -> new SessionHostImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionHostImpl(inner1, this.manager())); } - 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())); + 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 ResourceManagerUtils.mapPage(inner, inner1 -> new SessionHostImpl(inner1, this.manager())); } private SessionHostsClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemImpl.java index 121172f0cf2c..f1feef9d67f6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.desktopvirtualization.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemInner; import com.azure.resourcemanager.desktopvirtualization.models.StartMenuItem; @@ -12,8 +13,7 @@ public final class StartMenuItemImpl implements StartMenuItem { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - StartMenuItemImpl( - StartMenuItemInner innerObject, + StartMenuItemImpl(StartMenuItemInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -31,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String appAlias() { return this.innerModel().appAlias(); } 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 b86a574af682..1ce8127649f5 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 @@ -30,22 +30,28 @@ import com.azure.resourcemanager.desktopvirtualization.models.StartMenuItemList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in StartMenuItemsClient. */ +/** + * An instance of this class provides access to all the operations defined in StartMenuItemsClient. + */ public final class StartMenuItemsClientImpl implements StartMenuItemsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final StartMenuItemsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of StartMenuItemsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ StartMenuItemsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(StartMenuItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(StartMenuItemsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,37 +62,28 @@ public final class StartMenuItemsClientImpl implements StartMenuItemsClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface StartMenuItemsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @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); + @PathParam("applicationGroupName") String applicationGroupName, @QueryParam("pageSize") Integer pageSize, + @QueryParam("isDescending") Boolean isDescending, @QueryParam("initialSkip") Integer initialSkip, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * List start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -98,23 +95,15 @@ Mono> listNext( * @return startMenuItemList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + private Mono> listSinglePageAsync(String resourceGroupName, + String applicationGroupName, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -126,35 +115,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, applicationGroupName, 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 start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -167,24 +138,15 @@ private Mono> listSinglePageAsync( * @return startMenuItemList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String applicationGroupName, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -197,31 +159,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - applicationGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -233,12 +179,8 @@ private Mono> listSinglePageAsync( * @return startMenuItemList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + public PagedFlux listAsync(String resourceGroupName, String applicationGroupName, + Integer pageSize, Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); @@ -246,7 +188,7 @@ public PagedFlux listAsync( /** * 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. @@ -266,7 +208,7 @@ public PagedFlux listAsync(String resourceGroupName, String /** * List start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -279,23 +221,15 @@ public PagedFlux listAsync(String resourceGroupName, String * @return startMenuItemList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, applicationGroupName, pageSize, isDescending, initialSkip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String applicationGroupName, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, applicationGroupName, pageSize, + isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * 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. @@ -314,7 +248,7 @@ public PagedIterable list(String resourceGroupName, String a /** * List start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -327,22 +261,18 @@ public PagedIterable list(String resourceGroupName, String a * @return startMenuItemList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String applicationGroupName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context 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 URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -354,31 +284,22 @@ private Mono> listNextSinglePageAsync(String n 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.")); + 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)) + 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. + * + * 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. @@ -391,23 +312,13 @@ private Mono> listNextSinglePageAsync(String n 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.")); + 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)); + 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/StartMenuItemsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/StartMenuItemsImpl.java index efd30a677bca..e2482fd67aa8 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 @@ -19,8 +19,7 @@ public final class StartMenuItemsImpl implements StartMenuItems { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public StartMenuItemsImpl( - StartMenuItemsClient innerClient, + public StartMenuItemsImpl(StartMenuItemsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,21 +27,14 @@ public StartMenuItemsImpl( public PagedIterable list(String resourceGroupName, String applicationGroupName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, applicationGroupName); - return Utils.mapPage(inner, inner1 -> new StartMenuItemImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new StartMenuItemImpl(inner1, this.manager())); } - 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 StartMenuItemImpl(inner1, this.manager())); + 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 ResourceManagerUtils.mapPage(inner, inner1 -> new StartMenuItemImpl(inner1, this.manager())); } private StartMenuItemsClient serviceClient() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionImpl.java index 822017bf2edd..0afac654868f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionImpl.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionImpl.java @@ -16,8 +16,7 @@ public final class UserSessionImpl implements UserSession { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - UserSessionImpl( - UserSessionInner innerObject, + UserSessionImpl(UserSessionInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 b0a00a835d0e..133d5f571067 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 @@ -34,22 +34,28 @@ import com.azure.resourcemanager.desktopvirtualization.models.UserSessionList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in UserSessionsClient. */ +/** + * An instance of this class provides access to all the operations defined in UserSessionsClient. + */ public final class UserSessionsClientImpl implements UserSessionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final UserSessionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of UserSessionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ UserSessionsClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(UserSessionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(UserSessionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -60,132 +66,88 @@ public final class UserSessionsClientImpl implements UserSessionsClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface UserSessionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByHostPool( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @QueryParam("$filter") String filter, - @QueryParam("pageSize") Integer pageSize, - @QueryParam("isDescending") Boolean isDescending, - @QueryParam("initialSkip") Integer initialSkip, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByHostPool(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}") + @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("hostPoolName") String hostPoolName, - @PathParam("sessionHostName") String sessionHostname, - @PathParam("userSessionId") String userSessionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("sessionHostName") String sessionHostname, @PathParam("userSessionId") String userSessionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @PathParam("sessionHostName") String sessionHostname, - @PathParam("userSessionId") String userSessionId, - @QueryParam("force") Boolean force, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("sessionHostName") String sessionHostname, @PathParam("userSessionId") String userSessionId, + @QueryParam("force") Boolean force, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions") + @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("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); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @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); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> disconnect( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @PathParam("sessionHostName") String sessionHostname, - @PathParam("userSessionId") String userSessionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> disconnect(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("sessionHostName") String sessionHostname, @PathParam("userSessionId") String userSessionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> sendMessage( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("hostPoolName") String hostPoolName, - @PathParam("sessionHostName") String sessionHostname, - @PathParam("userSessionId") String userSessionId, - @BodyParam("application/json") SendMessage sendMessage, - @HeaderParam("Accept") String accept, + Mono> sendMessage(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("hostPoolName") String hostPoolName, + @PathParam("sessionHostName") String sessionHostname, @PathParam("userSessionId") String userSessionId, + @BodyParam("application/json") SendMessage sendMessage, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByHostPoolNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * 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. @@ -198,24 +160,15 @@ Mono> listNext( * @return userSessionList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + private Mono> listByHostPoolSinglePageAsync(String resourceGroupName, + String hostPoolName, String filter, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -226,36 +179,17 @@ private Mono> listByHostPoolSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - filter, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, filter, 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 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. @@ -269,25 +203,16 @@ private Mono> listByHostPoolSinglePageAsync( * @return userSessionList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByHostPoolSinglePageAsync( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, + private Mono> listByHostPoolSinglePageAsync(String resourceGroupName, + String hostPoolName, String filter, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -299,32 +224,15 @@ private Mono> listByHostPoolSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByHostPool( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - filter, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByHostPool(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), 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 filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. @@ -337,23 +245,15 @@ private Mono> listByHostPoolSinglePageAsync( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByHostPoolAsync( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { - return new PagedFlux<>( - () -> - listByHostPoolSinglePageAsync( - resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + public PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>(() -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter, pageSize, + isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } /** * 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. @@ -367,16 +267,13 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, final Integer pageSize = null; final Boolean isDescending = null; final Integer initialSkip = null; - return new PagedFlux<>( - () -> - listByHostPoolSinglePageAsync( - resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter, pageSize, + isDescending, initialSkip), nextLink -> listByHostPoolNextSinglePageAsync(nextLink)); } /** * 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. @@ -390,24 +287,15 @@ public PagedFlux listByHostPoolAsync(String resourceGroupName, * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByHostPoolAsync( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - return new PagedFlux<>( - () -> - listByHostPoolSinglePageAsync( - resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context), - nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); + private PagedFlux listByHostPoolAsync(String resourceGroupName, String hostPoolName, + String filter, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listByHostPoolSinglePageAsync(resourceGroupName, hostPoolName, filter, pageSize, + isDescending, initialSkip, context), nextLink -> listByHostPoolNextSinglePageAsync(nextLink, context)); } /** * 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. @@ -427,7 +315,7 @@ public PagedIterable listByHostPool(String resourceGroupName, /** * 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. @@ -441,21 +329,15 @@ public PagedIterable listByHostPool(String resourceGroupName, * @return userSessionList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + public PagedIterable listByHostPool(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)); } /** * 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. @@ -466,19 +348,15 @@ public PagedIterable listByHostPool( * @return a userSession along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public Mono> getWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -496,25 +374,15 @@ public Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, userSessionId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -526,19 +394,15 @@ public Mono> getWithResponseAsync( * @return a userSession along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -556,22 +420,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, sessionHostname, userSessionId, accept, 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. @@ -582,15 +437,15 @@ private Mono> getWithResponseAsync( * @return a userSession on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public Mono getAsync(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -602,14 +457,14 @@ public Mono getAsync( * @return a userSession along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + public Response getWithResponse(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId, Context context) { return getWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context).block(); } /** * 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. @@ -620,15 +475,15 @@ public Response getWithResponse( * @return a userSession. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UserSessionInner get( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public UserSessionInner get(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { return getWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, Context.NONE) .getValue(); } /** * 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. @@ -640,19 +495,15 @@ public UserSessionInner get( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Boolean force) { + public Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId, Boolean force) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -670,26 +521,15 @@ public Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - force, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -702,24 +542,15 @@ public Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - Boolean force, - Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId, Boolean force, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -737,23 +568,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - force, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, accept, 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. @@ -764,8 +585,8 @@ 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 sessionHostname, String userSessionId) { + public Mono deleteAsync(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { final Boolean force = null; return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force) .flatMap(ignored -> Mono.empty()); @@ -773,7 +594,7 @@ public Mono deleteAsync( /** * 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. @@ -786,20 +607,15 @@ public Mono deleteAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - Boolean force, - Context context) { + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, Boolean force, Context context) { return deleteWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, context) .block(); } /** * 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. @@ -816,7 +632,7 @@ public void delete(String resourceGroupName, String hostPoolName, String session /** * 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. @@ -829,24 +645,15 @@ public void delete(String resourceGroupName, String hostPoolName, String session * @return userSessionList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { + private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -861,36 +668,17 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, 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 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. @@ -904,25 +692,15 @@ private Mono> listSinglePageAsync( * @return userSessionList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -938,32 +716,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), 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. @@ -976,23 +737,15 @@ private Mono> listSinglePageAsync( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Integer pageSize, - Boolean isDescending, - Integer initialSkip) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip), - nextLink -> listNextSinglePageAsync(nextLink)); + public PagedFlux listAsync(String resourceGroupName, String hostPoolName, String sessionHostname, + Integer pageSize, Boolean isDescending, Integer initialSkip) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, hostPoolName, sessionHostname, pageSize, + isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * List userSessions. - * + * * @param resourceGroupName The 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. @@ -1002,21 +755,18 @@ public PagedFlux listAsync( * @return userSessionList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listAsync( - String resourceGroupName, String hostPoolName, String sessionHostname) { + public PagedFlux listAsync(String resourceGroupName, String hostPoolName, + String sessionHostname) { final Integer pageSize = null; final Boolean isDescending = null; final Integer initialSkip = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip), - nextLink -> listNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, hostPoolName, sessionHostname, pageSize, + isDescending, initialSkip), nextLink -> listNextSinglePageAsync(nextLink)); } /** * 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. @@ -1030,24 +780,15 @@ public PagedFlux listAsync( * @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, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + private PagedFlux listAsync(String resourceGroupName, String hostPoolName, String sessionHostname, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, hostPoolName, sessionHostname, pageSize, + isDescending, initialSkip, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * 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. @@ -1067,7 +808,7 @@ public PagedIterable list(String resourceGroupName, String hos /** * 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. @@ -1081,21 +822,15 @@ public PagedIterable list(String resourceGroupName, String hos * @return userSessionList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { + public PagedIterable list(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)); } /** * 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. @@ -1106,19 +841,15 @@ public PagedIterable list( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> disconnectWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public Mono> disconnectWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1136,25 +867,15 @@ public Mono> disconnectWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .disconnect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - accept, - context)) + .withContext(context -> service.disconnect(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, userSessionId, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -1166,19 +887,15 @@ public Mono> disconnectWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> disconnectWithResponseAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + private Mono> disconnectWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1196,22 +913,14 @@ private Mono> disconnectWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .disconnect( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - accept, - context); + return service.disconnect(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, userSessionId, accept, + 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. @@ -1222,15 +931,15 @@ private Mono> disconnectWithResponseAsync( * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono disconnectAsync( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public Mono disconnectAsync(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId) .flatMap(ignored -> Mono.empty()); } /** * 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. @@ -1242,15 +951,15 @@ public Mono disconnectAsync( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disconnectWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { + public Response disconnectWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, Context context) { return disconnectWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context) .block(); } /** * 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. @@ -1260,14 +969,14 @@ public Response disconnectWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disconnect( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public void disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { disconnectWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, Context.NONE); } /** * 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. @@ -1279,23 +988,15 @@ public void disconnect( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> sendMessageWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage) { + public Mono> sendMessageWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId, SendMessage sendMessage) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1316,26 +1017,15 @@ public Mono> sendMessageWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .sendMessage( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - sendMessage, - accept, - context)) + .withContext(context -> service.sendMessage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, userSessionId, + sendMessage, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -1348,24 +1038,15 @@ public Mono> sendMessageWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> sendMessageWithResponseAsync( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context) { + private Mono> sendMessageWithResponseAsync(String resourceGroupName, String hostPoolName, + String sessionHostname, String userSessionId, SendMessage sendMessage, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1386,23 +1067,14 @@ private Mono> sendMessageWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .sendMessage( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - hostPoolName, - sessionHostname, - userSessionId, - sendMessage, - accept, - context); + return service.sendMessage(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, hostPoolName, sessionHostname, userSessionId, + sendMessage, accept, 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. @@ -1413,17 +1085,16 @@ private Mono> sendMessageWithResponseAsync( * @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) { + public 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()); + return sendMessageWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, + sendMessage).flatMap(ignored -> Mono.empty()); } /** * 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. @@ -1436,21 +1107,15 @@ public Mono sendMessageAsync( * @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(); + public Response sendMessageWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, SendMessage sendMessage, Context context) { + return sendMessageWithResponseAsync(resourceGroupName, hostPoolName, sessionHostname, userSessionId, + sendMessage, context).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. @@ -1460,18 +1125,19 @@ public Response sendMessageWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void sendMessage( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public void sendMessage(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { final SendMessage sendMessage = null; - sendMessageWithResponse( - resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, Context.NONE); + sendMessageWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, + Context.NONE); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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,31 +1149,23 @@ private Mono> listByHostPoolNextSinglePageAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1520,31 +1178,22 @@ private Mono> listByHostPoolNextSinglePageAsync( 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.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByHostPoolNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1556,31 +1205,22 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)) + 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. + * + * 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. @@ -1593,23 +1233,13 @@ private Mono> listNextSinglePageAsync(String nex 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.")); + 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)); + 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/UserSessionsImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/UserSessionsImpl.java index 5630acfc5647..a7e19734e9df 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 @@ -22,8 +22,7 @@ public final class UserSessionsImpl implements UserSessions { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public UserSessionsImpl( - UserSessionsClient innerClient, + public UserSessionsImpl(UserSessionsClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,45 +30,32 @@ public UserSessionsImpl( public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName) { PagedIterable inner = this.serviceClient().listByHostPool(resourceGroupName, hostPoolName); - return Utils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); } - public PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - PagedIterable inner = - this - .serviceClient() - .listByHostPool(resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context); - return Utils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); + public PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = this.serviceClient() + .listByHostPool(resourceGroupName, hostPoolName, filter, pageSize, isDescending, initialSkip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context); + public Response getWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new UserSessionImpl(inner.getValue(), this.manager())); } else { return null; } } - public UserSession get( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { - UserSessionInner inner = - this.serviceClient().get(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 { @@ -77,15 +63,9 @@ public UserSession get( } } - public Response deleteWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - Boolean force, - Context context) { - return this - .serviceClient() + public Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, Boolean force, Context context) { + return this.serviceClient() .deleteWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, force, context); } @@ -94,53 +74,38 @@ public void delete(String resourceGroupName, String hostPoolName, String session } public PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, hostPoolName, sessionHostname); - return Utils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, hostPoolName, sessionHostname); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context); - return Utils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname, + Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner = this.serviceClient() + .list(resourceGroupName, hostPoolName, sessionHostname, pageSize, isDescending, initialSkip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UserSessionImpl(inner1, this.manager())); } - public Response disconnectWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context) { - return this - .serviceClient() + public Response disconnectWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, Context context) { + return this.serviceClient() .disconnectWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, context); } - public void disconnect( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public void disconnect(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { this.serviceClient().disconnect(resourceGroupName, hostPoolName, sessionHostname, userSessionId); } - public Response sendMessageWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context) { - return this - .serviceClient() - .sendMessageWithResponse( - resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, context); + public Response sendMessageWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, SendMessage sendMessage, Context context) { + return this.serviceClient() + .sendMessageWithResponse(resourceGroupName, hostPoolName, sessionHostname, userSessionId, sendMessage, + context); } - public void sendMessage( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId) { + public void sendMessage(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId) { this.serviceClient().sendMessage(resourceGroupName, hostPoolName, sessionHostname, userSessionId); } 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 a8176e9298ae..dc51afb0b309 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 @@ -147,27 +147,23 @@ public WorkspaceImpl withExistingResourceGroup(String resourceGroupName) { } public Workspace create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, this.innerModel(), Context.NONE) + .getValue(); return this; } public Workspace create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .createOrUpdateWithResponse(resourceGroupName, workspaceName, this.innerModel(), context) + .getValue(); return this; } - WorkspaceImpl( - String name, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { + WorkspaceImpl(String name, + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = new WorkspaceInner(); this.serviceManager = serviceManager; this.workspaceName = name; @@ -179,51 +175,42 @@ public WorkspaceImpl update() { } public Workspace apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, Context.NONE) + .getValue(); return this; } public Workspace apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .updateWithResponse(resourceGroupName, workspaceName, updateWorkspace, context) + .getValue(); return this; } - WorkspaceImpl( - WorkspaceInner innerObject, + WorkspaceImpl(WorkspaceInner innerObject, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public Workspace refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) + .getValue(); return this; } public Workspace refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient() + .getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) + .getValue(); return this; } 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 6b2b1ae48b9a..2c3b61780e2d 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 @@ -35,22 +35,28 @@ 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. */ +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ public final class WorkspacesClientImpl implements WorkspacesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspacesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final DesktopVirtualizationApiClientImpl client; /** * Initializes an instance of WorkspacesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkspacesClientImpl(DesktopVirtualizationApiClientImpl client) { - this.service = - RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,115 +67,82 @@ public final class WorkspacesClientImpl implements WorkspacesClient { @Host("{$host}") @ServiceInterface(name = "DesktopVirtualizatio") public interface WorkspacesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceInner workspace, - @HeaderParam("Accept") String accept, + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") WorkspaceInner workspace, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, + Mono> delete(@HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}") + @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("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspacePatch workspace, - @HeaderParam("Accept") String accept, + Mono> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") WorkspacePatch workspace, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @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); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @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); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/workspaces") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -178,19 +151,15 @@ Mono> listBySubscriptionNext( * @return a workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName) { + public Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -201,23 +170,14 @@ public Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -227,19 +187,15 @@ public Mono> getByResourceGroupWithResponseAsync( * @return a workspace along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String workspaceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -250,20 +206,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context); } /** * 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. @@ -279,7 +228,7 @@ public Mono getByResourceGroupAsync(String resourceGroupName, St /** * 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. @@ -289,14 +238,14 @@ public Mono getByResourceGroupAsync(String resourceGroupName, St * @return a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** * 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. @@ -311,7 +260,7 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp /** * 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. @@ -321,19 +270,15 @@ public WorkspaceInner getByResourceGroup(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> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner workspace) { + public Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, WorkspaceInner workspace) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -349,24 +294,14 @@ public Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - workspace, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, workspace, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -377,19 +312,15 @@ public Mono> createOrUpdateWithResponseAsync( * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, WorkspaceInner workspace, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -405,21 +336,13 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - workspace, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, workspace, accept, 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. @@ -429,15 +352,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return represents a Workspace definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner workspace) { + public Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + WorkspaceInner workspace) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -448,14 +371,14 @@ public Mono createOrUpdateAsync( * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, WorkspaceInner workspace, Context context) { + public Response createOrUpdateWithResponse(String resourceGroupName, String workspaceName, + WorkspaceInner workspace, Context context) { return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** * 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. @@ -471,7 +394,7 @@ public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceN /** * 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. @@ -482,16 +405,12 @@ public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceN @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -502,23 +421,14 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -528,19 +438,15 @@ public Mono> deleteWithResponseAsync(String resourceGroupName, St * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -551,20 +457,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, accept, 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. @@ -579,7 +478,7 @@ public Mono deleteAsync(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. @@ -595,7 +494,7 @@ public Response deleteWithResponse(String resourceGroupName, String worksp /** * 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. @@ -609,7 +508,7 @@ public void delete(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. @@ -619,19 +518,15 @@ public void delete(String resourceGroupName, String workspaceName) { * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspacePatch workspace) { + public Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspacePatch workspace) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -645,24 +540,14 @@ public Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - workspace, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, workspaceName, workspace, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -673,19 +558,15 @@ public Mono> updateWithResponseAsync( * @return represents a Workspace definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String workspaceName, + WorkspacePatch workspace, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -699,21 +580,13 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - workspace, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, workspaceName, workspace, accept, context); } /** * 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. @@ -730,7 +603,7 @@ public Mono updateAsync(String resourceGroupName, String workspa /** * 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. @@ -741,14 +614,14 @@ public Mono updateAsync(String resourceGroupName, String workspa * @return represents a Workspace definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch workspace, Context context) { + public Response updateWithResponse(String resourceGroupName, String workspaceName, + WorkspacePatch workspace, Context context) { return updateWithResponseAsync(resourceGroupName, workspaceName, workspace, context).block(); } /** * 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. @@ -764,7 +637,7 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName) { /** * 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. @@ -775,19 +648,15 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName) { * @return workspaceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -795,34 +664,17 @@ private Mono> listByResourceGroupSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 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. @@ -834,19 +686,15 @@ private Mono> listByResourceGroupSinglePageAsync( * @return workspaceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + 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.")); + 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -854,31 +702,15 @@ private Mono> listByResourceGroupSinglePageAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - pageSize, - isDescending, - initialSkip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, pageSize, isDescending, initialSkip, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), 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. @@ -889,8 +721,8 @@ private Mono> listByResourceGroupSinglePageAsync( * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip) { + public PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); @@ -898,7 +730,7 @@ public PagedFlux listByResourceGroupAsync( /** * List workspaces. - * + * * @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. @@ -917,7 +749,7 @@ 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. @@ -929,8 +761,8 @@ public PagedFlux listByResourceGroupAsync(String resourceGroupNa * @return workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, pageSize, isDescending, initialSkip, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); @@ -938,7 +770,7 @@ private PagedFlux listByResourceGroupAsync( /** * List workspaces. - * + * * @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. @@ -955,7 +787,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam /** * 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. @@ -967,15 +799,15 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * @return workspaceList as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup( - String resourceGroupName, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context) { + public PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { return new PagedIterable<>( listByResourceGroupAsync(resourceGroupName, pageSize, isDescending, initialSkip, context)); } /** * List workspaces 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 workspaceList along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -983,43 +815,25 @@ public PagedIterable listByResourceGroup( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), 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 workspaces in subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1029,53 +843,38 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() 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(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * List workspaces 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 workspaceList as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * List workspaces in subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1084,13 +883,13 @@ public PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * List workspaces 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 workspaceList as paginated response with {@link PagedIterable}. @@ -1102,7 +901,7 @@ public PagedIterable list() { /** * List workspaces in subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1116,9 +915,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1130,32 +930,24 @@ private Mono> listByResourceGroupNextSinglePageAsy 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.")); + 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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1163,37 +955,28 @@ private Mono> listByResourceGroupNextSinglePageAsy * @return workspaceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(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.")); + 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 - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * 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. @@ -1205,32 +988,24 @@ private Mono> listBySubscriptionNextSinglePageAsyn 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.")); + 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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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. + * + * 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. @@ -1238,29 +1013,19 @@ private Mono> listBySubscriptionNextSinglePageAsyn * @return workspaceList along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(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.")); + 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 - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(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/WorkspacesImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/WorkspacesImpl.java index d7ef068f04b0..526ce4c893cd 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 @@ -21,22 +21,18 @@ public final class WorkspacesImpl implements Workspaces { private final com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager; - public WorkspacesImpl( - WorkspacesClient innerClient, + public WorkspacesImpl(WorkspacesClient innerClient, com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new WorkspaceImpl(inner.getValue(), this.manager())); } else { return null; @@ -52,8 +48,8 @@ public Workspace getByResourceGroup(String resourceGroupName, String workspaceNa } } - public Response deleteByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, context); } @@ -63,98 +59,78 @@ public void deleteByResourceGroup(String resourceGroupName, String workspaceName public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } - 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())); + public PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, pageSize, isDescending, initialSkip, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } public Workspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.deleteByResourceGroupWithResponse(resourceGroupName, workspaceName, context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/package-info.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/package-info.java index de33399c24a1..fcc669a8bf54 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/package-info.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for DesktopVirtualizationApiClient. null. */ +/** + * Package containing the implementations for DesktopVirtualizationApiClient. + * null. + */ package com.azure.resourcemanager.desktopvirtualization.implementation; 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 index 3f23da610e87..1a586e53a108 100644 --- 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The session host configuration for updating agent, monitoring agent, and stack component. */ +/** + * The session host configuration for updating agent, monitoring agent, and stack component. + */ @Fluent public final class AgentUpdatePatchProperties { /* @@ -24,9 +26,7 @@ public final class AgentUpdatePatchProperties { 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. + * 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; @@ -37,13 +37,15 @@ public final class AgentUpdatePatchProperties { @JsonProperty(value = "maintenanceWindows") private List maintenanceWindows; - /** Creates an instance of AgentUpdatePatchProperties class. */ + /** + * 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() { @@ -52,7 +54,7 @@ public SessionHostComponentUpdateType 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. */ @@ -63,7 +65,7 @@ public AgentUpdatePatchProperties withType(SessionHostComponentUpdateType type) /** * Get the useSessionHostLocalTime property: Whether to use localTime of the virtual machine. - * + * * @return the useSessionHostLocalTime value. */ public Boolean useSessionHostLocalTime() { @@ -72,7 +74,7 @@ public Boolean 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. */ @@ -85,7 +87,7 @@ public AgentUpdatePatchProperties withUseSessionHostLocalTime(Boolean useSession * 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() { @@ -96,7 +98,7 @@ public String 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. */ @@ -107,7 +109,7 @@ public AgentUpdatePatchProperties withMaintenanceWindowTimeZone(String maintenan /** * Get the maintenanceWindows property: List of maintenance windows. Maintenance windows are 2 hours long. - * + * * @return the maintenanceWindows value. */ public List maintenanceWindows() { @@ -116,19 +118,19 @@ public List 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) { + 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() { 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 index b82f435aa0e1..712400722256 100644 --- 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The session host configuration for updating agent, monitoring agent, and stack component. */ +/** + * The session host configuration for updating agent, monitoring agent, and stack component. + */ @Fluent public final class AgentUpdateProperties { /* @@ -24,9 +26,7 @@ public final class AgentUpdateProperties { 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. + * 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; @@ -37,13 +37,15 @@ public final class AgentUpdateProperties { @JsonProperty(value = "maintenanceWindows") private List maintenanceWindows; - /** Creates an instance of AgentUpdateProperties class. */ + /** + * 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() { @@ -52,7 +54,7 @@ public SessionHostComponentUpdateType 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. */ @@ -63,7 +65,7 @@ public AgentUpdateProperties withType(SessionHostComponentUpdateType type) { /** * Get the useSessionHostLocalTime property: Whether to use localTime of the virtual machine. - * + * * @return the useSessionHostLocalTime value. */ public Boolean useSessionHostLocalTime() { @@ -72,7 +74,7 @@ public Boolean 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. */ @@ -85,7 +87,7 @@ public AgentUpdateProperties withUseSessionHostLocalTime(Boolean useSessionHostL * 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() { @@ -96,7 +98,7 @@ public String 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. */ @@ -107,7 +109,7 @@ public AgentUpdateProperties withMaintenanceWindowTimeZone(String maintenanceWin /** * Get the maintenanceWindows property: List of maintenance windows. Maintenance windows are 2 hours long. - * + * * @return the maintenanceWindows value. */ public List maintenanceWindows() { @@ -116,7 +118,7 @@ public List 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. */ @@ -127,7 +129,7 @@ public AgentUpdateProperties withMaintenanceWindows(List tags(); + + /** + * Gets the properties property: Detailed properties for App Attach Package. + * + * @return the properties value. + */ + AppAttachPackageProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * 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.AppAttachPackageInner object. + * + * @return the inner object. + */ + AppAttachPackageInner innerModel(); + + /** + * The entirety of the AppAttachPackage definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithProperties, DefinitionStages.WithCreate { + } + + /** + * The AppAttachPackage definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AppAttachPackage definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the AppAttachPackage definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the AppAttachPackage definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithProperties withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the AppAttachPackage definition allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Detailed properties for App Attach Package. + * + * @param properties Detailed properties for App Attach Package. + * @return the next definition stage. + */ + WithCreate withProperties(AppAttachPackageProperties properties); + } + + /** + * The stage of the AppAttachPackage 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.WithTags { + /** + * Executes the create request. + * + * @return the created resource. + */ + AppAttachPackage create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AppAttachPackage create(Context context); + } + + /** + * The stage of the AppAttachPackage definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + } + + /** + * Begins update for the AppAttachPackage resource. + * + * @return the stage of resource update. + */ + AppAttachPackage.Update update(); + + /** + * The template for AppAttachPackage update. + */ + interface Update extends UpdateStages.WithProperties { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AppAttachPackage apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AppAttachPackage apply(Context context); + } + + /** + * The AppAttachPackage update stages. + */ + interface UpdateStages { + /** + * The stage of the AppAttachPackage update allowing to specify properties. + */ + interface WithProperties { + /** + * Specifies the properties property: Detailed properties for App Attach Package. + * + * @param properties Detailed properties for App Attach Package. + * @return the next definition stage. + */ + Update withProperties(AppAttachPackagePatchProperties properties); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AppAttachPackage refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AppAttachPackage refresh(Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageArchitectures.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageArchitectures.java new file mode 100644 index 000000000000..53e0ee899f99 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageArchitectures.java @@ -0,0 +1,78 @@ +// Copyright (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; + +/** + * Possible device architectures that an app attach package can be configured for. + */ +public final class AppAttachPackageArchitectures extends ExpandableStringEnum { + /** + * Static value ARM for AppAttachPackageArchitectures. + */ + public static final AppAttachPackageArchitectures ARM = fromString("ARM"); + + /** + * Static value ARM64 for AppAttachPackageArchitectures. + */ + public static final AppAttachPackageArchitectures ARM64 = fromString("ARM64"); + + /** + * Static value x86 for AppAttachPackageArchitectures. + */ + public static final AppAttachPackageArchitectures X86 = fromString("x86"); + + /** + * Static value x64 for AppAttachPackageArchitectures. + */ + public static final AppAttachPackageArchitectures X64 = fromString("x64"); + + /** + * Static value Neutral for AppAttachPackageArchitectures. + */ + public static final AppAttachPackageArchitectures NEUTRAL = fromString("Neutral"); + + /** + * Static value x86a64 for AppAttachPackageArchitectures. + */ + public static final AppAttachPackageArchitectures X86A64 = fromString("x86a64"); + + /** + * Static value ALL for AppAttachPackageArchitectures. + */ + public static final AppAttachPackageArchitectures ALL = fromString("ALL"); + + /** + * Creates a new instance of AppAttachPackageArchitectures value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AppAttachPackageArchitectures() { + } + + /** + * Creates or finds a AppAttachPackageArchitectures from its string representation. + * + * @param name a name to look for. + * @return the corresponding AppAttachPackageArchitectures. + */ + @JsonCreator + public static AppAttachPackageArchitectures fromString(String name) { + return fromString(name, AppAttachPackageArchitectures.class); + } + + /** + * Gets known AppAttachPackageArchitectures values. + * + * @return known AppAttachPackageArchitectures values. + */ + public static Collection values() { + return values(AppAttachPackageArchitectures.class); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoProperties.java new file mode 100644 index 000000000000..19631ff93291 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoProperties.java @@ -0,0 +1,454 @@ +// Copyright (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.time.OffsetDateTime; +import java.util.List; + +/** + * Schema for Import Package Information properties. + */ +@Fluent +public final class AppAttachPackageInfoProperties { + /* + * Alias of App Attach Package. Assigned at import time + */ + @JsonProperty(value = "packageAlias") + private String packageAlias; + + /* + * VHD/CIM image path on Network Share. + */ + @JsonProperty(value = "imagePath") + private String imagePath; + + /* + * Package Name from appxmanifest.xml. + */ + @JsonProperty(value = "packageName") + private String packageName; + + /* + * Package Family Name from appxmanifest.xml. Contains Package Name and Publisher name. + */ + @JsonProperty(value = "packageFamilyName") + private String packageFamilyName; + + /* + * Package Full Name from appxmanifest.xml. + */ + @JsonProperty(value = "packageFullName") + private String packageFullName; + + /* + * User friendly Name to be displayed in the portal. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Relative Path to the package inside the image. + */ + @JsonProperty(value = "packageRelativePath") + private String packageRelativePath; + + /* + * Specifies how to register Package in feed. + */ + @JsonProperty(value = "isRegularRegistration") + private Boolean isRegularRegistration; + + /* + * Make this version of the package the active one across the hostpool. + */ + @JsonProperty(value = "isActive") + private Boolean isActive; + + /* + * List of package dependencies. + */ + @JsonProperty(value = "packageDependencies") + private List packageDependencies; + + /* + * Package version found in the appxmanifest.xml. + */ + @JsonProperty(value = "version") + private String version; + + /* + * Date Package was last updated, found in the appxmanifest.xml. + */ + @JsonProperty(value = "lastUpdated") + private OffsetDateTime lastUpdated; + + /* + * List of package applications. + */ + @JsonProperty(value = "packageApplications") + private List packageApplications; + + /* + * Certificate name found in the appxmanifest.xml. + */ + @JsonProperty(value = "certificateName") + private String certificateName; + + /* + * Date certificate expires, found in the appxmanifest.xml. + */ + @JsonProperty(value = "certificateExpiry") + private OffsetDateTime certificateExpiry; + + /* + * Is package timestamped so it can ignore the certificate expiry date + */ + @JsonProperty(value = "isPackageTimestamped") + private PackageTimestamped isPackageTimestamped; + + /** + * Creates an instance of AppAttachPackageInfoProperties class. + */ + public AppAttachPackageInfoProperties() { + } + + /** + * Get the packageAlias property: Alias of App Attach Package. Assigned at import time. + * + * @return the packageAlias value. + */ + public String packageAlias() { + return this.packageAlias; + } + + /** + * Set the packageAlias property: Alias of App Attach Package. Assigned at import time. + * + * @param packageAlias the packageAlias value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withPackageAlias(String packageAlias) { + this.packageAlias = packageAlias; + return this; + } + + /** + * Get the imagePath property: VHD/CIM image path on Network Share. + * + * @return the imagePath value. + */ + public String imagePath() { + return this.imagePath; + } + + /** + * Set the imagePath property: VHD/CIM image path on Network Share. + * + * @param imagePath the imagePath value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withImagePath(String imagePath) { + this.imagePath = imagePath; + return this; + } + + /** + * Get the packageName property: Package Name from appxmanifest.xml. + * + * @return the packageName value. + */ + public String packageName() { + return this.packageName; + } + + /** + * Set the packageName property: Package Name from appxmanifest.xml. + * + * @param packageName the packageName value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withPackageName(String packageName) { + this.packageName = packageName; + return this; + } + + /** + * Get the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and + * Publisher name. + * + * @return the packageFamilyName value. + */ + public String packageFamilyName() { + return this.packageFamilyName; + } + + /** + * Set the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and + * Publisher name. + * + * @param packageFamilyName the packageFamilyName value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withPackageFamilyName(String packageFamilyName) { + this.packageFamilyName = packageFamilyName; + return this; + } + + /** + * Get the packageFullName property: Package Full Name from appxmanifest.xml. + * + * @return the packageFullName value. + */ + public String packageFullName() { + return this.packageFullName; + } + + /** + * Set the packageFullName property: Package Full Name from appxmanifest.xml. + * + * @param packageFullName the packageFullName value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withPackageFullName(String packageFullName) { + this.packageFullName = packageFullName; + return this; + } + + /** + * Get the displayName property: User friendly Name to be displayed in the portal. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: User friendly Name to be displayed in the portal. + * + * @param displayName the displayName value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the packageRelativePath property: Relative Path to the package inside the image. + * + * @return the packageRelativePath value. + */ + public String packageRelativePath() { + return this.packageRelativePath; + } + + /** + * Set the packageRelativePath property: Relative Path to the package inside the image. + * + * @param packageRelativePath the packageRelativePath value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withPackageRelativePath(String packageRelativePath) { + this.packageRelativePath = packageRelativePath; + return this; + } + + /** + * Get the isRegularRegistration property: Specifies how to register Package in feed. + * + * @return the isRegularRegistration value. + */ + public Boolean isRegularRegistration() { + return this.isRegularRegistration; + } + + /** + * Set the isRegularRegistration property: Specifies how to register Package in feed. + * + * @param isRegularRegistration the isRegularRegistration value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withIsRegularRegistration(Boolean isRegularRegistration) { + this.isRegularRegistration = isRegularRegistration; + return this; + } + + /** + * Get the isActive property: Make this version of the package the active one across the hostpool. + * + * @return the isActive value. + */ + public Boolean isActive() { + return this.isActive; + } + + /** + * Set the isActive property: Make this version of the package the active one across the hostpool. + * + * @param isActive the isActive value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withIsActive(Boolean isActive) { + this.isActive = isActive; + return this; + } + + /** + * Get the packageDependencies property: List of package dependencies. + * + * @return the packageDependencies value. + */ + public List packageDependencies() { + return this.packageDependencies; + } + + /** + * Set the packageDependencies property: List of package dependencies. + * + * @param packageDependencies the packageDependencies value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withPackageDependencies(List packageDependencies) { + this.packageDependencies = packageDependencies; + return this; + } + + /** + * Get the version property: Package version found in the appxmanifest.xml. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Package version found in the appxmanifest.xml. + * + * @param version the version value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the lastUpdated property: Date Package was last updated, found in the appxmanifest.xml. + * + * @return the lastUpdated value. + */ + public OffsetDateTime lastUpdated() { + return this.lastUpdated; + } + + /** + * Set the lastUpdated property: Date Package was last updated, found in the appxmanifest.xml. + * + * @param lastUpdated the lastUpdated value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withLastUpdated(OffsetDateTime lastUpdated) { + this.lastUpdated = lastUpdated; + return this; + } + + /** + * Get the packageApplications property: List of package applications. + * + * @return the packageApplications value. + */ + public List packageApplications() { + return this.packageApplications; + } + + /** + * Set the packageApplications property: List of package applications. + * + * @param packageApplications the packageApplications value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withPackageApplications(List packageApplications) { + this.packageApplications = packageApplications; + return this; + } + + /** + * Get the certificateName property: Certificate name found in the appxmanifest.xml. + * + * @return the certificateName value. + */ + public String certificateName() { + return this.certificateName; + } + + /** + * Set the certificateName property: Certificate name found in the appxmanifest.xml. + * + * @param certificateName the certificateName value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withCertificateName(String certificateName) { + this.certificateName = certificateName; + return this; + } + + /** + * Get the certificateExpiry property: Date certificate expires, found in the appxmanifest.xml. + * + * @return the certificateExpiry value. + */ + public OffsetDateTime certificateExpiry() { + return this.certificateExpiry; + } + + /** + * Set the certificateExpiry property: Date certificate expires, found in the appxmanifest.xml. + * + * @param certificateExpiry the certificateExpiry value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withCertificateExpiry(OffsetDateTime certificateExpiry) { + this.certificateExpiry = certificateExpiry; + return this; + } + + /** + * Get the isPackageTimestamped property: Is package timestamped so it can ignore the certificate expiry date. + * + * @return the isPackageTimestamped value. + */ + public PackageTimestamped isPackageTimestamped() { + return this.isPackageTimestamped; + } + + /** + * Set the isPackageTimestamped property: Is package timestamped so it can ignore the certificate expiry date. + * + * @param isPackageTimestamped the isPackageTimestamped value to set. + * @return the AppAttachPackageInfoProperties object itself. + */ + public AppAttachPackageInfoProperties withIsPackageTimestamped(PackageTimestamped isPackageTimestamped) { + this.isPackageTimestamped = isPackageTimestamped; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (packageDependencies() != null) { + packageDependencies().forEach(e -> e.validate()); + } + if (packageApplications() != null) { + packageApplications().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoes.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoes.java new file mode 100644 index 000000000000..2a9a9318daed --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoes.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of AppAttachPackageInfoes. + */ +public interface AppAttachPackageInfoes { + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with + * {@link PagedIterable}. + */ + PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest); + + /** + * Gets information from a package given the path to the 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 importPackageInfoRequest Object containing URI to package image and other optional properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information from a package given the path to the package as paginated response with + * {@link PagedIterable}. + */ + PagedIterable importMethod(String resourceGroupName, String hostPoolName, + ImportPackageInfoRequest importPackageInfoRequest, Context context); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageList.java new file mode 100644 index 000000000000..01d6fd8e4dc0 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageList.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.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * AppAttachPackageList + * + * List of App Attach Package definitions. + */ +@Fluent +public final class AppAttachPackageList { + /* + * List of App Attach Package 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 AppAttachPackageList class. + */ + public AppAttachPackageList() { + } + + /** + * Get the value property: List of App Attach Package definitions. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: List of App Attach Package definitions. + * + * @param value the value value to set. + * @return the AppAttachPackageList object itself. + */ + public AppAttachPackageList 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/AppAttachPackagePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackagePatch.java new file mode 100644 index 000000000000..b1e484a93255 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackagePatch.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.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Schema for updatable App Attach Package properties. + */ +@Fluent +public final class AppAttachPackagePatch extends ProxyResource { + /* + * Detailed properties for App Attach Package + */ + @JsonProperty(value = "properties") + private AppAttachPackagePatchProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AppAttachPackagePatch class. + */ + public AppAttachPackagePatch() { + } + + /** + * Get the properties property: Detailed properties for App Attach Package. + * + * @return the properties value. + */ + public AppAttachPackagePatchProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Detailed properties for App Attach Package. + * + * @param properties the properties value to set. + * @return the AppAttachPackagePatch object itself. + */ + public AppAttachPackagePatch withProperties(AppAttachPackagePatchProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackagePatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackagePatchProperties.java new file mode 100644 index 000000000000..c14032e1f9bd --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackagePatchProperties.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; + +/** + * Schema for patchable fields on an App Attach Package. + */ +@Fluent +public final class AppAttachPackagePatchProperties { + /* + * Detailed properties for App Attach Package + */ + @JsonProperty(value = "image") + private AppAttachPackageInfoProperties image; + + /* + * List of Hostpool resource Ids. + */ + @JsonProperty(value = "hostPoolReferences") + private List hostPoolReferences; + + /* + * URL path to certificate name located in keyVault + */ + @JsonProperty(value = "keyVaultURL") + private String keyVaultUrl; + + /* + * Parameter indicating how the health check should behave if this package fails staging + */ + @JsonProperty(value = "failHealthCheckOnStagingFailure") + private FailHealthCheckOnStagingFailure failHealthCheckOnStagingFailure; + + /** + * Creates an instance of AppAttachPackagePatchProperties class. + */ + public AppAttachPackagePatchProperties() { + } + + /** + * Get the image property: Detailed properties for App Attach Package. + * + * @return the image value. + */ + public AppAttachPackageInfoProperties image() { + return this.image; + } + + /** + * Set the image property: Detailed properties for App Attach Package. + * + * @param image the image value to set. + * @return the AppAttachPackagePatchProperties object itself. + */ + public AppAttachPackagePatchProperties withImage(AppAttachPackageInfoProperties image) { + this.image = image; + return this; + } + + /** + * Get the hostPoolReferences property: List of Hostpool resource Ids. + * + * @return the hostPoolReferences value. + */ + public List hostPoolReferences() { + return this.hostPoolReferences; + } + + /** + * Set the hostPoolReferences property: List of Hostpool resource Ids. + * + * @param hostPoolReferences the hostPoolReferences value to set. + * @return the AppAttachPackagePatchProperties object itself. + */ + public AppAttachPackagePatchProperties withHostPoolReferences(List hostPoolReferences) { + this.hostPoolReferences = hostPoolReferences; + return this; + } + + /** + * Get the keyVaultUrl property: URL path to certificate name located in keyVault. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Set the keyVaultUrl property: URL path to certificate name located in keyVault. + * + * @param keyVaultUrl the keyVaultUrl value to set. + * @return the AppAttachPackagePatchProperties object itself. + */ + public AppAttachPackagePatchProperties withKeyVaultUrl(String keyVaultUrl) { + this.keyVaultUrl = keyVaultUrl; + return this; + } + + /** + * Get the failHealthCheckOnStagingFailure property: Parameter indicating how the health check should behave if this + * package fails staging. + * + * @return the failHealthCheckOnStagingFailure value. + */ + public FailHealthCheckOnStagingFailure failHealthCheckOnStagingFailure() { + return this.failHealthCheckOnStagingFailure; + } + + /** + * Set the failHealthCheckOnStagingFailure property: Parameter indicating how the health check should behave if this + * package fails staging. + * + * @param failHealthCheckOnStagingFailure the failHealthCheckOnStagingFailure value to set. + * @return the AppAttachPackagePatchProperties object itself. + */ + public AppAttachPackagePatchProperties + withFailHealthCheckOnStagingFailure(FailHealthCheckOnStagingFailure failHealthCheckOnStagingFailure) { + this.failHealthCheckOnStagingFailure = failHealthCheckOnStagingFailure; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (image() != null) { + image().validate(); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageProperties.java new file mode 100644 index 000000000000..846631973aee --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageProperties.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.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Schema for App Attach Package properties. + */ +@Fluent +public final class AppAttachPackageProperties { + /* + * The provisioning state of the App Attach Package. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Detailed properties for App Attach Package + */ + @JsonProperty(value = "image") + private AppAttachPackageInfoProperties image; + + /* + * List of Hostpool resource Ids. + */ + @JsonProperty(value = "hostPoolReferences") + private List hostPoolReferences; + + /* + * URL path to certificate name located in keyVault + */ + @JsonProperty(value = "keyVaultURL") + private String keyVaultUrl; + + /* + * Parameter indicating how the health check should behave if this package fails staging + */ + @JsonProperty(value = "failHealthCheckOnStagingFailure") + private FailHealthCheckOnStagingFailure failHealthCheckOnStagingFailure; + + /** + * Creates an instance of AppAttachPackageProperties class. + */ + public AppAttachPackageProperties() { + } + + /** + * Get the provisioningState property: The provisioning state of the App Attach Package. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the image property: Detailed properties for App Attach Package. + * + * @return the image value. + */ + public AppAttachPackageInfoProperties image() { + return this.image; + } + + /** + * Set the image property: Detailed properties for App Attach Package. + * + * @param image the image value to set. + * @return the AppAttachPackageProperties object itself. + */ + public AppAttachPackageProperties withImage(AppAttachPackageInfoProperties image) { + this.image = image; + return this; + } + + /** + * Get the hostPoolReferences property: List of Hostpool resource Ids. + * + * @return the hostPoolReferences value. + */ + public List hostPoolReferences() { + return this.hostPoolReferences; + } + + /** + * Set the hostPoolReferences property: List of Hostpool resource Ids. + * + * @param hostPoolReferences the hostPoolReferences value to set. + * @return the AppAttachPackageProperties object itself. + */ + public AppAttachPackageProperties withHostPoolReferences(List hostPoolReferences) { + this.hostPoolReferences = hostPoolReferences; + return this; + } + + /** + * Get the keyVaultUrl property: URL path to certificate name located in keyVault. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Set the keyVaultUrl property: URL path to certificate name located in keyVault. + * + * @param keyVaultUrl the keyVaultUrl value to set. + * @return the AppAttachPackageProperties object itself. + */ + public AppAttachPackageProperties withKeyVaultUrl(String keyVaultUrl) { + this.keyVaultUrl = keyVaultUrl; + return this; + } + + /** + * Get the failHealthCheckOnStagingFailure property: Parameter indicating how the health check should behave if this + * package fails staging. + * + * @return the failHealthCheckOnStagingFailure value. + */ + public FailHealthCheckOnStagingFailure failHealthCheckOnStagingFailure() { + return this.failHealthCheckOnStagingFailure; + } + + /** + * Set the failHealthCheckOnStagingFailure property: Parameter indicating how the health check should behave if this + * package fails staging. + * + * @param failHealthCheckOnStagingFailure the failHealthCheckOnStagingFailure value to set. + * @return the AppAttachPackageProperties object itself. + */ + public AppAttachPackageProperties + withFailHealthCheckOnStagingFailure(FailHealthCheckOnStagingFailure failHealthCheckOnStagingFailure) { + this.failHealthCheckOnStagingFailure = failHealthCheckOnStagingFailure; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (image() != null) { + image().validate(); + } + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackages.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackages.java new file mode 100644 index 000000000000..3e7f0b94f613 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackages.java @@ -0,0 +1,164 @@ +// Copyright (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 AppAttachPackages. + */ +public interface AppAttachPackages { + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 app attach package along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String appAttachPackageName, + Context context); + + /** + * Get an app attach package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 app attach package. + */ + AppAttachPackage getByResourceGroup(String resourceGroupName, String appAttachPackageName); + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 deleteByResourceGroupWithResponse(String resourceGroupName, String appAttachPackageName, + Context context); + + /** + * Remove an App Attach Package. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appAttachPackageName The name of the App Attach package. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 deleteByResourceGroup(String resourceGroupName, String appAttachPackageName); + + /** + * List App Attach packages in resource group. + * + * @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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List App Attach packages in resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param filter OData filter expression. Valid properties for filtering are package name and 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Context context); + + /** + * List App Attach packages 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List App Attach packages in subscription. + * + * @param filter OData filter expression. Valid properties for filtering are package name, host pool, and 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 appAttachPackageList as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String filter, Context context); + + /** + * Get an app attach package. + * + * @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 an app attach package along with {@link Response}. + */ + AppAttachPackage getById(String id); + + /** + * Get an app attach package. + * + * @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 an app attach package along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Remove an App Attach Package. + * + * @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 an App Attach Package. + * + * @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 AppAttachPackage resource. + * + * @param name resource name. + * @return the first stage of the new AppAttachPackage definition. + */ + AppAttachPackage.DefinitionStages.Blank define(String name); +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java index 56d9578bed4f..d1b8b553ffe9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Application.java @@ -9,81 +9,83 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationInner; import java.util.Map; -/** An immutable client-side representation of Application. */ +/** + * An immutable client-side representation of Application. + */ public interface Application { /** * 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. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of Application. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the description property: Description of Application. - * + * * @return the description value. */ String description(); /** * Gets the friendlyName property: Friendly name of Application. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the filePath property: Specifies a path for the executable file for the application. - * + * * @return the filePath value. */ String filePath(); /** * Gets the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @return the msixPackageFamilyName value. */ String msixPackageFamilyName(); /** * Gets the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @return the msixPackageApplicationId value. */ String msixPackageApplicationId(); /** * Gets the applicationType property: Resource Type of Application. - * + * * @return the applicationType value. */ RemoteApplicationType applicationType(); @@ -92,86 +94,91 @@ public interface Application { * Gets the commandLineSetting property: 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. - * + * * @return the commandLineSetting value. */ CommandLineSetting commandLineSetting(); /** * Gets the commandLineArguments property: Command Line Arguments for Application. - * + * * @return the commandLineArguments value. */ String commandLineArguments(); /** * Gets the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @return the showInPortal value. */ Boolean showInPortal(); /** * Gets the iconPath property: Path to icon. - * + * * @return the iconPath value. */ String iconPath(); /** * Gets the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ Integer iconIndex(); /** * Gets the iconHash property: Hash of the icon. - * + * * @return the iconHash value. */ String iconHash(); /** * Gets the iconContent property: the icon a 64 bit string as a byte array. - * + * * @return the iconContent value. */ byte[] iconContent(); /** * 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.ApplicationInner object. - * + * * @return the inner object. */ ApplicationInner innerModel(); - /** The entirety of the Application definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithCommandLineSetting, - DefinitionStages.WithCreate { + /** + * The entirety of the Application definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, + DefinitionStages.WithCommandLineSetting, DefinitionStages.WithCreate { } - /** The Application definition stages. */ + /** + * The Application definition stages. + */ interface DefinitionStages { - /** The first stage of the Application definition. */ + /** + * The first stage of the Application definition. + */ interface Blank extends WithParentResource { } - /** The stage of the Application definition allowing to specify parent resource. */ + /** + * The stage of the Application definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, applicationGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @return the next definition stage. @@ -179,16 +186,18 @@ interface WithParentResource { WithCommandLineSetting withExistingApplicationGroup(String resourceGroupName, String applicationGroupName); } - /** The stage of the Application definition allowing to specify commandLineSetting. */ + /** + * The stage of the Application definition allowing to specify commandLineSetting. + */ interface WithCommandLineSetting { /** * Specifies the commandLineSetting property: 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.. - * + * * @param 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. + * arguments provided by the client, command line arguments specified at publish time, or no command line + * arguments at all. * @return the next definition stage. */ WithCreate withCommandLineSetting(CommandLineSetting commandLineSetting); @@ -199,138 +208,152 @@ interface WithCommandLineSetting { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, - DefinitionStages.WithFilePath, - DefinitionStages.WithMsixPackageFamilyName, - DefinitionStages.WithMsixPackageApplicationId, - DefinitionStages.WithApplicationType, - DefinitionStages.WithCommandLineArguments, - DefinitionStages.WithShowInPortal, - DefinitionStages.WithIconPath, - DefinitionStages.WithIconIndex { + extends DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, DefinitionStages.WithFilePath, + DefinitionStages.WithMsixPackageFamilyName, DefinitionStages.WithMsixPackageApplicationId, + DefinitionStages.WithApplicationType, DefinitionStages.WithCommandLineArguments, + DefinitionStages.WithShowInPortal, DefinitionStages.WithIconPath, DefinitionStages.WithIconIndex { /** * Executes the create request. - * + * * @return the created resource. */ Application create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Application create(Context context); } - /** The stage of the Application definition allowing to specify description. */ + /** + * The stage of the Application definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of Application.. - * + * * @param description Description of Application. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the Application definition allowing to specify friendlyName. */ + /** + * The stage of the Application definition allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of Application.. - * + * * @param friendlyName Friendly name of Application. * @return the next definition stage. */ WithCreate withFriendlyName(String friendlyName); } - /** The stage of the Application definition allowing to specify filePath. */ + /** + * The stage of the Application definition allowing to specify filePath. + */ interface WithFilePath { /** * Specifies the filePath property: Specifies a path for the executable file for the application.. - * + * * @param filePath Specifies a path for the executable file for the application. * @return the next definition stage. */ WithCreate withFilePath(String filePath); } - /** The stage of the Application definition allowing to specify msixPackageFamilyName. */ + /** + * The stage of the Application definition allowing to specify msixPackageFamilyName. + */ interface WithMsixPackageFamilyName { /** * Specifies the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @param msixPackageFamilyName Specifies the package family name for MSIX applications. * @return the next definition stage. */ WithCreate withMsixPackageFamilyName(String msixPackageFamilyName); } - /** The stage of the Application definition allowing to specify msixPackageApplicationId. */ + /** + * The stage of the Application definition allowing to specify msixPackageApplicationId. + */ interface WithMsixPackageApplicationId { /** * Specifies the msixPackageApplicationId property: Specifies the package application Id for MSIX * applications. - * + * * @param msixPackageApplicationId Specifies the package application Id for MSIX applications. * @return the next definition stage. */ WithCreate withMsixPackageApplicationId(String msixPackageApplicationId); } - /** The stage of the Application definition allowing to specify applicationType. */ + /** + * The stage of the Application definition allowing to specify applicationType. + */ interface WithApplicationType { /** * Specifies the applicationType property: Resource Type of Application.. - * + * * @param applicationType Resource Type of Application. * @return the next definition stage. */ WithCreate withApplicationType(RemoteApplicationType applicationType); } - /** The stage of the Application definition allowing to specify commandLineArguments. */ + /** + * The stage of the Application definition allowing to specify commandLineArguments. + */ interface WithCommandLineArguments { /** * Specifies the commandLineArguments property: Command Line Arguments for Application.. - * + * * @param commandLineArguments Command Line Arguments for Application. * @return the next definition stage. */ WithCreate withCommandLineArguments(String commandLineArguments); } - /** The stage of the Application definition allowing to specify showInPortal. */ + /** + * The stage of the Application definition allowing to specify showInPortal. + */ interface WithShowInPortal { /** * Specifies the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access * server.. - * + * * @param showInPortal Specifies whether to show the RemoteApp program in the RD Web Access server. * @return the next definition stage. */ WithCreate withShowInPortal(Boolean showInPortal); } - /** The stage of the Application definition allowing to specify iconPath. */ + /** + * The stage of the Application definition allowing to specify iconPath. + */ interface WithIconPath { /** * Specifies the iconPath property: Path to icon.. - * + * * @param iconPath Path to icon. * @return the next definition stage. */ WithCreate withIconPath(String iconPath); } - /** The stage of the Application definition allowing to specify iconIndex. */ + /** + * The stage of the Application definition allowing to specify iconIndex. + */ interface WithIconIndex { /** * Specifies the iconIndex property: Index of the icon.. - * + * * @param iconIndex Index of the icon. * @return the next definition stage. */ @@ -340,175 +363,195 @@ interface WithIconIndex { /** * Begins update for the Application resource. - * + * * @return the stage of resource update. */ Application.Update update(); - /** The template for Application update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithDescription, - UpdateStages.WithFriendlyName, - UpdateStages.WithFilePath, - UpdateStages.WithCommandLineSetting, - UpdateStages.WithCommandLineArguments, - UpdateStages.WithShowInPortal, - UpdateStages.WithIconPath, - UpdateStages.WithIconIndex, - UpdateStages.WithMsixPackageFamilyName, - UpdateStages.WithMsixPackageApplicationId, - UpdateStages.WithApplicationType { + /** + * The template for Application update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, + UpdateStages.WithFilePath, UpdateStages.WithCommandLineSetting, UpdateStages.WithCommandLineArguments, + UpdateStages.WithShowInPortal, UpdateStages.WithIconPath, UpdateStages.WithIconIndex, + UpdateStages.WithMsixPackageFamilyName, UpdateStages.WithMsixPackageApplicationId, + UpdateStages.WithApplicationType { /** * Executes the update request. - * + * * @return the updated resource. */ Application apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Application apply(Context context); } - /** The Application update stages. */ + /** + * The Application update stages. + */ interface UpdateStages { - /** The stage of the Application update allowing to specify tags. */ + /** + * The stage of the Application update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: tags to be updated. - * + * * @param tags tags to be updated. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Application update allowing to specify description. */ + /** + * The stage of the Application update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of Application.. - * + * * @param description Description of Application. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the Application update allowing to specify friendlyName. */ + /** + * The stage of the Application update allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of Application.. - * + * * @param friendlyName Friendly name of Application. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); } - /** The stage of the Application update allowing to specify filePath. */ + /** + * The stage of the Application update allowing to specify filePath. + */ interface WithFilePath { /** * Specifies the filePath property: Specifies a path for the executable file for the application.. - * + * * @param filePath Specifies a path for the executable file for the application. * @return the next definition stage. */ Update withFilePath(String filePath); } - /** The stage of the Application update allowing to specify commandLineSetting. */ + /** + * The stage of the Application update allowing to specify commandLineSetting. + */ interface WithCommandLineSetting { /** * Specifies the commandLineSetting property: 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.. - * + * * @param 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. + * arguments provided by the client, command line arguments specified at publish time, or no command line + * arguments at all. * @return the next definition stage. */ Update withCommandLineSetting(CommandLineSetting commandLineSetting); } - /** The stage of the Application update allowing to specify commandLineArguments. */ + /** + * The stage of the Application update allowing to specify commandLineArguments. + */ interface WithCommandLineArguments { /** * Specifies the commandLineArguments property: Command Line Arguments for Application.. - * + * * @param commandLineArguments Command Line Arguments for Application. * @return the next definition stage. */ Update withCommandLineArguments(String commandLineArguments); } - /** The stage of the Application update allowing to specify showInPortal. */ + /** + * The stage of the Application update allowing to specify showInPortal. + */ interface WithShowInPortal { /** * Specifies the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access * server.. - * + * * @param showInPortal Specifies whether to show the RemoteApp program in the RD Web Access server. * @return the next definition stage. */ Update withShowInPortal(Boolean showInPortal); } - /** The stage of the Application update allowing to specify iconPath. */ + /** + * The stage of the Application update allowing to specify iconPath. + */ interface WithIconPath { /** * Specifies the iconPath property: Path to icon.. - * + * * @param iconPath Path to icon. * @return the next definition stage. */ Update withIconPath(String iconPath); } - /** The stage of the Application update allowing to specify iconIndex. */ + /** + * The stage of the Application update allowing to specify iconIndex. + */ interface WithIconIndex { /** * Specifies the iconIndex property: Index of the icon.. - * + * * @param iconIndex Index of the icon. * @return the next definition stage. */ Update withIconIndex(Integer iconIndex); } - /** The stage of the Application update allowing to specify msixPackageFamilyName. */ + /** + * The stage of the Application update allowing to specify msixPackageFamilyName. + */ interface WithMsixPackageFamilyName { /** * Specifies the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @param msixPackageFamilyName Specifies the package family name for MSIX applications. * @return the next definition stage. */ Update withMsixPackageFamilyName(String msixPackageFamilyName); } - /** The stage of the Application update allowing to specify msixPackageApplicationId. */ + /** + * The stage of the Application update allowing to specify msixPackageApplicationId. + */ interface WithMsixPackageApplicationId { /** * Specifies the msixPackageApplicationId property: Specifies the package application Id for MSIX * applications. - * + * * @param msixPackageApplicationId Specifies the package application Id for MSIX applications. * @return the next definition stage. */ Update withMsixPackageApplicationId(String msixPackageApplicationId); } - /** The stage of the Application update allowing to specify applicationType. */ + /** + * The stage of the Application update allowing to specify applicationType. + */ interface WithApplicationType { /** * Specifies the applicationType property: Resource Type of Application.. - * + * * @param applicationType Resource Type of Application. * @return the next definition stage. */ @@ -518,14 +561,14 @@ interface WithApplicationType { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Application refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ 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 5c8769c4ada6..b065e3f9f667 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 @@ -10,39 +10,41 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupInner; import java.util.Map; -/** An immutable client-side representation of ApplicationGroup. */ +/** + * An immutable client-side representation of ApplicationGroup. + */ public interface ApplicationGroup { /** * 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 location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); @@ -51,16 +53,16 @@ public interface ApplicationGroup { * Gets 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 delete the resource if it is removed from the template since it is managed by another resource. - * + * * @return the managedBy value. */ String managedBy(); /** * Gets the kind property: 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 + * 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. - * + * * @return the kind value. */ String kind(); @@ -70,144 +72,148 @@ public interface ApplicationGroup { * 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. - * + * * @return the etag value. */ String etag(); /** * Gets the identity property: The identity property. - * + * * @return the identity value. */ ResourceModelWithAllowedPropertySetIdentity identity(); /** * Gets the sku property: The sku property. - * + * * @return the sku value. */ ResourceModelWithAllowedPropertySetSku sku(); /** * Gets the plan property: The plan property. - * + * * @return the plan value. */ ResourceModelWithAllowedPropertySetPlan plan(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of ApplicationGroup. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the description property: Description of ApplicationGroup. - * + * * @return the description value. */ String description(); /** * Gets the friendlyName property: Friendly name of ApplicationGroup. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the hostPoolArmPath property: HostPool arm path of ApplicationGroup. - * + * * @return the hostPoolArmPath value. */ String hostPoolArmPath(); /** * Gets the workspaceArmPath property: Workspace arm path of ApplicationGroup. - * + * * @return the workspaceArmPath value. */ String workspaceArmPath(); /** * Gets the applicationGroupType property: Resource Type of ApplicationGroup. - * + * * @return the applicationGroupType value. */ ApplicationGroupType applicationGroupType(); /** * Gets the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ Boolean cloudPcResource(); /** * Gets the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @return the showInFeed value. */ Boolean showInFeed(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * 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.ApplicationGroupInner object. - * + * * @return the inner object. */ ApplicationGroupInner innerModel(); - /** The entirety of the ApplicationGroup definition. */ + /** + * The entirety of the ApplicationGroup definition. + */ interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithHostPoolArmPath, - DefinitionStages.WithApplicationGroupType, - DefinitionStages.WithCreate { + extends DefinitionStages.Blank, DefinitionStages.WithLocation, DefinitionStages.WithResourceGroup, + DefinitionStages.WithHostPoolArmPath, DefinitionStages.WithApplicationGroupType, DefinitionStages.WithCreate { } - /** The ApplicationGroup definition stages. */ + /** + * The ApplicationGroup definition stages. + */ interface DefinitionStages { - /** The first stage of the ApplicationGroup definition. */ + /** + * The first stage of the ApplicationGroup definition. + */ interface Blank extends WithLocation { } - /** The stage of the ApplicationGroup definition allowing to specify location. */ + /** + * The stage of the ApplicationGroup definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -215,40 +221,46 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ApplicationGroup definition allowing to specify parent resource. */ + /** + * The stage of the ApplicationGroup definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithHostPoolArmPath withExistingResourceGroup(String resourceGroupName); } - /** The stage of the ApplicationGroup definition allowing to specify hostPoolArmPath. */ + /** + * The stage of the ApplicationGroup definition allowing to specify hostPoolArmPath. + */ interface WithHostPoolArmPath { /** * Specifies the hostPoolArmPath property: HostPool arm path of ApplicationGroup.. - * + * * @param hostPoolArmPath HostPool arm path of ApplicationGroup. * @return the next definition stage. */ WithApplicationGroupType withHostPoolArmPath(String hostPoolArmPath); } - /** The stage of the ApplicationGroup definition allowing to specify applicationGroupType. */ + /** + * The stage of the ApplicationGroup definition allowing to specify applicationGroupType. + */ interface WithApplicationGroupType { /** * Specifies the applicationGroupType property: Resource Type of ApplicationGroup.. - * + * * @param applicationGroupType Resource Type of ApplicationGroup. * @return the next definition stage. */ @@ -260,134 +272,146 @@ interface WithApplicationGroupType { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithManagedBy, - DefinitionStages.WithKind, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku, - DefinitionStages.WithPlan, - DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, - DefinitionStages.WithShowInFeed { + extends DefinitionStages.WithTags, DefinitionStages.WithManagedBy, DefinitionStages.WithKind, + DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithPlan, + DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, DefinitionStages.WithShowInFeed { /** * Executes the create request. - * + * * @return the created resource. */ ApplicationGroup create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ApplicationGroup create(Context context); } - /** The stage of the ApplicationGroup definition allowing to specify tags. */ + /** + * The stage of the ApplicationGroup definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ApplicationGroup definition allowing to specify managedBy. */ + /** + * The stage of the ApplicationGroup definition allowing to specify managedBy. + */ interface WithManagedBy { /** * Specifies 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 delete the resource if it is removed from the template since it is managed by * another resource.. - * + * * @param managedBy 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. + * 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. * @return the next definition stage. */ WithCreate withManagedBy(String managedBy); } - /** The stage of the ApplicationGroup definition allowing to specify kind. */ + /** + * The stage of the ApplicationGroup definition allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: 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 + * 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.. - * + * * @param kind 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. + * same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the ApplicationGroup definition allowing to specify identity. */ + /** + * The stage of the ApplicationGroup definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity property.. - * + * * @param identity The identity property. * @return the next definition stage. */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } - /** The stage of the ApplicationGroup definition allowing to specify sku. */ + /** + * The stage of the ApplicationGroup definition allowing to specify sku. + */ interface WithSku { /** * Specifies the sku property: The sku property.. - * + * * @param sku The sku property. * @return the next definition stage. */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } - /** The stage of the ApplicationGroup definition allowing to specify plan. */ + /** + * The stage of the ApplicationGroup definition allowing to specify plan. + */ interface WithPlan { /** * Specifies the plan property: The plan property.. - * + * * @param plan The plan property. * @return the next definition stage. */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } - /** The stage of the ApplicationGroup definition allowing to specify description. */ + /** + * The stage of the ApplicationGroup definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of ApplicationGroup.. - * + * * @param description Description of ApplicationGroup. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the ApplicationGroup definition allowing to specify friendlyName. */ + /** + * The stage of the ApplicationGroup definition allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of ApplicationGroup.. - * + * * @param friendlyName Friendly name of ApplicationGroup. * @return the next definition stage. */ WithCreate withFriendlyName(String friendlyName); } - /** The stage of the ApplicationGroup definition allowing to specify showInFeed. */ + /** + * The stage of the ApplicationGroup definition allowing to specify showInFeed. + */ interface WithShowInFeed { /** * Specifies the showInFeed property: Boolean representing whether the applicationGroup is show in the * feed.. - * + * * @param showInFeed Boolean representing whether the applicationGroup is show in the feed. * @return the next definition stage. */ @@ -397,74 +421,83 @@ interface WithShowInFeed { /** * Begins update for the ApplicationGroup resource. - * + * * @return the stage of resource update. */ ApplicationGroup.Update update(); - /** The template for ApplicationGroup update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithDescription, - UpdateStages.WithFriendlyName, - UpdateStages.WithShowInFeed { + /** + * The template for ApplicationGroup update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, + UpdateStages.WithShowInFeed { /** * Executes the update request. - * + * * @return the updated resource. */ ApplicationGroup apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ApplicationGroup apply(Context context); } - /** The ApplicationGroup update stages. */ + /** + * The ApplicationGroup update stages. + */ interface UpdateStages { - /** The stage of the ApplicationGroup update allowing to specify tags. */ + /** + * The stage of the ApplicationGroup update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: tags to be updated. - * + * * @param tags tags to be updated. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the ApplicationGroup update allowing to specify description. */ + /** + * The stage of the ApplicationGroup update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of ApplicationGroup.. - * + * * @param description Description of ApplicationGroup. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the ApplicationGroup update allowing to specify friendlyName. */ + /** + * The stage of the ApplicationGroup update allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of ApplicationGroup.. - * + * * @param friendlyName Friendly name of ApplicationGroup. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); } - /** The stage of the ApplicationGroup update allowing to specify showInFeed. */ + /** + * The stage of the ApplicationGroup update allowing to specify showInFeed. + */ interface WithShowInFeed { /** * Specifies the showInFeed property: Boolean representing whether the applicationGroup is show in the * feed.. - * + * * @param showInFeed Boolean representing whether the applicationGroup is show in the feed. * @return the next definition stage. */ @@ -474,14 +507,14 @@ interface WithShowInFeed { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ApplicationGroup refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed 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 6c2e29d502aa..566c00fa7037 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 @@ -11,8 +11,8 @@ /** * ApplicationGroupList - * - *

List of ApplicationGroup definitions. + * + * List of ApplicationGroup definitions. */ @Fluent public final class ApplicationGroupList { @@ -28,13 +28,15 @@ public final class ApplicationGroupList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ApplicationGroupList class. */ + /** + * Creates an instance of ApplicationGroupList class. + */ public ApplicationGroupList() { } /** * Get the value property: List of ApplicationGroup definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of ApplicationGroup definitions. - * + * * @param value the value value to set. * @return the ApplicationGroupList object itself. */ @@ -54,7 +56,7 @@ public ApplicationGroupList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/ApplicationGroupPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupPatch.java index 015db48e8ec1..204729acca55 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 @@ -6,12 +6,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupPatchProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** ApplicationGroup properties that can be patched. */ +/** + * ApplicationGroup properties that can be patched. + */ @Fluent public final class ApplicationGroupPatch extends ProxyResource { /* @@ -27,13 +30,21 @@ public final class ApplicationGroupPatch extends ProxyResource { @JsonProperty(value = "properties") private ApplicationGroupPatchProperties innerProperties; - /** Creates an instance of ApplicationGroupPatch class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ApplicationGroupPatch class. + */ public ApplicationGroupPatch() { } /** * Get the tags property: tags to be updated. - * + * * @return the tags value. */ public Map tags() { @@ -42,7 +53,7 @@ public Map tags() { /** * Set the tags property: tags to be updated. - * + * * @param tags the tags value to set. * @return the ApplicationGroupPatch object itself. */ @@ -53,16 +64,25 @@ public ApplicationGroupPatch withTags(Map tags) { /** * Get the innerProperties property: ApplicationGroup properties that can be patched. - * + * * @return the innerProperties value. */ private ApplicationGroupPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the description property: Description of ApplicationGroup. - * + * * @return the description value. */ public String description() { @@ -71,7 +91,7 @@ public String description() { /** * Set the description property: Description of ApplicationGroup. - * + * * @param description the description value to set. * @return the ApplicationGroupPatch object itself. */ @@ -85,7 +105,7 @@ public ApplicationGroupPatch withDescription(String description) { /** * Get the friendlyName property: Friendly name of ApplicationGroup. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -94,7 +114,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of ApplicationGroup. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationGroupPatch object itself. */ @@ -108,7 +128,7 @@ public ApplicationGroupPatch withFriendlyName(String friendlyName) { /** * Get the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @return the showInFeed value. */ public Boolean showInFeed() { @@ -117,7 +137,7 @@ public Boolean showInFeed() { /** * Set the showInFeed property: Boolean representing whether the applicationGroup is show in the feed. - * + * * @param showInFeed the showInFeed value to set. * @return the ApplicationGroupPatch object itself. */ @@ -131,7 +151,7 @@ public ApplicationGroupPatch withShowInFeed(Boolean showInFeed) { /** * 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/ApplicationGroupType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationGroupType.java index e618394a9c5e..26e8faa0947e 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,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Resource Type of ApplicationGroup. */ +/** + * Resource Type of ApplicationGroup. + */ public final class ApplicationGroupType extends ExpandableStringEnum { - /** Static value RemoteApp for ApplicationGroupType. */ + /** + * Static value RemoteApp for ApplicationGroupType. + */ public static final ApplicationGroupType REMOTE_APP = fromString("RemoteApp"); - /** Static value Desktop for ApplicationGroupType. */ + /** + * Static value Desktop for ApplicationGroupType. + */ public static final ApplicationGroupType DESKTOP = fromString("Desktop"); /** * Creates a new instance of ApplicationGroupType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ApplicationGroupType() { /** * Creates or finds a ApplicationGroupType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ApplicationGroupType. */ @@ -38,7 +44,7 @@ public static ApplicationGroupType fromString(String name) { /** * Gets known ApplicationGroupType values. - * + * * @return known ApplicationGroupType values. */ public static Collection values() { 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 d4b001edc24d..60a00401b56e 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ApplicationGroups. */ +/** + * Resource collection API of ApplicationGroups. + */ public interface ApplicationGroups { /** * 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. @@ -21,12 +23,12 @@ public interface ApplicationGroups { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an application group along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -47,12 +49,12 @@ Response getByResourceGroupWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteByResourceGroupWithResponse( - String resourceGroupName, String applicationGroupName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -63,7 +65,7 @@ Response deleteByResourceGroupWithResponse( /** * 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. @@ -74,7 +76,7 @@ Response deleteByResourceGroupWithResponse( /** * List applicationGroups. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param pageSize Number of items per page. @@ -86,17 +88,12 @@ Response deleteByResourceGroupWithResponse( * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String filter, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context); /** * 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 PagedIterable}. @@ -105,7 +102,7 @@ PagedIterable listByResourceGroup( /** * List applicationGroups in subscription. - * + * * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -117,7 +114,7 @@ PagedIterable listByResourceGroup( /** * Get an application group. - * + * * @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. @@ -128,7 +125,7 @@ PagedIterable listByResourceGroup( /** * Get an application group. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -140,7 +137,7 @@ PagedIterable listByResourceGroup( /** * Remove an applicationGroup. - * + * * @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. @@ -150,7 +147,7 @@ PagedIterable listByResourceGroup( /** * Remove an applicationGroup. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -162,7 +159,7 @@ PagedIterable listByResourceGroup( /** * Begins definition for a new ApplicationGroup resource. - * + * * @param name resource name. * @return the first stage of the new ApplicationGroup definition. */ 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 8b1f4ababfb2..e5a4ecd4152c 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 @@ -11,8 +11,8 @@ /** * ApplicationList - * - *

List of Application definitions. + * + * List of Application definitions. */ @Fluent public final class ApplicationList { @@ -28,13 +28,15 @@ public final class ApplicationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ApplicationList class. */ + /** + * Creates an instance of ApplicationList class. + */ public ApplicationList() { } /** * Get the value property: List of Application definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of Application definitions. - * + * * @param value the value value to set. * @return the ApplicationList object itself. */ @@ -54,7 +56,7 @@ public ApplicationList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/ApplicationPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationPatch.java index ffb452e260b5..4b101c0f7ac6 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Application properties that can be patched. */ +/** + * Application properties that can be patched. + */ @Fluent public final class ApplicationPatch { /* @@ -26,13 +28,15 @@ public final class ApplicationPatch { @JsonProperty(value = "properties") private ApplicationPatchProperties innerProperties; - /** Creates an instance of ApplicationPatch class. */ + /** + * Creates an instance of ApplicationPatch class. + */ public ApplicationPatch() { } /** * Get the tags property: tags to be updated. - * + * * @return the tags value. */ public Map tags() { @@ -41,7 +45,7 @@ public Map tags() { /** * Set the tags property: tags to be updated. - * + * * @param tags the tags value to set. * @return the ApplicationPatch object itself. */ @@ -52,7 +56,7 @@ public ApplicationPatch withTags(Map tags) { /** * Get the innerProperties property: Detailed properties for Application. - * + * * @return the innerProperties value. */ private ApplicationPatchProperties innerProperties() { @@ -61,7 +65,7 @@ private ApplicationPatchProperties innerProperties() { /** * Get the description property: Description of Application. - * + * * @return the description value. */ public String description() { @@ -70,7 +74,7 @@ public String description() { /** * Set the description property: Description of Application. - * + * * @param description the description value to set. * @return the ApplicationPatch object itself. */ @@ -84,7 +88,7 @@ public ApplicationPatch withDescription(String description) { /** * Get the friendlyName property: Friendly name of Application. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -93,7 +97,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Application. - * + * * @param friendlyName the friendlyName value to set. * @return the ApplicationPatch object itself. */ @@ -107,7 +111,7 @@ public ApplicationPatch withFriendlyName(String friendlyName) { /** * Get the filePath property: Specifies a path for the executable file for the application. - * + * * @return the filePath value. */ public String filePath() { @@ -116,7 +120,7 @@ public String filePath() { /** * Set the filePath property: Specifies a path for the executable file for the application. - * + * * @param filePath the filePath value to set. * @return the ApplicationPatch object itself. */ @@ -132,7 +136,7 @@ public ApplicationPatch withFilePath(String filePath) { * Get the commandLineSetting property: 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. - * + * * @return the commandLineSetting value. */ public CommandLineSetting commandLineSetting() { @@ -143,7 +147,7 @@ public CommandLineSetting commandLineSetting() { * Set the commandLineSetting property: 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. - * + * * @param commandLineSetting the commandLineSetting value to set. * @return the ApplicationPatch object itself. */ @@ -157,7 +161,7 @@ public ApplicationPatch withCommandLineSetting(CommandLineSetting commandLineSet /** * Get the commandLineArguments property: Command Line Arguments for Application. - * + * * @return the commandLineArguments value. */ public String commandLineArguments() { @@ -166,7 +170,7 @@ public String commandLineArguments() { /** * Set the commandLineArguments property: Command Line Arguments for Application. - * + * * @param commandLineArguments the commandLineArguments value to set. * @return the ApplicationPatch object itself. */ @@ -180,7 +184,7 @@ public ApplicationPatch withCommandLineArguments(String commandLineArguments) { /** * Get the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @return the showInPortal value. */ public Boolean showInPortal() { @@ -189,7 +193,7 @@ public Boolean showInPortal() { /** * Set the showInPortal property: Specifies whether to show the RemoteApp program in the RD Web Access server. - * + * * @param showInPortal the showInPortal value to set. * @return the ApplicationPatch object itself. */ @@ -203,7 +207,7 @@ public ApplicationPatch withShowInPortal(Boolean showInPortal) { /** * Get the iconPath property: Path to icon. - * + * * @return the iconPath value. */ public String iconPath() { @@ -212,7 +216,7 @@ public String iconPath() { /** * Set the iconPath property: Path to icon. - * + * * @param iconPath the iconPath value to set. * @return the ApplicationPatch object itself. */ @@ -226,7 +230,7 @@ public ApplicationPatch withIconPath(String iconPath) { /** * Get the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ public Integer iconIndex() { @@ -235,7 +239,7 @@ public Integer iconIndex() { /** * Set the iconIndex property: Index of the icon. - * + * * @param iconIndex the iconIndex value to set. * @return the ApplicationPatch object itself. */ @@ -249,7 +253,7 @@ public ApplicationPatch withIconIndex(Integer iconIndex) { /** * Get the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @return the msixPackageFamilyName value. */ public String msixPackageFamilyName() { @@ -258,7 +262,7 @@ public String msixPackageFamilyName() { /** * Set the msixPackageFamilyName property: Specifies the package family name for MSIX applications. - * + * * @param msixPackageFamilyName the msixPackageFamilyName value to set. * @return the ApplicationPatch object itself. */ @@ -272,7 +276,7 @@ public ApplicationPatch withMsixPackageFamilyName(String msixPackageFamilyName) /** * Get the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @return the msixPackageApplicationId value. */ public String msixPackageApplicationId() { @@ -281,7 +285,7 @@ public String msixPackageApplicationId() { /** * Set the msixPackageApplicationId property: Specifies the package application Id for MSIX applications. - * + * * @param msixPackageApplicationId the msixPackageApplicationId value to set. * @return the ApplicationPatch object itself. */ @@ -295,7 +299,7 @@ public ApplicationPatch withMsixPackageApplicationId(String msixPackageApplicati /** * Get the applicationType property: Resource Type of Application. - * + * * @return the applicationType value. */ public RemoteApplicationType applicationType() { @@ -304,7 +308,7 @@ public RemoteApplicationType applicationType() { /** * Set the applicationType property: Resource Type of Application. - * + * * @param applicationType the applicationType value to set. * @return the ApplicationPatch object itself. */ @@ -318,7 +322,7 @@ public ApplicationPatch withApplicationType(RemoteApplicationType applicationTyp /** * 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/ApplicationType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ApplicationType.java index 342b886848b4..e30fce78fc90 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,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Application type of application. */ +/** + * Application type of application. + */ public final class ApplicationType extends ExpandableStringEnum { - /** Static value RemoteApp for ApplicationType. */ + /** + * Static value RemoteApp for ApplicationType. + */ public static final ApplicationType REMOTE_APP = fromString("RemoteApp"); - /** Static value Desktop for ApplicationType. */ + /** + * Static value Desktop for ApplicationType. + */ public static final ApplicationType DESKTOP = fromString("Desktop"); /** * Creates a new instance of ApplicationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ApplicationType() { /** * Creates or finds a ApplicationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ApplicationType. */ @@ -38,7 +44,7 @@ public static ApplicationType fromString(String name) { /** * Gets known ApplicationType values. - * + * * @return known ApplicationType values. */ public static Collection values() { 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 e8576ae8e0e9..4806df3eaea6 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Applications. */ +/** + * Resource collection API of Applications. + */ public interface Applications { /** * 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. @@ -22,12 +24,12 @@ public interface Applications { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an application along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String applicationGroupName, String applicationName, Context context); + Response getWithResponse(String resourceGroupName, String applicationGroupName, String applicationName, + Context context); /** * 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. @@ -40,7 +42,7 @@ Response getWithResponse( /** * 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. @@ -50,12 +52,12 @@ Response getWithResponse( * @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); + Response deleteWithResponse(String resourceGroupName, String applicationGroupName, String applicationName, + 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. @@ -67,7 +69,7 @@ Response deleteWithResponse( /** * List applications. - * + * * @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. @@ -79,7 +81,7 @@ Response deleteWithResponse( /** * 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. @@ -91,17 +93,12 @@ Response deleteWithResponse( * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable list(String resourceGroupName, String applicationGroupName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context); /** * Get an application. - * + * * @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. @@ -112,7 +109,7 @@ PagedIterable list( /** * Get an application. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +121,7 @@ PagedIterable list( /** * Remove an application. - * + * * @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. @@ -134,7 +131,7 @@ PagedIterable list( /** * Remove an application. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,7 +143,7 @@ PagedIterable list( /** * Begins definition for a new Application resource. - * + * * @param name resource name. * @return the first stage of the new Application definition. */ 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 17fad5d97d9a..6707554a91c4 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 @@ -13,18 +13,24 @@ * 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. */ + /** + * Static value DoNotAllow for CommandLineSetting. + */ public static final CommandLineSetting DO_NOT_ALLOW = fromString("DoNotAllow"); - /** Static value Allow for CommandLineSetting. */ + /** + * Static value Allow for CommandLineSetting. + */ public static final CommandLineSetting ALLOW = fromString("Allow"); - /** Static value Require for CommandLineSetting. */ + /** + * Static value Require for CommandLineSetting. + */ public static final CommandLineSetting REQUIRE = fromString("Require"); /** * Creates a new instance of CommandLineSetting value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public CommandLineSetting() { /** * Creates or finds a CommandLineSetting from its string representation. - * + * * @param name a name to look for. * @return the corresponding CommandLineSetting. */ @@ -44,7 +50,7 @@ public static CommandLineSetting fromString(String name) { /** * Gets known CommandLineSetting values. - * + * * @return known CommandLineSetting values. */ public static Collection values() { 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 index e7a4324672a1..b7413913b91b 100644 --- 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 @@ -7,30 +7,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Day of the week. */ +/** + * Day of the week. + */ public enum DayOfWeek { - /** Enum value Monday. */ + /** + * Enum value Monday. + */ MONDAY("Monday"), - /** Enum value Tuesday. */ + /** + * Enum value Tuesday. + */ TUESDAY("Tuesday"), - /** Enum value Wednesday. */ + /** + * Enum value Wednesday. + */ WEDNESDAY("Wednesday"), - /** Enum value Thursday. */ + /** + * Enum value Thursday. + */ THURSDAY("Thursday"), - /** Enum value Friday. */ + /** + * Enum value Friday. + */ FRIDAY("Friday"), - /** Enum value Saturday. */ + /** + * Enum value Saturday. + */ SATURDAY("Saturday"), - /** Enum value Sunday. */ + /** + * Enum value Sunday. + */ SUNDAY("Sunday"); - /** The actual serialized value for a DayOfWeek instance. */ + /** + * The actual serialized value for a DayOfWeek instance. + */ private final String value; DayOfWeek(String value) { @@ -39,7 +57,7 @@ public enum DayOfWeek { /** * 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. */ @@ -57,7 +75,9 @@ public static DayOfWeek fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktop.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktop.java index 78aa4afce1d2..ed363a804c89 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktop.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktop.java @@ -7,74 +7,76 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopInner; -/** An immutable client-side representation of Desktop. */ +/** + * An immutable client-side representation of Desktop. + */ public interface Desktop { /** * 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. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of Desktop. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the description property: Description of Desktop. - * + * * @return the description value. */ String description(); /** * Gets the friendlyName property: Friendly name of Desktop. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the iconHash property: Hash of the icon. - * + * * @return the iconHash value. */ String iconHash(); /** * Gets the iconContent property: The icon a 64 bit string as a byte array. - * + * * @return the iconContent value. */ byte[] iconContent(); /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopInner object. - * + * * @return the inner object. */ DesktopInner innerModel(); 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 ba3adad3bccd..590d07aa26ac 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 @@ -11,8 +11,8 @@ /** * DesktopList - * - *

List of Desktop definitions. + * + * List of Desktop definitions. */ @Fluent public final class DesktopList { @@ -28,13 +28,15 @@ public final class DesktopList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DesktopList class. */ + /** + * Creates an instance of DesktopList class. + */ public DesktopList() { } /** * Get the value property: List of Desktop definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of Desktop definitions. - * + * * @param value the value value to set. * @return the DesktopList object itself. */ @@ -54,7 +56,7 @@ public DesktopList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/DesktopPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/DesktopPatch.java index 6ff80cdfed02..dd8783eaf753 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Desktop properties that can be patched. */ +/** + * Desktop properties that can be patched. + */ @Fluent public final class DesktopPatch { /* @@ -26,13 +28,15 @@ public final class DesktopPatch { @JsonProperty(value = "properties") private DesktopPatchProperties innerProperties; - /** Creates an instance of DesktopPatch class. */ + /** + * Creates an instance of DesktopPatch class. + */ public DesktopPatch() { } /** * Get the tags property: tags to be updated. - * + * * @return the tags value. */ public Map tags() { @@ -41,7 +45,7 @@ public Map tags() { /** * Set the tags property: tags to be updated. - * + * * @param tags the tags value to set. * @return the DesktopPatch object itself. */ @@ -52,7 +56,7 @@ public DesktopPatch withTags(Map tags) { /** * Get the innerProperties property: Detailed properties for Desktop. - * + * * @return the innerProperties value. */ private DesktopPatchProperties innerProperties() { @@ -61,7 +65,7 @@ private DesktopPatchProperties innerProperties() { /** * Get the description property: Description of Desktop. - * + * * @return the description value. */ public String description() { @@ -70,7 +74,7 @@ public String description() { /** * Set the description property: Description of Desktop. - * + * * @param description the description value to set. * @return the DesktopPatch object itself. */ @@ -84,7 +88,7 @@ public DesktopPatch withDescription(String description) { /** * Get the friendlyName property: Friendly name of Desktop. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -93,7 +97,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Desktop. - * + * * @param friendlyName the friendlyName value to set. * @return the DesktopPatch object itself. */ @@ -107,7 +111,7 @@ public DesktopPatch withFriendlyName(String friendlyName) { /** * 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/Desktops.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Desktops.java index 80e3c1c177a4..7392e7f52f5f 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Desktops. */ +/** + * 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. @@ -22,12 +24,12 @@ public interface Desktops { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a desktop along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String applicationGroupName, String desktopName, Context context); + Response getWithResponse(String resourceGroupName, String applicationGroupName, String desktopName, + Context context); /** * 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. @@ -40,7 +42,7 @@ Response getWithResponse( /** * 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. @@ -51,16 +53,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return schema for Desktop properties along with {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, - String applicationGroupName, - String desktopName, - DesktopPatch desktop, - Context context); + Response updateWithResponse(String resourceGroupName, String applicationGroupName, String desktopName, + 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. @@ -73,7 +71,7 @@ Response updateWithResponse( /** * List desktops. - * + * * @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. @@ -85,7 +83,7 @@ Response updateWithResponse( /** * 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. @@ -97,11 +95,6 @@ Response updateWithResponse( * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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/ExpandMsixImage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImage.java index a70dcd0f08cd..cafd12037999 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImage.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImage.java @@ -4,50 +4,60 @@ package com.azure.resourcemanager.desktopvirtualization.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of ExpandMsixImage. */ +/** + * An immutable client-side representation of ExpandMsixImage. + */ public interface ExpandMsixImage { /** * 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: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the packageAlias property: Alias of MSIX Package. - * + * * @return the packageAlias value. */ String packageAlias(); /** * Gets the imagePath property: VHD/CIM image path on Network Share. - * + * * @return the imagePath value. */ String imagePath(); /** * Gets the packageName property: Package Name from appxmanifest.xml. - * + * * @return the packageName value. */ String packageName(); @@ -55,77 +65,91 @@ public interface ExpandMsixImage { /** * Gets the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @return the packageFamilyName value. */ String packageFamilyName(); /** * Gets the packageFullName property: Package Full Name from appxmanifest.xml. - * + * * @return the packageFullName value. */ String packageFullName(); /** * Gets the displayName property: User friendly Name to be displayed in the portal. - * + * * @return the displayName value. */ String displayName(); /** * Gets the packageRelativePath property: Relative Path to the package inside the image. - * + * * @return the packageRelativePath value. */ String packageRelativePath(); /** * Gets the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @return the isRegularRegistration value. */ Boolean isRegularRegistration(); /** * Gets the isActive property: Make this version of the package the active one across the hostpool. - * + * * @return the isActive value. */ Boolean isActive(); /** * Gets the packageDependencies property: List of package dependencies. - * + * * @return the packageDependencies value. */ List packageDependencies(); /** - * Gets the version property: Package Version found in the appxmanifest.xml. - * + * Gets the version property: Package version found in the appxmanifest.xml. + * * @return the version value. */ String version(); /** * Gets the lastUpdated property: Date Package was last updated, found in the appxmanifest.xml. - * + * * @return the lastUpdated value. */ OffsetDateTime lastUpdated(); /** * Gets the packageApplications property: List of package applications. - * + * * @return the packageApplications value. */ List packageApplications(); + /** + * Gets the certificateName property: Certificate name found in the appxmanifest.xml. + * + * @return the certificateName value. + */ + String certificateName(); + + /** + * Gets the certificateExpiry property: Date certificate expires, found in the appxmanifest.xml. + * + * @return the certificateExpiry value. + */ + OffsetDateTime certificateExpiry(); + /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner object. - * + * * @return the inner object. */ ExpandMsixImageInner innerModel(); 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 178c8b8ad58a..407a84e4963a 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 @@ -11,8 +11,8 @@ /** * ExpandMsixImageList - * - *

List of MSIX package properties retrieved from MSIX Image expansion. + * + * List of MSIX package properties retrieved from MSIX Image expansion. */ @Fluent public final class ExpandMsixImageList { @@ -28,13 +28,15 @@ public final class ExpandMsixImageList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ExpandMsixImageList class. */ + /** + * Creates an instance of ExpandMsixImageList class. + */ public ExpandMsixImageList() { } /** * Get the value property: List of MSIX package properties from give MSIX Image. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of MSIX package properties from give MSIX Image. - * + * * @param value the value value to set. * @return the ExpandMsixImageList object itself. */ @@ -54,7 +56,7 @@ public ExpandMsixImageList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/FailHealthCheckOnStagingFailure.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/FailHealthCheckOnStagingFailure.java new file mode 100644 index 000000000000..b1a20b9688d0 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/FailHealthCheckOnStagingFailure.java @@ -0,0 +1,58 @@ +// Copyright (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; + +/** + * Parameter indicating how the health check should behave if this package fails staging. + */ +public final class FailHealthCheckOnStagingFailure extends ExpandableStringEnum { + /** + * Static value Unhealthy for FailHealthCheckOnStagingFailure. + */ + public static final FailHealthCheckOnStagingFailure UNHEALTHY = fromString("Unhealthy"); + + /** + * Static value NeedsAssistance for FailHealthCheckOnStagingFailure. + */ + public static final FailHealthCheckOnStagingFailure NEEDS_ASSISTANCE = fromString("NeedsAssistance"); + + /** + * Static value DoNotFail for FailHealthCheckOnStagingFailure. + */ + public static final FailHealthCheckOnStagingFailure DO_NOT_FAIL = fromString("DoNotFail"); + + /** + * Creates a new instance of FailHealthCheckOnStagingFailure value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FailHealthCheckOnStagingFailure() { + } + + /** + * Creates or finds a FailHealthCheckOnStagingFailure from its string representation. + * + * @param name a name to look for. + * @return the corresponding FailHealthCheckOnStagingFailure. + */ + @JsonCreator + public static FailHealthCheckOnStagingFailure fromString(String name) { + return fromString(name, FailHealthCheckOnStagingFailure.class); + } + + /** + * Gets known FailHealthCheckOnStagingFailure values. + * + * @return known FailHealthCheckOnStagingFailure values. + */ + public static Collection values() { + return values(FailHealthCheckOnStagingFailure.class); + } +} 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 2ec1634405e8..09521d32df21 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,44 +8,68 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Represents the name of the health check operation performed. */ +/** + * Represents the name of the health check operation performed. + */ public final class HealthCheckName extends ExpandableStringEnum { - /** Static value DomainJoinedCheck for HealthCheckName. */ + /** + * Static value DomainJoinedCheck for HealthCheckName. + */ public static final HealthCheckName DOMAIN_JOINED_CHECK = fromString("DomainJoinedCheck"); - /** Static value DomainTrustCheck for HealthCheckName. */ + /** + * Static value DomainTrustCheck for HealthCheckName. + */ public static final HealthCheckName DOMAIN_TRUST_CHECK = fromString("DomainTrustCheck"); - /** Static value FSLogixHealthCheck for HealthCheckName. */ + /** + * Static value FSLogixHealthCheck for HealthCheckName. + */ public static final HealthCheckName FSLOGIX_HEALTH_CHECK = fromString("FSLogixHealthCheck"); - /** Static value SxSStackListenerCheck for HealthCheckName. */ + /** + * Static value SxSStackListenerCheck for HealthCheckName. + */ public static final HealthCheckName SX_SSTACK_LISTENER_CHECK = fromString("SxSStackListenerCheck"); - /** Static value UrlsAccessibleCheck for HealthCheckName. */ + /** + * Static value UrlsAccessibleCheck for HealthCheckName. + */ public static final HealthCheckName URLS_ACCESSIBLE_CHECK = fromString("UrlsAccessibleCheck"); - /** Static value MonitoringAgentCheck for HealthCheckName. */ + /** + * Static value MonitoringAgentCheck for HealthCheckName. + */ public static final HealthCheckName MONITORING_AGENT_CHECK = fromString("MonitoringAgentCheck"); - /** Static value DomainReachable for HealthCheckName. */ + /** + * Static value DomainReachable for HealthCheckName. + */ public static final HealthCheckName DOMAIN_REACHABLE = fromString("DomainReachable"); - /** Static value WebRTCRedirectorCheck for HealthCheckName. */ + /** + * Static value WebRTCRedirectorCheck for HealthCheckName. + */ public static final HealthCheckName WEB_RTCREDIRECTOR_CHECK = fromString("WebRTCRedirectorCheck"); - /** Static value SupportedEncryptionCheck for HealthCheckName. */ + /** + * Static value SupportedEncryptionCheck for HealthCheckName. + */ public static final HealthCheckName SUPPORTED_ENCRYPTION_CHECK = fromString("SupportedEncryptionCheck"); - /** Static value MetaDataServiceCheck for HealthCheckName. */ + /** + * Static value MetaDataServiceCheck for HealthCheckName. + */ public static final HealthCheckName META_DATA_SERVICE_CHECK = fromString("MetaDataServiceCheck"); - /** Static value AppAttachHealthCheck for HealthCheckName. */ + /** + * Static value AppAttachHealthCheck for HealthCheckName. + */ public static final HealthCheckName APP_ATTACH_HEALTH_CHECK = fromString("AppAttachHealthCheck"); /** * Creates a new instance of HealthCheckName value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -54,7 +78,7 @@ public HealthCheckName() { /** * Creates or finds a HealthCheckName from its string representation. - * + * * @param name a name to look for. * @return the corresponding HealthCheckName. */ @@ -65,7 +89,7 @@ public static HealthCheckName fromString(String name) { /** * Gets known HealthCheckName values. - * + * * @return known HealthCheckName values. */ public static Collection values() { 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 d5dd24f33c55..6c3af7b523ad 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,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Represents the Health state of the health check we performed. */ +/** + * Represents the Health state of the health check we performed. + */ public final class HealthCheckResult extends ExpandableStringEnum { - /** Static value Unknown for HealthCheckResult. */ + /** + * Static value Unknown for HealthCheckResult. + */ public static final HealthCheckResult UNKNOWN = fromString("Unknown"); - /** Static value HealthCheckSucceeded for HealthCheckResult. */ + /** + * Static value HealthCheckSucceeded for HealthCheckResult. + */ public static final HealthCheckResult HEALTH_CHECK_SUCCEEDED = fromString("HealthCheckSucceeded"); - /** Static value HealthCheckFailed for HealthCheckResult. */ + /** + * Static value HealthCheckFailed for HealthCheckResult. + */ public static final HealthCheckResult HEALTH_CHECK_FAILED = fromString("HealthCheckFailed"); - /** Static value SessionHostShutdown for HealthCheckResult. */ + /** + * Static value SessionHostShutdown for HealthCheckResult. + */ public static final HealthCheckResult SESSION_HOST_SHUTDOWN = fromString("SessionHostShutdown"); /** * Creates a new instance of HealthCheckResult value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public HealthCheckResult() { /** * Creates or finds a HealthCheckResult from its string representation. - * + * * @param name a name to look for. * @return the corresponding HealthCheckResult. */ @@ -44,7 +54,7 @@ public static HealthCheckResult fromString(String name) { /** * Gets known HealthCheckResult values. - * + * * @return known HealthCheckResult values. */ public static Collection values() { 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 2e2df0ffcb0b..2e1021744dcf 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 @@ -13,39 +13,41 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of HostPool. */ +/** + * An immutable client-side representation of HostPool. + */ public interface HostPool { /** * 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 location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); @@ -54,16 +56,16 @@ public interface HostPool { * Gets 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 delete the resource if it is removed from the template since it is managed by another resource. - * + * * @return the managedBy value. */ String managedBy(); /** * Gets the kind property: 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 + * 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. - * + * * @return the kind value. */ String kind(); @@ -73,140 +75,147 @@ public interface HostPool { * 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. - * + * * @return the etag value. */ String etag(); /** * Gets the identity property: The identity property. - * + * * @return the identity value. */ ResourceModelWithAllowedPropertySetIdentity identity(); /** * Gets the sku property: The sku property. - * + * * @return the sku value. */ ResourceModelWithAllowedPropertySetSku sku(); /** * Gets the plan property: The plan property. - * + * * @return the plan value. */ ResourceModelWithAllowedPropertySetPlan plan(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of HostPool. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the friendlyName property: Friendly name of HostPool. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the description property: Description of HostPool. - * + * * @return the description value. */ String description(); /** * Gets the hostPoolType property: HostPool type for desktop. - * + * * @return the hostPoolType value. */ HostPoolType hostPoolType(); /** * Gets the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @return the personalDesktopAssignmentType value. */ PersonalDesktopAssignmentType personalDesktopAssignmentType(); /** * Gets the customRdpProperty property: Custom rdp property of HostPool. - * + * * @return the customRdpProperty value. */ String customRdpProperty(); /** * Gets the maxSessionLimit property: The max session limit of HostPool. - * + * * @return the maxSessionLimit value. */ Integer maxSessionLimit(); /** * Gets the loadBalancerType property: The type of the load balancer. - * + * * @return the loadBalancerType value. */ LoadBalancerType loadBalancerType(); /** * Gets the ring property: The ring number of HostPool. - * + * * @return the ring value. */ Integer ring(); /** * Gets the validationEnvironment property: Is validation environment. - * + * * @return the validationEnvironment value. */ Boolean validationEnvironment(); /** * Gets the registrationInfo property: The registration info of HostPool. - * + * * @return the registrationInfo value. */ RegistrationInfo registrationInfo(); /** * Gets the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @return the vmTemplate value. */ String vmTemplate(); /** * Gets the applicationGroupReferences property: List of applicationGroup links. - * + * * @return the applicationGroupReferences value. */ List applicationGroupReferences(); + /** + * Gets the appAttachPackageReferences property: List of App Attach Package links. + * + * @return the appAttachPackageReferences value. + */ + List appAttachPackageReferences(); + /** * Gets the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @return the ssoadfsAuthority value. */ String ssoadfsAuthority(); /** * Gets the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @return the ssoClientId value. */ String ssoClientId(); @@ -214,14 +223,14 @@ public interface HostPool { /** * Gets the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication * to ADFS. - * + * * @return the ssoClientSecretKeyVaultPath value. */ String ssoClientSecretKeyVaultPath(); /** * Gets the ssoSecretType property: The type of single sign on Secret Type. - * + * * @return the ssoSecretType value. */ SsoSecretType ssoSecretType(); @@ -229,21 +238,21 @@ public interface HostPool { /** * Gets the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @return the preferredAppGroupType value. */ PreferredAppGroupType preferredAppGroupType(); /** * Gets the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @return the startVMOnConnect value. */ Boolean startVMOnConnect(); /** * Gets the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ Boolean cloudPcResource(); @@ -251,7 +260,7 @@ public interface HostPool { /** * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @return the publicNetworkAccess value. */ HostpoolPublicNetworkAccess publicNetworkAccess(); @@ -259,7 +268,7 @@ public interface HostPool { /** * Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. - * + * * @return the agentUpdate value. */ AgentUpdateProperties agentUpdate(); @@ -267,61 +276,64 @@ public interface HostPool { /** * 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. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * 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.HostPoolInner object. - * + * * @return the inner object. */ HostPoolInner innerModel(); - /** The entirety of the HostPool definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithHostPoolType, - DefinitionStages.WithLoadBalancerType, - DefinitionStages.WithPreferredAppGroupType, - DefinitionStages.WithCreate { + /** + * The entirety of the HostPool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithHostPoolType, DefinitionStages.WithLoadBalancerType, + DefinitionStages.WithPreferredAppGroupType, DefinitionStages.WithCreate { } - /** The HostPool definition stages. */ + /** + * The HostPool definition stages. + */ interface DefinitionStages { - /** The first stage of the HostPool definition. */ + /** + * The first stage of the HostPool definition. + */ interface Blank extends WithLocation { } - /** The stage of the HostPool definition allowing to specify location. */ + /** + * The stage of the HostPool definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -329,54 +341,62 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the HostPool definition allowing to specify parent resource. */ + /** + * The stage of the HostPool definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithHostPoolType withExistingResourceGroup(String resourceGroupName); } - /** The stage of the HostPool definition allowing to specify hostPoolType. */ + /** + * The stage of the HostPool definition allowing to specify hostPoolType. + */ interface WithHostPoolType { /** * Specifies the hostPoolType property: HostPool type for desktop.. - * + * * @param hostPoolType HostPool type for desktop. * @return the next definition stage. */ WithLoadBalancerType withHostPoolType(HostPoolType hostPoolType); } - /** The stage of the HostPool definition allowing to specify loadBalancerType. */ + /** + * The stage of the HostPool definition allowing to specify loadBalancerType. + */ interface WithLoadBalancerType { /** * Specifies the loadBalancerType property: The type of the load balancer.. - * + * * @param loadBalancerType The type of the load balancer. * @return the next definition stage. */ WithPreferredAppGroupType withLoadBalancerType(LoadBalancerType loadBalancerType); } - /** The stage of the HostPool definition allowing to specify preferredAppGroupType. */ + /** + * The stage of the HostPool definition allowing to specify preferredAppGroupType. + */ interface WithPreferredAppGroupType { /** * Specifies the preferredAppGroupType property: The type of preferred application group type, default to * Desktop Application Group. - * + * * @param preferredAppGroupType The type of preferred application group type, default to Desktop Application - * Group. + * Group. * @return the next definition stage. */ WithCreate withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType); @@ -386,298 +406,329 @@ interface WithPreferredAppGroupType { * The stage of the HostPool definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithManagedBy, - DefinitionStages.WithKind, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku, - DefinitionStages.WithPlan, - DefinitionStages.WithFriendlyName, - DefinitionStages.WithDescription, - DefinitionStages.WithPersonalDesktopAssignmentType, - DefinitionStages.WithCustomRdpProperty, - DefinitionStages.WithMaxSessionLimit, - DefinitionStages.WithRing, - DefinitionStages.WithValidationEnvironment, - DefinitionStages.WithRegistrationInfo, - DefinitionStages.WithVmTemplate, - DefinitionStages.WithSsoadfsAuthority, - DefinitionStages.WithSsoClientId, - DefinitionStages.WithSsoClientSecretKeyVaultPath, - DefinitionStages.WithSsoSecretType, - DefinitionStages.WithStartVMOnConnect, - DefinitionStages.WithPublicNetworkAccess, - DefinitionStages.WithAgentUpdate { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithManagedBy, + DefinitionStages.WithKind, DefinitionStages.WithIdentity, DefinitionStages.WithSku, + DefinitionStages.WithPlan, DefinitionStages.WithFriendlyName, DefinitionStages.WithDescription, + DefinitionStages.WithPersonalDesktopAssignmentType, DefinitionStages.WithCustomRdpProperty, + DefinitionStages.WithMaxSessionLimit, DefinitionStages.WithRing, DefinitionStages.WithValidationEnvironment, + DefinitionStages.WithRegistrationInfo, DefinitionStages.WithVmTemplate, + DefinitionStages.WithSsoadfsAuthority, DefinitionStages.WithSsoClientId, + DefinitionStages.WithSsoClientSecretKeyVaultPath, DefinitionStages.WithSsoSecretType, + DefinitionStages.WithStartVMOnConnect, DefinitionStages.WithPublicNetworkAccess, + DefinitionStages.WithAgentUpdate { /** * Executes the create request. - * + * * @return the created resource. */ HostPool create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ HostPool create(Context context); } - /** The stage of the HostPool definition allowing to specify tags. */ + /** + * The stage of the HostPool definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the HostPool definition allowing to specify managedBy. */ + /** + * The stage of the HostPool definition allowing to specify managedBy. + */ interface WithManagedBy { /** * Specifies 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 delete the resource if it is removed from the template since it is managed by * another resource.. - * + * * @param managedBy 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. + * 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. * @return the next definition stage. */ WithCreate withManagedBy(String managedBy); } - /** The stage of the HostPool definition allowing to specify kind. */ + /** + * The stage of the HostPool definition allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: 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 + * 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.. - * + * * @param kind 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. + * same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the HostPool definition allowing to specify identity. */ + /** + * The stage of the HostPool definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity property.. - * + * * @param identity The identity property. * @return the next definition stage. */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } - /** The stage of the HostPool definition allowing to specify sku. */ + /** + * The stage of the HostPool definition allowing to specify sku. + */ interface WithSku { /** * Specifies the sku property: The sku property.. - * + * * @param sku The sku property. * @return the next definition stage. */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } - /** The stage of the HostPool definition allowing to specify plan. */ + /** + * The stage of the HostPool definition allowing to specify plan. + */ interface WithPlan { /** * Specifies the plan property: The plan property.. - * + * * @param plan The plan property. * @return the next definition stage. */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } - /** The stage of the HostPool definition allowing to specify friendlyName. */ + /** + * The stage of the HostPool definition allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of HostPool.. - * + * * @param friendlyName Friendly name of HostPool. * @return the next definition stage. */ WithCreate withFriendlyName(String friendlyName); } - /** The stage of the HostPool definition allowing to specify description. */ + /** + * The stage of the HostPool definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of HostPool.. - * + * * @param description Description of HostPool. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the HostPool definition allowing to specify personalDesktopAssignmentType. */ + /** + * The stage of the HostPool definition allowing to specify personalDesktopAssignmentType. + */ interface WithPersonalDesktopAssignmentType { /** * Specifies the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool.. - * + * * @param personalDesktopAssignmentType PersonalDesktopAssignment type for HostPool. * @return the next definition stage. */ WithCreate withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType); } - /** The stage of the HostPool definition allowing to specify customRdpProperty. */ + /** + * The stage of the HostPool definition allowing to specify customRdpProperty. + */ interface WithCustomRdpProperty { /** * Specifies the customRdpProperty property: Custom rdp property of HostPool.. - * + * * @param customRdpProperty Custom rdp property of HostPool. * @return the next definition stage. */ WithCreate withCustomRdpProperty(String customRdpProperty); } - /** The stage of the HostPool definition allowing to specify maxSessionLimit. */ + /** + * The stage of the HostPool definition allowing to specify maxSessionLimit. + */ interface WithMaxSessionLimit { /** * Specifies the maxSessionLimit property: The max session limit of HostPool.. - * + * * @param maxSessionLimit The max session limit of HostPool. * @return the next definition stage. */ WithCreate withMaxSessionLimit(Integer maxSessionLimit); } - /** The stage of the HostPool definition allowing to specify ring. */ + /** + * The stage of the HostPool definition allowing to specify ring. + */ interface WithRing { /** * Specifies the ring property: The ring number of HostPool.. - * + * * @param ring The ring number of HostPool. * @return the next definition stage. */ WithCreate withRing(Integer ring); } - /** The stage of the HostPool definition allowing to specify validationEnvironment. */ + /** + * The stage of the HostPool definition allowing to specify validationEnvironment. + */ interface WithValidationEnvironment { /** * Specifies the validationEnvironment property: Is validation environment.. - * + * * @param validationEnvironment Is validation environment. * @return the next definition stage. */ WithCreate withValidationEnvironment(Boolean validationEnvironment); } - /** The stage of the HostPool definition allowing to specify registrationInfo. */ + /** + * The stage of the HostPool definition allowing to specify registrationInfo. + */ interface WithRegistrationInfo { /** * Specifies the registrationInfo property: The registration info of HostPool.. - * + * * @param registrationInfo The registration info of HostPool. * @return the next definition stage. */ WithCreate withRegistrationInfo(RegistrationInfoInner registrationInfo); } - /** The stage of the HostPool definition allowing to specify vmTemplate. */ + /** + * The stage of the HostPool definition allowing to specify vmTemplate. + */ interface WithVmTemplate { /** * Specifies the vmTemplate property: VM template for sessionhosts configuration within hostpool.. - * + * * @param vmTemplate VM template for sessionhosts configuration within hostpool. * @return the next definition stage. */ WithCreate withVmTemplate(String vmTemplate); } - /** The stage of the HostPool definition allowing to specify ssoadfsAuthority. */ + /** + * The stage of the HostPool definition allowing to specify ssoadfsAuthority. + */ interface WithSsoadfsAuthority { /** * Specifies the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates.. - * + * * @param ssoadfsAuthority URL to customer ADFS server for signing WVD SSO certificates. * @return the next definition stage. */ WithCreate withSsoadfsAuthority(String ssoadfsAuthority); } - /** The stage of the HostPool definition allowing to specify ssoClientId. */ + /** + * The stage of the HostPool definition allowing to specify ssoClientId. + */ interface WithSsoClientId { /** * Specifies the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO * certificates.. - * + * * @param ssoClientId ClientId for the registered Relying Party used to issue WVD SSO certificates. * @return the next definition stage. */ WithCreate withSsoClientId(String ssoClientId); } - /** The stage of the HostPool definition allowing to specify ssoClientSecretKeyVaultPath. */ + /** + * The stage of the HostPool definition allowing to specify ssoClientSecretKeyVaultPath. + */ interface WithSsoClientSecretKeyVaultPath { /** * Specifies the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for * communication to ADFS.. - * + * * @param ssoClientSecretKeyVaultPath Path to Azure KeyVault storing the secret used for communication to - * ADFS. + * ADFS. * @return the next definition stage. */ WithCreate withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath); } - /** The stage of the HostPool definition allowing to specify ssoSecretType. */ + /** + * The stage of the HostPool definition allowing to specify ssoSecretType. + */ interface WithSsoSecretType { /** * Specifies the ssoSecretType property: The type of single sign on Secret Type.. - * + * * @param ssoSecretType The type of single sign on Secret Type. * @return the next definition stage. */ WithCreate withSsoSecretType(SsoSecretType ssoSecretType); } - /** The stage of the HostPool definition allowing to specify startVMOnConnect. */ + /** + * The stage of the HostPool definition allowing to specify startVMOnConnect. + */ interface WithStartVMOnConnect { /** * Specifies the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature.. - * + * * @param startVMOnConnect The flag to turn on/off StartVMOnConnect feature. * @return the next definition stage. */ WithCreate withStartVMOnConnect(Boolean startVMOnConnect); } - /** The stage of the HostPool definition allowing to specify publicNetworkAccess. */ + /** + * The stage of the HostPool definition allowing to specify publicNetworkAccess. + */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: Enabled allows this resource to be accessed from both public * and private networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @param publicNetworkAccess Enabled allows this resource to be accessed from both public and private - * networks, Disabled allows this resource to only be accessed via private endpoints. + * networks, Disabled allows this resource to only be accessed via private endpoints. * @return the next definition stage. */ WithCreate withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess); } - /** The stage of the HostPool definition allowing to specify agentUpdate. */ + /** + * 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. + * component. * @return the next definition stage. */ WithCreate withAgentUpdate(AgentUpdateProperties agentUpdate); @@ -686,262 +737,291 @@ interface WithAgentUpdate { /** * Begins update for the HostPool resource. - * + * * @return the stage of resource update. */ HostPool.Update update(); - /** The template for HostPool update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithFriendlyName, - UpdateStages.WithDescription, - UpdateStages.WithCustomRdpProperty, - UpdateStages.WithMaxSessionLimit, - UpdateStages.WithPersonalDesktopAssignmentType, - UpdateStages.WithLoadBalancerType, - UpdateStages.WithRing, - UpdateStages.WithValidationEnvironment, - UpdateStages.WithRegistrationInfo, - UpdateStages.WithVmTemplate, - UpdateStages.WithSsoadfsAuthority, - UpdateStages.WithSsoClientId, - UpdateStages.WithSsoClientSecretKeyVaultPath, - UpdateStages.WithSsoSecretType, - UpdateStages.WithPreferredAppGroupType, - UpdateStages.WithStartVMOnConnect, - UpdateStages.WithPublicNetworkAccess, - UpdateStages.WithAgentUpdate { + /** + * The template for HostPool update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithFriendlyName, UpdateStages.WithDescription, + UpdateStages.WithCustomRdpProperty, UpdateStages.WithMaxSessionLimit, + UpdateStages.WithPersonalDesktopAssignmentType, UpdateStages.WithLoadBalancerType, UpdateStages.WithRing, + UpdateStages.WithValidationEnvironment, UpdateStages.WithRegistrationInfo, UpdateStages.WithVmTemplate, + UpdateStages.WithSsoadfsAuthority, UpdateStages.WithSsoClientId, UpdateStages.WithSsoClientSecretKeyVaultPath, + UpdateStages.WithSsoSecretType, UpdateStages.WithPreferredAppGroupType, UpdateStages.WithStartVMOnConnect, + UpdateStages.WithPublicNetworkAccess, UpdateStages.WithAgentUpdate { /** * Executes the update request. - * + * * @return the updated resource. */ HostPool apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ HostPool apply(Context context); } - /** The HostPool update stages. */ + /** + * The HostPool update stages. + */ interface UpdateStages { - /** The stage of the HostPool update allowing to specify tags. */ + /** + * The stage of the HostPool update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: tags to be updated. - * + * * @param tags tags to be updated. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the HostPool update allowing to specify friendlyName. */ + /** + * The stage of the HostPool update allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of HostPool.. - * + * * @param friendlyName Friendly name of HostPool. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); } - /** The stage of the HostPool update allowing to specify description. */ + /** + * The stage of the HostPool update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of HostPool.. - * + * * @param description Description of HostPool. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the HostPool update allowing to specify customRdpProperty. */ + /** + * The stage of the HostPool update allowing to specify customRdpProperty. + */ interface WithCustomRdpProperty { /** * Specifies the customRdpProperty property: Custom rdp property of HostPool.. - * + * * @param customRdpProperty Custom rdp property of HostPool. * @return the next definition stage. */ Update withCustomRdpProperty(String customRdpProperty); } - /** The stage of the HostPool update allowing to specify maxSessionLimit. */ + /** + * The stage of the HostPool update allowing to specify maxSessionLimit. + */ interface WithMaxSessionLimit { /** * Specifies the maxSessionLimit property: The max session limit of HostPool.. - * + * * @param maxSessionLimit The max session limit of HostPool. * @return the next definition stage. */ Update withMaxSessionLimit(Integer maxSessionLimit); } - /** The stage of the HostPool update allowing to specify personalDesktopAssignmentType. */ + /** + * The stage of the HostPool update allowing to specify personalDesktopAssignmentType. + */ interface WithPersonalDesktopAssignmentType { /** * Specifies the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool.. - * + * * @param personalDesktopAssignmentType PersonalDesktopAssignment type for HostPool. * @return the next definition stage. */ Update withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType); } - /** The stage of the HostPool update allowing to specify loadBalancerType. */ + /** + * The stage of the HostPool update allowing to specify loadBalancerType. + */ interface WithLoadBalancerType { /** * Specifies the loadBalancerType property: The type of the load balancer.. - * + * * @param loadBalancerType The type of the load balancer. * @return the next definition stage. */ Update withLoadBalancerType(LoadBalancerType loadBalancerType); } - /** The stage of the HostPool update allowing to specify ring. */ + /** + * The stage of the HostPool update allowing to specify ring. + */ interface WithRing { /** * Specifies the ring property: The ring number of HostPool.. - * + * * @param ring The ring number of HostPool. * @return the next definition stage. */ Update withRing(Integer ring); } - /** The stage of the HostPool update allowing to specify validationEnvironment. */ + /** + * The stage of the HostPool update allowing to specify validationEnvironment. + */ interface WithValidationEnvironment { /** * Specifies the validationEnvironment property: Is validation environment.. - * + * * @param validationEnvironment Is validation environment. * @return the next definition stage. */ Update withValidationEnvironment(Boolean validationEnvironment); } - /** The stage of the HostPool update allowing to specify registrationInfo. */ + /** + * The stage of the HostPool update allowing to specify registrationInfo. + */ interface WithRegistrationInfo { /** * Specifies the registrationInfo property: The registration info of HostPool.. - * + * * @param registrationInfo The registration info of HostPool. * @return the next definition stage. */ Update withRegistrationInfo(RegistrationInfoPatch registrationInfo); } - /** The stage of the HostPool update allowing to specify vmTemplate. */ + /** + * The stage of the HostPool update allowing to specify vmTemplate. + */ interface WithVmTemplate { /** * Specifies the vmTemplate property: VM template for sessionhosts configuration within hostpool.. - * + * * @param vmTemplate VM template for sessionhosts configuration within hostpool. * @return the next definition stage. */ Update withVmTemplate(String vmTemplate); } - /** The stage of the HostPool update allowing to specify ssoadfsAuthority. */ + /** + * The stage of the HostPool update allowing to specify ssoadfsAuthority. + */ interface WithSsoadfsAuthority { /** * Specifies the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates.. - * + * * @param ssoadfsAuthority URL to customer ADFS server for signing WVD SSO certificates. * @return the next definition stage. */ Update withSsoadfsAuthority(String ssoadfsAuthority); } - /** The stage of the HostPool update allowing to specify ssoClientId. */ + /** + * The stage of the HostPool update allowing to specify ssoClientId. + */ interface WithSsoClientId { /** * Specifies the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO * certificates.. - * + * * @param ssoClientId ClientId for the registered Relying Party used to issue WVD SSO certificates. * @return the next definition stage. */ Update withSsoClientId(String ssoClientId); } - /** The stage of the HostPool update allowing to specify ssoClientSecretKeyVaultPath. */ + /** + * The stage of the HostPool update allowing to specify ssoClientSecretKeyVaultPath. + */ interface WithSsoClientSecretKeyVaultPath { /** * Specifies the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for * communication to ADFS.. - * + * * @param ssoClientSecretKeyVaultPath Path to Azure KeyVault storing the secret used for communication to - * ADFS. + * ADFS. * @return the next definition stage. */ Update withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVaultPath); } - /** The stage of the HostPool update allowing to specify ssoSecretType. */ + /** + * The stage of the HostPool update allowing to specify ssoSecretType. + */ interface WithSsoSecretType { /** * Specifies the ssoSecretType property: The type of single sign on Secret Type.. - * + * * @param ssoSecretType The type of single sign on Secret Type. * @return the next definition stage. */ Update withSsoSecretType(SsoSecretType ssoSecretType); } - /** The stage of the HostPool update allowing to specify preferredAppGroupType. */ + /** + * The stage of the HostPool update allowing to specify preferredAppGroupType. + */ interface WithPreferredAppGroupType { /** * Specifies the preferredAppGroupType property: The type of preferred application group type, default to * Desktop Application Group. - * + * * @param preferredAppGroupType The type of preferred application group type, default to Desktop Application - * Group. + * Group. * @return the next definition stage. */ Update withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType); } - /** The stage of the HostPool update allowing to specify startVMOnConnect. */ + /** + * The stage of the HostPool update allowing to specify startVMOnConnect. + */ interface WithStartVMOnConnect { /** * Specifies the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature.. - * + * * @param startVMOnConnect The flag to turn on/off StartVMOnConnect feature. * @return the next definition stage. */ Update withStartVMOnConnect(Boolean startVMOnConnect); } - /** The stage of the HostPool update allowing to specify publicNetworkAccess. */ + /** + * The stage of the HostPool update allowing to specify publicNetworkAccess. + */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: Enabled to allow this resource to be access from the public * network. - * + * * @param publicNetworkAccess Enabled to allow this resource to be access from the public network. * @return the next definition stage. */ Update withPublicNetworkAccess(HostpoolPublicNetworkAccess publicNetworkAccess); } - /** The stage of the HostPool update allowing to specify agentUpdate. */ + /** + * 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. + * component. * @return the next definition stage. */ Update withAgentUpdate(AgentUpdatePatchProperties agentUpdate); @@ -950,14 +1030,14 @@ interface WithAgentUpdate { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ HostPool refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -965,7 +1045,7 @@ interface WithAgentUpdate { /** * 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. @@ -976,7 +1056,7 @@ interface WithAgentUpdate { /** * Registration token of the host pool. - * + * * @throws com.azure.core.management.exception.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. 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 bd83fe63e797..d10905a93c2d 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 @@ -11,8 +11,8 @@ /** * HostPoolList - * - *

List of HostPool definitions. + * + * List of HostPool definitions. */ @Fluent public final class HostPoolList { @@ -28,13 +28,15 @@ public final class HostPoolList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of HostPoolList class. */ + /** + * Creates an instance of HostPoolList class. + */ public HostPoolList() { } /** * Get the value property: List of HostPool definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of HostPool definitions. - * + * * @param value the value value to set. * @return the HostPoolList object itself. */ @@ -54,7 +56,7 @@ public HostPoolList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/HostPoolPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolPatch.java index 3732c02ff16f..21f54f965a0e 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 @@ -6,12 +6,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPatchProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** HostPool properties that can be patched. */ +/** + * HostPool properties that can be patched. + */ @Fluent public final class HostPoolPatch extends ProxyResource { /* @@ -27,13 +30,21 @@ public final class HostPoolPatch extends ProxyResource { @JsonProperty(value = "properties") private HostPoolPatchProperties innerProperties; - /** Creates an instance of HostPoolPatch class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of HostPoolPatch class. + */ public HostPoolPatch() { } /** * Get the tags property: tags to be updated. - * + * * @return the tags value. */ public Map tags() { @@ -42,7 +53,7 @@ public Map tags() { /** * Set the tags property: tags to be updated. - * + * * @param tags the tags value to set. * @return the HostPoolPatch object itself. */ @@ -53,16 +64,25 @@ public HostPoolPatch withTags(Map tags) { /** * Get the innerProperties property: HostPool properties that can be patched. - * + * * @return the innerProperties value. */ private HostPoolPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the friendlyName property: Friendly name of HostPool. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -71,7 +91,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of HostPool. - * + * * @param friendlyName the friendlyName value to set. * @return the HostPoolPatch object itself. */ @@ -85,7 +105,7 @@ public HostPoolPatch withFriendlyName(String friendlyName) { /** * Get the description property: Description of HostPool. - * + * * @return the description value. */ public String description() { @@ -94,7 +114,7 @@ public String description() { /** * Set the description property: Description of HostPool. - * + * * @param description the description value to set. * @return the HostPoolPatch object itself. */ @@ -108,7 +128,7 @@ public HostPoolPatch withDescription(String description) { /** * Get the customRdpProperty property: Custom rdp property of HostPool. - * + * * @return the customRdpProperty value. */ public String customRdpProperty() { @@ -117,7 +137,7 @@ public String customRdpProperty() { /** * Set the customRdpProperty property: Custom rdp property of HostPool. - * + * * @param customRdpProperty the customRdpProperty value to set. * @return the HostPoolPatch object itself. */ @@ -131,7 +151,7 @@ public HostPoolPatch withCustomRdpProperty(String customRdpProperty) { /** * Get the maxSessionLimit property: The max session limit of HostPool. - * + * * @return the maxSessionLimit value. */ public Integer maxSessionLimit() { @@ -140,7 +160,7 @@ public Integer maxSessionLimit() { /** * Set the maxSessionLimit property: The max session limit of HostPool. - * + * * @param maxSessionLimit the maxSessionLimit value to set. * @return the HostPoolPatch object itself. */ @@ -154,7 +174,7 @@ public HostPoolPatch withMaxSessionLimit(Integer maxSessionLimit) { /** * Get the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @return the personalDesktopAssignmentType value. */ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { @@ -163,12 +183,12 @@ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { /** * Set the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @param personalDesktopAssignmentType the personalDesktopAssignmentType value to set. * @return the HostPoolPatch object itself. */ - public HostPoolPatch withPersonalDesktopAssignmentType( - PersonalDesktopAssignmentType personalDesktopAssignmentType) { + public HostPoolPatch + withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType) { if (this.innerProperties() == null) { this.innerProperties = new HostPoolPatchProperties(); } @@ -178,7 +198,7 @@ public HostPoolPatch withPersonalDesktopAssignmentType( /** * Get the loadBalancerType property: The type of the load balancer. - * + * * @return the loadBalancerType value. */ public LoadBalancerType loadBalancerType() { @@ -187,7 +207,7 @@ public LoadBalancerType loadBalancerType() { /** * Set the loadBalancerType property: The type of the load balancer. - * + * * @param loadBalancerType the loadBalancerType value to set. * @return the HostPoolPatch object itself. */ @@ -201,7 +221,7 @@ public HostPoolPatch withLoadBalancerType(LoadBalancerType loadBalancerType) { /** * Get the ring property: The ring number of HostPool. - * + * * @return the ring value. */ public Integer ring() { @@ -210,7 +230,7 @@ public Integer ring() { /** * Set the ring property: The ring number of HostPool. - * + * * @param ring the ring value to set. * @return the HostPoolPatch object itself. */ @@ -224,7 +244,7 @@ public HostPoolPatch withRing(Integer ring) { /** * Get the validationEnvironment property: Is validation environment. - * + * * @return the validationEnvironment value. */ public Boolean validationEnvironment() { @@ -233,7 +253,7 @@ public Boolean validationEnvironment() { /** * Set the validationEnvironment property: Is validation environment. - * + * * @param validationEnvironment the validationEnvironment value to set. * @return the HostPoolPatch object itself. */ @@ -247,7 +267,7 @@ public HostPoolPatch withValidationEnvironment(Boolean validationEnvironment) { /** * Get the registrationInfo property: The registration info of HostPool. - * + * * @return the registrationInfo value. */ public RegistrationInfoPatch registrationInfo() { @@ -256,7 +276,7 @@ public RegistrationInfoPatch registrationInfo() { /** * Set the registrationInfo property: The registration info of HostPool. - * + * * @param registrationInfo the registrationInfo value to set. * @return the HostPoolPatch object itself. */ @@ -270,7 +290,7 @@ public HostPoolPatch withRegistrationInfo(RegistrationInfoPatch registrationInfo /** * Get the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @return the vmTemplate value. */ public String vmTemplate() { @@ -279,7 +299,7 @@ public String vmTemplate() { /** * Set the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @param vmTemplate the vmTemplate value to set. * @return the HostPoolPatch object itself. */ @@ -293,7 +313,7 @@ public HostPoolPatch withVmTemplate(String vmTemplate) { /** * Get the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @return the ssoadfsAuthority value. */ public String ssoadfsAuthority() { @@ -302,7 +322,7 @@ public String ssoadfsAuthority() { /** * Set the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @param ssoadfsAuthority the ssoadfsAuthority value to set. * @return the HostPoolPatch object itself. */ @@ -316,7 +336,7 @@ public HostPoolPatch withSsoadfsAuthority(String ssoadfsAuthority) { /** * Get the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @return the ssoClientId value. */ public String ssoClientId() { @@ -325,7 +345,7 @@ public String ssoClientId() { /** * Set the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @param ssoClientId the ssoClientId value to set. * @return the HostPoolPatch object itself. */ @@ -340,7 +360,7 @@ public HostPoolPatch withSsoClientId(String ssoClientId) { /** * Get the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @return the ssoClientSecretKeyVaultPath value. */ public String ssoClientSecretKeyVaultPath() { @@ -350,7 +370,7 @@ public String ssoClientSecretKeyVaultPath() { /** * Set the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication to * ADFS. - * + * * @param ssoClientSecretKeyVaultPath the ssoClientSecretKeyVaultPath value to set. * @return the HostPoolPatch object itself. */ @@ -364,7 +384,7 @@ public HostPoolPatch withSsoClientSecretKeyVaultPath(String ssoClientSecretKeyVa /** * Get the ssoSecretType property: The type of single sign on Secret Type. - * + * * @return the ssoSecretType value. */ public SsoSecretType ssoSecretType() { @@ -373,7 +393,7 @@ public SsoSecretType ssoSecretType() { /** * Set the ssoSecretType property: The type of single sign on Secret Type. - * + * * @param ssoSecretType the ssoSecretType value to set. * @return the HostPoolPatch object itself. */ @@ -388,7 +408,7 @@ public HostPoolPatch withSsoSecretType(SsoSecretType ssoSecretType) { /** * Get the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @return the preferredAppGroupType value. */ public PreferredAppGroupType preferredAppGroupType() { @@ -398,7 +418,7 @@ public PreferredAppGroupType preferredAppGroupType() { /** * Set the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @param preferredAppGroupType the preferredAppGroupType value to set. * @return the HostPoolPatch object itself. */ @@ -412,7 +432,7 @@ public HostPoolPatch withPreferredAppGroupType(PreferredAppGroupType preferredAp /** * Get the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @return the startVMOnConnect value. */ public Boolean startVMOnConnect() { @@ -421,7 +441,7 @@ public Boolean startVMOnConnect() { /** * Set the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @param startVMOnConnect the startVMOnConnect value to set. * @return the HostPoolPatch object itself. */ @@ -435,7 +455,7 @@ public HostPoolPatch withStartVMOnConnect(Boolean startVMOnConnect) { /** * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @return the publicNetworkAccess value. */ public HostpoolPublicNetworkAccess publicNetworkAccess() { @@ -444,7 +464,7 @@ public HostpoolPublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the HostPoolPatch object itself. */ @@ -459,7 +479,7 @@ public HostPoolPatch withPublicNetworkAccess(HostpoolPublicNetworkAccess publicN /** * Get the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. - * + * * @return the agentUpdate value. */ public AgentUpdatePatchProperties agentUpdate() { @@ -469,7 +489,7 @@ public AgentUpdatePatchProperties 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. */ @@ -483,7 +503,7 @@ public HostPoolPatch withAgentUpdate(AgentUpdatePatchProperties agentUpdate) { /** * 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/HostPoolProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPoolProperties.java index e93b31ff7770..52393af79cba 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 @@ -7,109 +7,118 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPropertiesInner; import java.util.List; -/** An immutable client-side representation of HostPoolProperties. */ +/** + * An immutable client-side representation of HostPoolProperties. + */ public interface HostPoolProperties { /** * Gets the objectId property: ObjectId of HostPool. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the friendlyName property: Friendly name of HostPool. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the description property: Description of HostPool. - * + * * @return the description value. */ String description(); /** * Gets the hostPoolType property: HostPool type for desktop. - * + * * @return the hostPoolType value. */ HostPoolType hostPoolType(); /** * Gets the personalDesktopAssignmentType property: PersonalDesktopAssignment type for HostPool. - * + * * @return the personalDesktopAssignmentType value. */ PersonalDesktopAssignmentType personalDesktopAssignmentType(); /** * Gets the customRdpProperty property: Custom rdp property of HostPool. - * + * * @return the customRdpProperty value. */ String customRdpProperty(); /** * Gets the maxSessionLimit property: The max session limit of HostPool. - * + * * @return the maxSessionLimit value. */ Integer maxSessionLimit(); /** * Gets the loadBalancerType property: The type of the load balancer. - * + * * @return the loadBalancerType value. */ LoadBalancerType loadBalancerType(); /** * Gets the ring property: The ring number of HostPool. - * + * * @return the ring value. */ Integer ring(); /** * Gets the validationEnvironment property: Is validation environment. - * + * * @return the validationEnvironment value. */ Boolean validationEnvironment(); /** * Gets the registrationInfo property: The registration info of HostPool. - * + * * @return the registrationInfo value. */ RegistrationInfo registrationInfo(); /** * Gets the vmTemplate property: VM template for sessionhosts configuration within hostpool. - * + * * @return the vmTemplate value. */ String vmTemplate(); /** * Gets the applicationGroupReferences property: List of applicationGroup links. - * + * * @return the applicationGroupReferences value. */ List applicationGroupReferences(); + /** + * Gets the appAttachPackageReferences property: List of App Attach Package links. + * + * @return the appAttachPackageReferences value. + */ + List appAttachPackageReferences(); + /** * Gets the ssoadfsAuthority property: URL to customer ADFS server for signing WVD SSO certificates. - * + * * @return the ssoadfsAuthority value. */ String ssoadfsAuthority(); /** * Gets the ssoClientId property: ClientId for the registered Relying Party used to issue WVD SSO certificates. - * + * * @return the ssoClientId value. */ String ssoClientId(); @@ -117,14 +126,14 @@ public interface HostPoolProperties { /** * Gets the ssoClientSecretKeyVaultPath property: Path to Azure KeyVault storing the secret used for communication * to ADFS. - * + * * @return the ssoClientSecretKeyVaultPath value. */ String ssoClientSecretKeyVaultPath(); /** * Gets the ssoSecretType property: The type of single sign on Secret Type. - * + * * @return the ssoSecretType value. */ SsoSecretType ssoSecretType(); @@ -132,21 +141,21 @@ public interface HostPoolProperties { /** * Gets the preferredAppGroupType property: The type of preferred application group type, default to Desktop * Application Group. - * + * * @return the preferredAppGroupType value. */ PreferredAppGroupType preferredAppGroupType(); /** * Gets the startVMOnConnect property: The flag to turn on/off StartVMOnConnect feature. - * + * * @return the startVMOnConnect value. */ Boolean startVMOnConnect(); /** * Gets the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ Boolean cloudPcResource(); @@ -154,7 +163,7 @@ public interface HostPoolProperties { /** * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @return the publicNetworkAccess value. */ HostpoolPublicNetworkAccess publicNetworkAccess(); @@ -162,7 +171,7 @@ public interface HostPoolProperties { /** * Gets the agentUpdate property: The session host configuration for updating agent, monitoring agent, and stack * component. - * + * * @return the agentUpdate value. */ AgentUpdateProperties agentUpdate(); @@ -170,14 +179,14 @@ public interface HostPoolProperties { /** * 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. - * + * * @return the inner object. */ HostPoolPropertiesInner innerModel(); 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 ae2946370f8f..9c5d45966ad3 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,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** HostPool type for desktop. */ +/** + * HostPool type for desktop. + */ public final class HostPoolType extends ExpandableStringEnum { - /** Static value Personal for HostPoolType. */ + /** + * Static value Personal for HostPoolType. + */ public static final HostPoolType PERSONAL = fromString("Personal"); - /** Static value Pooled for HostPoolType. */ + /** + * Static value Pooled for HostPoolType. + */ public static final HostPoolType POOLED = fromString("Pooled"); - /** Static value BYODesktop for HostPoolType. */ + /** + * Static value BYODesktop for HostPoolType. + */ public static final HostPoolType BYODESKTOP = fromString("BYODesktop"); /** * Creates a new instance of HostPoolType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public HostPoolType() { /** * Creates or finds a HostPoolType from its string representation. - * + * * @param name a name to look for. * @return the corresponding HostPoolType. */ @@ -41,7 +49,7 @@ public static HostPoolType fromString(String name) { /** * Gets known HostPoolType values. - * + * * @return known HostPoolType values. */ public static Collection values() { 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 71be49d892fa..de333697d93d 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of HostPools. */ +/** + * Resource collection API of HostPools. + */ public interface HostPools { /** * 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. @@ -25,7 +27,7 @@ public interface HostPools { /** * 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. @@ -37,7 +39,7 @@ public interface HostPools { /** * 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. @@ -51,7 +53,7 @@ public interface HostPools { /** * 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. @@ -62,7 +64,7 @@ public interface HostPools { /** * 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. @@ -73,7 +75,7 @@ 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. @@ -84,12 +86,12 @@ public interface HostPools { * @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, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip, 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 PagedIterable}. @@ -98,7 +100,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -112,7 +114,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -121,12 +123,12 @@ PagedIterable listByResourceGroup( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a RegistrationInfo definition along with {@link Response}. */ - Response retrieveRegistrationTokenWithResponse( - String resourceGroupName, String hostPoolName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,7 +140,7 @@ Response retrieveRegistrationTokenWithResponse( /** * Get a host pool. - * + * * @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. @@ -149,7 +151,7 @@ Response retrieveRegistrationTokenWithResponse( /** * Get a host pool. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -161,7 +163,7 @@ Response retrieveRegistrationTokenWithResponse( /** * Remove a host pool. - * + * * @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. @@ -171,7 +173,7 @@ Response retrieveRegistrationTokenWithResponse( /** * Remove a host pool. - * + * * @param id the resource ID. * @param force Force flag to delete sessionHost. * @param context The context to associate with this operation. @@ -184,7 +186,7 @@ Response retrieveRegistrationTokenWithResponse( /** * Begins definition for a new HostPool resource. - * + * * @param name resource name. * @return the first stage of the new HostPool definition. */ 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 index 57801eb24489..8d7e0e010e82 100644 --- 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 @@ -13,22 +13,30 @@ * only be accessed via private endpoints. */ public final class HostpoolPublicNetworkAccess extends ExpandableStringEnum { - /** Static value Enabled for HostpoolPublicNetworkAccess. */ + /** + * Static value Enabled for HostpoolPublicNetworkAccess. + */ public static final HostpoolPublicNetworkAccess ENABLED = fromString("Enabled"); - /** Static value Disabled for HostpoolPublicNetworkAccess. */ + /** + * 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 EnabledForSessionHostsOnly for HostpoolPublicNetworkAccess. + */ + public static final HostpoolPublicNetworkAccess ENABLED_FOR_SESSION_HOSTS_ONLY + = fromString("EnabledForSessionHostsOnly"); - /** Static value EnabledForClientsOnly for HostpoolPublicNetworkAccess. */ + /** + * Static value EnabledForClientsOnly for HostpoolPublicNetworkAccess. + */ public static final HostpoolPublicNetworkAccess ENABLED_FOR_CLIENTS_ONLY = fromString("EnabledForClientsOnly"); /** * Creates a new instance of HostpoolPublicNetworkAccess value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -37,7 +45,7 @@ public HostpoolPublicNetworkAccess() { /** * Creates or finds a HostpoolPublicNetworkAccess from its string representation. - * + * * @param name a name to look for. * @return the corresponding HostpoolPublicNetworkAccess. */ @@ -48,7 +56,7 @@ public static HostpoolPublicNetworkAccess fromString(String name) { /** * Gets known HostpoolPublicNetworkAccess values. - * + * * @return known HostpoolPublicNetworkAccess values. */ public static Collection values() { 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 d78b5907e0d8..38b2a41c7fe7 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 @@ -6,21 +6,24 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.UUID; -/** Identity for the resource. */ +/** + * Identity for the resource. + */ @Fluent public class Identity { /* - * The principal ID of resource identity. + * The principal ID of resource identity. The value must be an UUID. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; + private UUID principalId; /* - * The tenant ID of resource. + * The tenant ID of resource. The value must be an UUID. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; + private UUID tenantId; /* * The identity type. @@ -28,31 +31,33 @@ public class Identity { @JsonProperty(value = "type") private ResourceIdentityType type; - /** Creates an instance of Identity class. */ + /** + * Creates an instance of Identity class. + */ public Identity() { } /** - * Get the principalId property: The principal ID of resource identity. - * + * Get the principalId property: The principal ID of resource identity. The value must be an UUID. + * * @return the principalId value. */ - public String principalId() { + public UUID principalId() { return this.principalId; } /** - * Get the tenantId property: The tenant ID of resource. - * + * Get the tenantId property: The tenant ID of resource. The value must be an UUID. + * * @return the tenantId value. */ - public String tenantId() { + public UUID tenantId() { return this.tenantId; } /** * Get the type property: The identity type. - * + * * @return the type value. */ public ResourceIdentityType type() { @@ -61,7 +66,7 @@ public ResourceIdentityType type() { /** * Set the type property: The identity type. - * + * * @param type the type value to set. * @return the Identity object itself. */ @@ -72,7 +77,7 @@ public Identity withType(ResourceIdentityType type) { /** * 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/ImportPackageInfoRequest.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ImportPackageInfoRequest.java new file mode 100644 index 000000000000..25caffca7e2a --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ImportPackageInfoRequest.java @@ -0,0 +1,82 @@ +// Copyright (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; + +/** + * Information to import app attach package. + */ +@Fluent +public final class ImportPackageInfoRequest { + /* + * URI to Image + */ + @JsonProperty(value = "path") + private String path; + + /* + * Possible device architectures that an app attach package can be configured for + */ + @JsonProperty(value = "packageArchitecture") + private AppAttachPackageArchitectures packageArchitecture; + + /** + * Creates an instance of ImportPackageInfoRequest class. + */ + public ImportPackageInfoRequest() { + } + + /** + * Get the path property: URI to Image. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: URI to Image. + * + * @param path the path value to set. + * @return the ImportPackageInfoRequest object itself. + */ + public ImportPackageInfoRequest withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the packageArchitecture property: Possible device architectures that an app attach package can be configured + * for. + * + * @return the packageArchitecture value. + */ + public AppAttachPackageArchitectures packageArchitecture() { + return this.packageArchitecture; + } + + /** + * Set the packageArchitecture property: Possible device architectures that an app attach package can be configured + * for. + * + * @param packageArchitecture the packageArchitecture value to set. + * @return the ImportPackageInfoRequest object itself. + */ + public ImportPackageInfoRequest withPackageArchitecture(AppAttachPackageArchitectures packageArchitecture) { + this.packageArchitecture = packageArchitecture; + 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/LoadBalancerType.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/LoadBalancerType.java index 56c996f1f731..79b94004c58c 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,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of the load balancer. */ +/** + * The type of the load balancer. + */ public final class LoadBalancerType extends ExpandableStringEnum { - /** Static value BreadthFirst for LoadBalancerType. */ + /** + * Static value BreadthFirst for LoadBalancerType. + */ public static final LoadBalancerType BREADTH_FIRST = fromString("BreadthFirst"); - /** Static value DepthFirst for LoadBalancerType. */ + /** + * Static value DepthFirst for LoadBalancerType. + */ public static final LoadBalancerType DEPTH_FIRST = fromString("DepthFirst"); - /** Static value Persistent for LoadBalancerType. */ + /** + * Static value Persistent for LoadBalancerType. + */ public static final LoadBalancerType PERSISTENT = fromString("Persistent"); /** * Creates a new instance of LoadBalancerType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public LoadBalancerType() { /** * Creates or finds a LoadBalancerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding LoadBalancerType. */ @@ -41,7 +49,7 @@ public static LoadBalancerType fromString(String name) { /** * Gets known LoadBalancerType values. - * + * * @return known LoadBalancerType values. */ public static Collection values() { 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 f431828f285d..dff035309010 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specifications of the Log for Azure Monitoring. */ +/** + * Specifications of the Log for Azure Monitoring. + */ @Fluent public final class LogSpecification { /* @@ -28,13 +30,15 @@ public final class LogSpecification { @JsonProperty(value = "blobDuration") private String blobDuration; - /** Creates an instance of LogSpecification class. */ + /** + * Creates an instance of LogSpecification class. + */ public LogSpecification() { } /** * Get the name property: Name of the log. - * + * * @return the name value. */ public String name() { @@ -43,7 +47,7 @@ public String name() { /** * Set the name property: Name of the log. - * + * * @param name the name value to set. * @return the LogSpecification object itself. */ @@ -54,7 +58,7 @@ public LogSpecification withName(String name) { /** * Get the displayName property: Localized friendly display name of the log. - * + * * @return the displayName value. */ public String displayName() { @@ -63,7 +67,7 @@ public String displayName() { /** * Set the displayName property: Localized friendly display name of the log. - * + * * @param displayName the displayName value to set. * @return the LogSpecification object itself. */ @@ -74,7 +78,7 @@ public LogSpecification withDisplayName(String displayName) { /** * Get the blobDuration property: Blob duration of the log. - * + * * @return the blobDuration value. */ public String blobDuration() { @@ -83,7 +87,7 @@ public String blobDuration() { /** * Set the blobDuration property: Blob duration of the log. - * + * * @param blobDuration the blobDuration value to set. * @return the LogSpecification object itself. */ @@ -94,7 +98,7 @@ public LogSpecification withBlobDuration(String blobDuration) { /** * 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/MaintenanceWindowPatchProperties.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MaintenanceWindowPatchProperties.java index b2fe15817df3..939f0b166b3c 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Maintenance window starting hour and day of week. */ +/** + * Maintenance window starting hour and day of week. + */ @Fluent public final class MaintenanceWindowPatchProperties { /* @@ -22,13 +24,15 @@ public final class MaintenanceWindowPatchProperties { @JsonProperty(value = "dayOfWeek") private DayOfWeek dayOfWeek; - /** Creates an instance of MaintenanceWindowPatchProperties class. */ + /** + * 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() { @@ -37,7 +41,7 @@ public Integer 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. */ @@ -48,7 +52,7 @@ public MaintenanceWindowPatchProperties withHour(Integer hour) { /** * Get the dayOfWeek property: Day of the week. - * + * * @return the dayOfWeek value. */ public DayOfWeek dayOfWeek() { @@ -57,7 +61,7 @@ public DayOfWeek dayOfWeek() { /** * Set the dayOfWeek property: Day of the week. - * + * * @param dayOfWeek the dayOfWeek value to set. * @return the MaintenanceWindowPatchProperties object itself. */ @@ -68,7 +72,7 @@ public MaintenanceWindowPatchProperties withDayOfWeek(DayOfWeek dayOfWeek) { /** * 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 index 6b9223fe4dab..5d7005caf88e 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Maintenance window starting hour and day of week. */ +/** + * Maintenance window starting hour and day of week. + */ @Fluent public final class MaintenanceWindowProperties { /* @@ -22,13 +24,15 @@ public final class MaintenanceWindowProperties { @JsonProperty(value = "dayOfWeek") private DayOfWeek dayOfWeek; - /** Creates an instance of MaintenanceWindowProperties class. */ + /** + * 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() { @@ -37,7 +41,7 @@ public Integer 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. */ @@ -48,7 +52,7 @@ public MaintenanceWindowProperties withHour(Integer hour) { /** * Get the dayOfWeek property: Day of the week. - * + * * @return the dayOfWeek value. */ public DayOfWeek dayOfWeek() { @@ -57,7 +61,7 @@ public DayOfWeek dayOfWeek() { /** * Set the dayOfWeek property: Day of the week. - * + * * @param dayOfWeek the dayOfWeek value to set. * @return the MaintenanceWindowProperties object itself. */ @@ -68,7 +72,7 @@ public MaintenanceWindowProperties withDayOfWeek(DayOfWeek dayOfWeek) { /** * 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 bc38ad3b1f9c..2a5a72e5462a 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents URI referring to MSIX Image. */ +/** + * Represents URI referring to MSIX Image. + */ @Fluent public final class MsixImageUri { /* @@ -16,13 +18,15 @@ public final class MsixImageUri { @JsonProperty(value = "uri") private String uri; - /** Creates an instance of MsixImageUri class. */ + /** + * Creates an instance of MsixImageUri class. + */ public MsixImageUri() { } /** * Get the uri property: URI to Image. - * + * * @return the uri value. */ public String uri() { @@ -31,7 +35,7 @@ public String uri() { /** * Set the uri property: URI to Image. - * + * * @param uri the uri value to set. * @return the MsixImageUri object itself. */ @@ -42,7 +46,7 @@ public MsixImageUri withUri(String uri) { /** * 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/MsixImages.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImages.java index 88b7bbafedb5..1ebc9780d610 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImages.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixImages.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of MsixImages. */ +/** + * Resource collection API of MsixImages. + */ public interface MsixImages { /** * 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. @@ -24,7 +26,7 @@ public interface MsixImages { /** * 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. @@ -34,6 +36,6 @@ public interface MsixImages { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return expandMsixImageList as paginated response with {@link PagedIterable}. */ - PagedIterable expand( - String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, Context context); + PagedIterable expand(String resourceGroupName, String hostPoolName, MsixImageUri msixImageUri, + Context context); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java index e86c10a6d0e5..b8747028e4ef 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackage.java @@ -10,46 +10,48 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of MsixPackage. */ +/** + * An immutable client-side representation of MsixPackage. + */ public interface MsixPackage { /** * 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. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the imagePath property: VHD/CIM image path on Network Share. - * + * * @return the imagePath value. */ String imagePath(); /** * Gets the packageName property: Package Name from appxmanifest.xml. - * + * * @return the packageName value. */ String packageName(); @@ -57,97 +59,105 @@ public interface MsixPackage { /** * Gets the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package Name and * Publisher name. - * + * * @return the packageFamilyName value. */ String packageFamilyName(); /** * Gets the displayName property: User friendly Name to be displayed in the portal. - * + * * @return the displayName value. */ String displayName(); /** * Gets the packageRelativePath property: Relative Path to the package inside the image. - * + * * @return the packageRelativePath value. */ String packageRelativePath(); /** * Gets the isRegularRegistration property: Specifies how to register Package in feed. - * + * * @return the isRegularRegistration value. */ Boolean isRegularRegistration(); /** * Gets the isActive property: Make this version of the package the active one across the hostpool. - * + * * @return the isActive value. */ Boolean isActive(); /** * Gets the packageDependencies property: List of package dependencies. - * + * * @return the packageDependencies value. */ List packageDependencies(); /** - * Gets the version property: Package Version found in the appxmanifest.xml. - * + * Gets the version property: Package version found in the appxmanifest.xml. + * * @return the version value. */ String version(); /** * Gets the lastUpdated property: Date Package was last updated, found in the appxmanifest.xml. - * + * * @return the lastUpdated value. */ OffsetDateTime lastUpdated(); /** * Gets the packageApplications property: List of package applications. - * + * * @return the packageApplications value. */ List packageApplications(); /** * 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.MsixPackageInner object. - * + * * @return the inner object. */ MsixPackageInner innerModel(); - /** The entirety of the MsixPackage definition. */ + /** + * The entirety of the MsixPackage definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The MsixPackage definition stages. */ + /** + * The MsixPackage definition stages. + */ interface DefinitionStages { - /** The first stage of the MsixPackage definition. */ + /** + * The first stage of the MsixPackage definition. + */ interface Blank extends WithParentResource { } - /** The stage of the MsixPackage definition allowing to specify parent resource. */ + /** + * The stage of the MsixPackage definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, hostPoolName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @return the next definition stage. @@ -159,151 +169,166 @@ interface WithParentResource { * The stage of the MsixPackage definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithImagePath, - DefinitionStages.WithPackageName, - DefinitionStages.WithPackageFamilyName, - DefinitionStages.WithDisplayName, - DefinitionStages.WithPackageRelativePath, - DefinitionStages.WithIsRegularRegistration, - DefinitionStages.WithIsActive, - DefinitionStages.WithPackageDependencies, - DefinitionStages.WithVersion, - DefinitionStages.WithLastUpdated, - DefinitionStages.WithPackageApplications { + interface WithCreate extends DefinitionStages.WithImagePath, DefinitionStages.WithPackageName, + DefinitionStages.WithPackageFamilyName, DefinitionStages.WithDisplayName, + DefinitionStages.WithPackageRelativePath, DefinitionStages.WithIsRegularRegistration, + DefinitionStages.WithIsActive, DefinitionStages.WithPackageDependencies, DefinitionStages.WithVersion, + DefinitionStages.WithLastUpdated, DefinitionStages.WithPackageApplications { /** * Executes the create request. - * + * * @return the created resource. */ MsixPackage create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ MsixPackage create(Context context); } - /** The stage of the MsixPackage definition allowing to specify imagePath. */ + /** + * The stage of the MsixPackage definition allowing to specify imagePath. + */ interface WithImagePath { /** * Specifies the imagePath property: VHD/CIM image path on Network Share.. - * + * * @param imagePath VHD/CIM image path on Network Share. * @return the next definition stage. */ WithCreate withImagePath(String imagePath); } - /** The stage of the MsixPackage definition allowing to specify packageName. */ + /** + * The stage of the MsixPackage definition allowing to specify packageName. + */ interface WithPackageName { /** * Specifies the packageName property: Package Name from appxmanifest.xml. . - * + * * @param packageName Package Name from appxmanifest.xml. * @return the next definition stage. */ WithCreate withPackageName(String packageName); } - /** The stage of the MsixPackage definition allowing to specify packageFamilyName. */ + /** + * The stage of the MsixPackage definition allowing to specify packageFamilyName. + */ interface WithPackageFamilyName { /** * Specifies the packageFamilyName property: Package Family Name from appxmanifest.xml. Contains Package * Name and Publisher name. . - * + * * @param packageFamilyName Package Family Name from appxmanifest.xml. Contains Package Name and Publisher - * name. + * name. * @return the next definition stage. */ WithCreate withPackageFamilyName(String packageFamilyName); } - /** The stage of the MsixPackage definition allowing to specify displayName. */ + /** + * The stage of the MsixPackage definition allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: User friendly Name to be displayed in the portal. . - * + * * @param displayName User friendly Name to be displayed in the portal. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); } - /** The stage of the MsixPackage definition allowing to specify packageRelativePath. */ + /** + * The stage of the MsixPackage definition allowing to specify packageRelativePath. + */ interface WithPackageRelativePath { /** * Specifies the packageRelativePath property: Relative Path to the package inside the image. . - * + * * @param packageRelativePath Relative Path to the package inside the image. * @return the next definition stage. */ WithCreate withPackageRelativePath(String packageRelativePath); } - /** The stage of the MsixPackage definition allowing to specify isRegularRegistration. */ + /** + * The stage of the MsixPackage definition allowing to specify isRegularRegistration. + */ interface WithIsRegularRegistration { /** * Specifies the isRegularRegistration property: Specifies how to register Package in feed.. - * + * * @param isRegularRegistration Specifies how to register Package in feed. * @return the next definition stage. */ WithCreate withIsRegularRegistration(Boolean isRegularRegistration); } - /** The stage of the MsixPackage definition allowing to specify isActive. */ + /** + * The stage of the MsixPackage definition allowing to specify isActive. + */ interface WithIsActive { /** * Specifies the isActive property: Make this version of the package the active one across the hostpool. . - * + * * @param isActive Make this version of the package the active one across the hostpool. * @return the next definition stage. */ WithCreate withIsActive(Boolean isActive); } - /** The stage of the MsixPackage definition allowing to specify packageDependencies. */ + /** + * The stage of the MsixPackage definition allowing to specify packageDependencies. + */ interface WithPackageDependencies { /** * Specifies the packageDependencies property: List of package dependencies. . - * + * * @param packageDependencies List of package dependencies. * @return the next definition stage. */ WithCreate withPackageDependencies(List packageDependencies); } - /** The stage of the MsixPackage definition allowing to specify version. */ + /** + * The stage of the MsixPackage definition allowing to specify version. + */ interface WithVersion { /** - * Specifies the version property: Package Version found in the appxmanifest.xml. . - * - * @param version Package Version found in the appxmanifest.xml. + * Specifies the version property: Package version found in the appxmanifest.xml. . + * + * @param version Package version found in the appxmanifest.xml. * @return the next definition stage. */ WithCreate withVersion(String version); } - /** The stage of the MsixPackage definition allowing to specify lastUpdated. */ + /** + * The stage of the MsixPackage definition allowing to specify lastUpdated. + */ interface WithLastUpdated { /** * Specifies the lastUpdated property: Date Package was last updated, found in the appxmanifest.xml. . - * + * * @param lastUpdated Date Package was last updated, found in the appxmanifest.xml. * @return the next definition stage. */ WithCreate withLastUpdated(OffsetDateTime lastUpdated); } - /** The stage of the MsixPackage definition allowing to specify packageApplications. */ + /** + * The stage of the MsixPackage definition allowing to specify packageApplications. + */ interface WithPackageApplications { /** * Specifies the packageApplications property: List of package applications. . - * + * * @param packageApplications List of package applications. * @return the next definition stage. */ @@ -313,59 +338,69 @@ interface WithPackageApplications { /** * Begins update for the MsixPackage resource. - * + * * @return the stage of resource update. */ MsixPackage.Update update(); - /** The template for MsixPackage update. */ + /** + * The template for MsixPackage update. + */ interface Update extends UpdateStages.WithIsActive, UpdateStages.WithIsRegularRegistration, UpdateStages.WithDisplayName { /** * Executes the update request. - * + * * @return the updated resource. */ MsixPackage apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ MsixPackage apply(Context context); } - /** The MsixPackage update stages. */ + /** + * The MsixPackage update stages. + */ interface UpdateStages { - /** The stage of the MsixPackage update allowing to specify isActive. */ + /** + * The stage of the MsixPackage update allowing to specify isActive. + */ interface WithIsActive { /** * Specifies the isActive property: Set a version of the package to be active across hostpool. . - * + * * @param isActive Set a version of the package to be active across hostpool. * @return the next definition stage. */ Update withIsActive(Boolean isActive); } - /** The stage of the MsixPackage update allowing to specify isRegularRegistration. */ + /** + * The stage of the MsixPackage update allowing to specify isRegularRegistration. + */ interface WithIsRegularRegistration { /** * Specifies the isRegularRegistration property: Set Registration mode. Regular or Delayed.. - * + * * @param isRegularRegistration Set Registration mode. Regular or Delayed. * @return the next definition stage. */ Update withIsRegularRegistration(Boolean isRegularRegistration); } - /** The stage of the MsixPackage update allowing to specify displayName. */ + /** + * The stage of the MsixPackage update allowing to specify displayName. + */ interface WithDisplayName { /** * Specifies the displayName property: Display name for MSIX Package.. - * + * * @param displayName Display name for MSIX Package. * @return the next definition stage. */ @@ -375,14 +410,14 @@ interface WithDisplayName { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ MsixPackage refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ 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 fd29936acefe..13f4183e2237 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 @@ -8,7 +8,9 @@ import com.azure.core.util.CoreUtils; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for MSIX Package Application properties. */ +/** + * Schema for MSIX Package Application properties. + */ @Fluent public final class MsixPackageApplications { /* @@ -53,13 +55,15 @@ public final class MsixPackageApplications { @JsonProperty(value = "rawPng") private byte[] rawPng; - /** Creates an instance of MsixPackageApplications class. */ + /** + * Creates an instance of MsixPackageApplications class. + */ public MsixPackageApplications() { } /** * Get the appId property: Package Application Id, found in appxmanifest.xml. - * + * * @return the appId value. */ public String appId() { @@ -68,7 +72,7 @@ public String appId() { /** * Set the appId property: Package Application Id, found in appxmanifest.xml. - * + * * @param appId the appId value to set. * @return the MsixPackageApplications object itself. */ @@ -79,7 +83,7 @@ public MsixPackageApplications withAppId(String appId) { /** * Get the description property: Description of Package Application. - * + * * @return the description value. */ public String description() { @@ -88,7 +92,7 @@ public String description() { /** * Set the description property: Description of Package Application. - * + * * @param description the description value to set. * @return the MsixPackageApplications object itself. */ @@ -100,7 +104,7 @@ public MsixPackageApplications withDescription(String description) { /** * Get the appUserModelId property: Used to activate Package Application. Consists of Package Name and * ApplicationID. Found in appxmanifest.xml. - * + * * @return the appUserModelId value. */ public String appUserModelId() { @@ -110,7 +114,7 @@ public String appUserModelId() { /** * Set the appUserModelId property: Used to activate Package Application. Consists of Package Name and * ApplicationID. Found in appxmanifest.xml. - * + * * @param appUserModelId the appUserModelId value to set. * @return the MsixPackageApplications object itself. */ @@ -121,7 +125,7 @@ public MsixPackageApplications withAppUserModelId(String appUserModelId) { /** * Get the friendlyName property: User friendly name. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -130,7 +134,7 @@ public String friendlyName() { /** * Set the friendlyName property: User friendly name. - * + * * @param friendlyName the friendlyName value to set. * @return the MsixPackageApplications object itself. */ @@ -141,7 +145,7 @@ public MsixPackageApplications withFriendlyName(String friendlyName) { /** * Get the iconImageName property: User friendly name. - * + * * @return the iconImageName value. */ public String iconImageName() { @@ -150,7 +154,7 @@ public String iconImageName() { /** * Set the iconImageName property: User friendly name. - * + * * @param iconImageName the iconImageName value to set. * @return the MsixPackageApplications object itself. */ @@ -161,7 +165,7 @@ public MsixPackageApplications withIconImageName(String iconImageName) { /** * Get the rawIcon property: the icon a 64 bit string as a byte array. - * + * * @return the rawIcon value. */ public byte[] rawIcon() { @@ -170,7 +174,7 @@ public byte[] rawIcon() { /** * Set the rawIcon property: the icon a 64 bit string as a byte array. - * + * * @param rawIcon the rawIcon value to set. * @return the MsixPackageApplications object itself. */ @@ -181,7 +185,7 @@ public MsixPackageApplications withRawIcon(byte[] rawIcon) { /** * Get the rawPng property: the icon a 64 bit string as a byte array. - * + * * @return the rawPng value. */ public byte[] rawPng() { @@ -190,7 +194,7 @@ public byte[] rawPng() { /** * Set the rawPng property: the icon a 64 bit string as a byte array. - * + * * @param rawPng the rawPng value to set. * @return the MsixPackageApplications object itself. */ @@ -201,7 +205,7 @@ public MsixPackageApplications withRawPng(byte[] rawPng) { /** * 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/MsixPackageDependencies.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageDependencies.java index 8947f3932601..0d7eb9ef3fdb 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Schema for MSIX Package Dependencies properties. */ +/** + * Schema for MSIX Package Dependencies properties. + */ @Fluent public final class MsixPackageDependencies { /* @@ -28,13 +30,15 @@ public final class MsixPackageDependencies { @JsonProperty(value = "minVersion") private String minVersion; - /** Creates an instance of MsixPackageDependencies class. */ + /** + * Creates an instance of MsixPackageDependencies class. + */ public MsixPackageDependencies() { } /** * Get the dependencyName property: Name of package dependency. - * + * * @return the dependencyName value. */ public String dependencyName() { @@ -43,7 +47,7 @@ public String dependencyName() { /** * Set the dependencyName property: Name of package dependency. - * + * * @param dependencyName the dependencyName value to set. * @return the MsixPackageDependencies object itself. */ @@ -54,7 +58,7 @@ public MsixPackageDependencies withDependencyName(String dependencyName) { /** * Get the publisher property: Name of dependency publisher. - * + * * @return the publisher value. */ public String publisher() { @@ -63,7 +67,7 @@ public String publisher() { /** * Set the publisher property: Name of dependency publisher. - * + * * @param publisher the publisher value to set. * @return the MsixPackageDependencies object itself. */ @@ -74,7 +78,7 @@ public MsixPackageDependencies withPublisher(String publisher) { /** * Get the minVersion property: Dependency version required. - * + * * @return the minVersion value. */ public String minVersion() { @@ -83,7 +87,7 @@ public String minVersion() { /** * Set the minVersion property: Dependency version required. - * + * * @param minVersion the minVersion value to set. * @return the MsixPackageDependencies object itself. */ @@ -94,7 +98,7 @@ public MsixPackageDependencies withMinVersion(String minVersion) { /** * 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/MsixPackageList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackageList.java index 8cb5af5ada0e..23704ffb0c93 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 @@ -11,8 +11,8 @@ /** * MsixPackageList - * - *

List of MSIX Package definitions. + * + * List of MSIX Package definitions. */ @Fluent public final class MsixPackageList { @@ -28,13 +28,15 @@ public final class MsixPackageList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of MsixPackageList class. */ + /** + * Creates an instance of MsixPackageList class. + */ public MsixPackageList() { } /** * Get the value property: List of MSIX Package definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of MSIX Package definitions. - * + * * @param value the value value to set. * @return the MsixPackageList object itself. */ @@ -54,7 +56,7 @@ public MsixPackageList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/MsixPackagePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackagePatch.java index 46862b3d1d56..aa314a5e0915 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 @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackagePatchProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** MSIX Package properties that can be patched. */ +/** + * MSIX Package properties that can be patched. + */ @Fluent public final class MsixPackagePatch extends ProxyResource { /* @@ -18,22 +21,39 @@ public final class MsixPackagePatch extends ProxyResource { @JsonProperty(value = "properties") private MsixPackagePatchProperties innerProperties; - /** Creates an instance of MsixPackagePatch class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of MsixPackagePatch class. + */ public MsixPackagePatch() { } /** * Get the innerProperties property: Detailed properties for MSIX Package. - * + * * @return the innerProperties value. */ private MsixPackagePatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the isActive property: Set a version of the package to be active across hostpool. - * + * * @return the isActive value. */ public Boolean isActive() { @@ -42,7 +62,7 @@ public Boolean isActive() { /** * Set the isActive property: Set a version of the package to be active across hostpool. - * + * * @param isActive the isActive value to set. * @return the MsixPackagePatch object itself. */ @@ -56,7 +76,7 @@ public MsixPackagePatch withIsActive(Boolean isActive) { /** * Get the isRegularRegistration property: Set Registration mode. Regular or Delayed. - * + * * @return the isRegularRegistration value. */ public Boolean isRegularRegistration() { @@ -65,7 +85,7 @@ public Boolean isRegularRegistration() { /** * Set the isRegularRegistration property: Set Registration mode. Regular or Delayed. - * + * * @param isRegularRegistration the isRegularRegistration value to set. * @return the MsixPackagePatch object itself. */ @@ -79,7 +99,7 @@ public MsixPackagePatch withIsRegularRegistration(Boolean isRegularRegistration) /** * Get the displayName property: Display name for MSIX Package. - * + * * @return the displayName value. */ public String displayName() { @@ -88,7 +108,7 @@ public String displayName() { /** * Set the displayName property: Display name for MSIX Package. - * + * * @param displayName the displayName value to set. * @return the MsixPackagePatch object itself. */ @@ -102,7 +122,7 @@ public MsixPackagePatch withDisplayName(String displayName) { /** * 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/MsixPackages.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/MsixPackages.java index e06a6c922485..4cce380cfb45 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of MsixPackages. */ +/** + * Resource collection API of MsixPackages. + */ public interface MsixPackages { /** * 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. @@ -22,12 +24,12 @@ public interface MsixPackages { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a msixpackage along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String hostPoolName, String msixPackageFullName, Context context); + Response getWithResponse(String resourceGroupName, String hostPoolName, String msixPackageFullName, + Context context); /** * 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. @@ -40,7 +42,7 @@ Response getWithResponse( /** * 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. @@ -50,12 +52,12 @@ Response getWithResponse( * @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); + Response deleteWithResponse(String resourceGroupName, String hostPoolName, String msixPackageFullName, + 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. @@ -67,7 +69,7 @@ Response deleteWithResponse( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,7 +81,7 @@ Response deleteWithResponse( /** * 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. @@ -91,17 +93,12 @@ Response deleteWithResponse( * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable list(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context); /** * Get a msixpackage. - * + * * @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. @@ -112,7 +109,7 @@ PagedIterable list( /** * Get a msixpackage. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +121,7 @@ PagedIterable list( /** * Remove an MSIX Package. - * + * * @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. @@ -134,7 +131,7 @@ PagedIterable list( /** * Remove an MSIX Package. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,7 +143,7 @@ PagedIterable list( /** * Begins definition for a new MsixPackage resource. - * + * * @param name resource name. * @return the first stage of the new MsixPackage definition. */ 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 d7fa4eab2a5f..eefc6708e6aa 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of the operation. */ +/** + * Properties of the operation. + */ @Fluent public final class OperationProperties { /* @@ -16,13 +18,15 @@ public final class OperationProperties { @JsonProperty(value = "serviceSpecification") private ServiceSpecification serviceSpecification; - /** Creates an instance of OperationProperties class. */ + /** + * Creates an instance of OperationProperties class. + */ public OperationProperties() { } /** * Get the serviceSpecification property: Service specification payload. - * + * * @return the serviceSpecification value. */ public ServiceSpecification serviceSpecification() { @@ -31,7 +35,7 @@ public ServiceSpecification serviceSpecification() { /** * Set the serviceSpecification property: Service specification payload. - * + * * @param serviceSpecification the serviceSpecification value to set. * @return the OperationProperties object itself. */ @@ -42,7 +46,7 @@ public OperationProperties withServiceSpecification(ServiceSpecification service /** * 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/Operations.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Operations.java index 550ed4d98945..85aae6082c58 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Operations.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Operations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * 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 PagedIterable}. @@ -20,7 +22,7 @@ public interface Operations { /** * List all of the available operations the Desktop Virtualization resource provider supports. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PackageTimestamped.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PackageTimestamped.java new file mode 100644 index 000000000000..935dffe62b4c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PackageTimestamped.java @@ -0,0 +1,53 @@ +// Copyright (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; + +/** + * Is package timestamped so it can ignore the certificate expiry date. + */ +public final class PackageTimestamped extends ExpandableStringEnum { + /** + * Static value Timestamped for PackageTimestamped. + */ + public static final PackageTimestamped TIMESTAMPED = fromString("Timestamped"); + + /** + * Static value NotTimestamped for PackageTimestamped. + */ + public static final PackageTimestamped NOT_TIMESTAMPED = fromString("NotTimestamped"); + + /** + * Creates a new instance of PackageTimestamped value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PackageTimestamped() { + } + + /** + * Creates or finds a PackageTimestamped from its string representation. + * + * @param name a name to look for. + * @return the corresponding PackageTimestamped. + */ + @JsonCreator + public static PackageTimestamped fromString(String name) { + return fromString(name, PackageTimestamped.class); + } + + /** + * Gets known PackageTimestamped values. + * + * @return known PackageTimestamped values. + */ + public static Collection values() { + return values(PackageTimestamped.class); + } +} 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 6a55f93b23e8..2303aba679bd 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,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** PersonalDesktopAssignment type for HostPool. */ +/** + * PersonalDesktopAssignment type for HostPool. + */ public final class PersonalDesktopAssignmentType extends ExpandableStringEnum { - /** Static value Automatic for PersonalDesktopAssignmentType. */ + /** + * Static value Automatic for PersonalDesktopAssignmentType. + */ public static final PersonalDesktopAssignmentType AUTOMATIC = fromString("Automatic"); - /** Static value Direct for PersonalDesktopAssignmentType. */ + /** + * Static value Direct for PersonalDesktopAssignmentType. + */ public static final PersonalDesktopAssignmentType DIRECT = fromString("Direct"); /** * Creates a new instance of PersonalDesktopAssignmentType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public PersonalDesktopAssignmentType() { /** * Creates or finds a PersonalDesktopAssignmentType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PersonalDesktopAssignmentType. */ @@ -38,7 +44,7 @@ public static PersonalDesktopAssignmentType fromString(String name) { /** * Gets known PersonalDesktopAssignmentType values. - * + * * @return known PersonalDesktopAssignmentType values. */ public static Collection values() { 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 8de430f2313c..2670996c06c7 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 @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Plan for the resource. */ +/** + * Plan for the resource. + */ @Fluent public class Plan { /* @@ -24,8 +26,7 @@ public class Plan { 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; @@ -42,13 +43,15 @@ public class Plan { @JsonProperty(value = "version") private String version; - /** Creates an instance of Plan class. */ + /** + * 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. - * + * * @return the name value. */ public String name() { @@ -57,7 +60,7 @@ public String name() { /** * Set the name property: A user defined name of the 3rd Party Artifact that is being procured. - * + * * @param name the name value to set. * @return the Plan object itself. */ @@ -68,7 +71,7 @@ public Plan withName(String name) { /** * Get the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. - * + * * @return the publisher value. */ public String publisher() { @@ -77,7 +80,7 @@ public String publisher() { /** * Set the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. - * + * * @param publisher the publisher value to set. * @return the Plan object itself. */ @@ -89,7 +92,7 @@ public Plan withPublisher(String publisher) { /** * Get the product property: 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. - * + * * @return the product value. */ public String product() { @@ -99,7 +102,7 @@ public String product() { /** * Set the product property: 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. - * + * * @param product the product value to set. * @return the Plan object itself. */ @@ -111,7 +114,7 @@ public Plan withProduct(String product) { /** * Get the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said * product/artifact. - * + * * @return the promotionCode value. */ public String promotionCode() { @@ -121,7 +124,7 @@ public String promotionCode() { /** * Set the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said * product/artifact. - * + * * @param promotionCode the promotionCode value to set. * @return the Plan object itself. */ @@ -132,7 +135,7 @@ public Plan withPromotionCode(String promotionCode) { /** * Get the version property: The version of the desired product/artifact. - * + * * @return the version value. */ public String version() { @@ -141,7 +144,7 @@ public String version() { /** * Set the version property: The version of the desired product/artifact. - * + * * @param version the version value to set. * @return the Plan object itself. */ @@ -152,21 +155,19 @@ public Plan withVersion(String version) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Plan")); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Plan")); } if (publisher() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property publisher in model Plan")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property publisher in model Plan")); } if (product() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property product in model Plan")); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property product in model Plan")); } } 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 1447964f5b14..f58797bb82fa 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,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of preferred application group type, default to Desktop Application Group. */ +/** + * The type of preferred application group type, default to Desktop Application Group. + */ public final class PreferredAppGroupType extends ExpandableStringEnum { - /** Static value None for PreferredAppGroupType. */ + /** + * Static value None for PreferredAppGroupType. + */ public static final PreferredAppGroupType NONE = fromString("None"); - /** Static value Desktop for PreferredAppGroupType. */ + /** + * Static value Desktop for PreferredAppGroupType. + */ public static final PreferredAppGroupType DESKTOP = fromString("Desktop"); - /** Static value RailApplications for PreferredAppGroupType. */ + /** + * Static value RailApplications for PreferredAppGroupType. + */ public static final PreferredAppGroupType RAIL_APPLICATIONS = fromString("RailApplications"); /** * Creates a new instance of PreferredAppGroupType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public PreferredAppGroupType() { /** * Creates or finds a PreferredAppGroupType from its string representation. - * + * * @param name a name to look for. * @return the corresponding PreferredAppGroupType. */ @@ -41,7 +49,7 @@ public static PreferredAppGroupType fromString(String name) { /** * Gets known PreferredAppGroupType values. - * + * * @return known PreferredAppGroupType values. */ public static Collection values() { 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 f05bf19fa1b7..8c4f9c93158b 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 @@ -7,22 +7,26 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Private Endpoint resource. */ +/** + * The private endpoint resource. + */ @Immutable public final class PrivateEndpoint { /* - * The ARM identifier for Private Endpoint + * The ARM identifier for private endpoint. */ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) private String id; - /** Creates an instance of PrivateEndpoint class. */ + /** + * Creates an instance of PrivateEndpoint class. + */ public PrivateEndpoint() { } /** - * Get the id property: The ARM identifier for Private Endpoint. - * + * Get the id property: The ARM identifier for private endpoint. + * * @return the id value. */ public String id() { @@ -31,7 +35,7 @@ public String id() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnection.java index 40f1ca1cd7b7..c8661962febb 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 @@ -6,10 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** The Private Endpoint Connection resource. */ +/** + * The private endpoint connection resource. + */ @Fluent public class PrivateEndpointConnection extends ProxyResource { /* @@ -18,13 +22,21 @@ public class PrivateEndpointConnection extends ProxyResource { @JsonProperty(value = "properties") private PrivateEndpointConnectionProperties innerProperties; - /** Creates an instance of PrivateEndpointConnection class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PrivateEndpointConnection class. + */ public PrivateEndpointConnection() { } /** * Get the innerProperties property: Resource properties. - * + * * @return the innerProperties value. */ private PrivateEndpointConnectionProperties innerProperties() { @@ -32,8 +44,26 @@ private PrivateEndpointConnectionProperties innerProperties() { } /** - * Get the privateEndpoint property: The resource of private end point. - * + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the groupIds property: The group ids for the private endpoint resource. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.innerProperties() == null ? null : this.innerProperties().groupIds(); + } + + /** + * Get the privateEndpoint property: The private endpoint resource. + * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { @@ -41,8 +71,8 @@ public PrivateEndpoint privateEndpoint() { } /** - * Set the privateEndpoint property: The resource of private end point. - * + * Set the privateEndpoint property: The private endpoint resource. + * * @param privateEndpoint the privateEndpoint value to set. * @return the PrivateEndpointConnection object itself. */ @@ -57,7 +87,7 @@ public PrivateEndpointConnection withPrivateEndpoint(PrivateEndpoint privateEndp /** * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection * between service consumer and provider. - * + * * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { @@ -67,12 +97,12 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { /** * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection * between service consumer and provider. - * + * * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. * @return the PrivateEndpointConnection object itself. */ - public PrivateEndpointConnection withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + public PrivateEndpointConnection + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { if (this.innerProperties() == null) { this.innerProperties = new PrivateEndpointConnectionProperties(); } @@ -82,7 +112,7 @@ public PrivateEndpointConnection withPrivateLinkServiceConnectionState( /** * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * * @return the provisioningState value. */ public PrivateEndpointConnectionProvisioningState provisioningState() { @@ -91,7 +121,7 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { /** * 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/PrivateEndpointConnectionListResultWithSystemData.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionListResultWithSystemData.java index 482663f331fb..db6a211cdda4 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** List of private endpoint connection associated with the specified storage account. */ +/** + * List of private endpoint connection associated with the specified storage account. + */ @Fluent public final class PrivateEndpointConnectionListResultWithSystemData { /* @@ -24,13 +26,15 @@ public final class PrivateEndpointConnectionListResultWithSystemData { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of PrivateEndpointConnectionListResultWithSystemData class. */ + /** + * Creates an instance of PrivateEndpointConnectionListResultWithSystemData class. + */ public PrivateEndpointConnectionListResultWithSystemData() { } /** * Get the value property: Array of private endpoint connections. - * + * * @return the value value. */ public List value() { @@ -39,19 +43,19 @@ public List value() { /** * Set the value property: Array of private endpoint connections. - * + * * @param value the value value to set. * @return the PrivateEndpointConnectionListResultWithSystemData object itself. */ - public PrivateEndpointConnectionListResultWithSystemData withValue( - List value) { + public PrivateEndpointConnectionListResultWithSystemData + withValue(List value) { this.value = value; return this; } /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * 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/PrivateEndpointConnectionProvisioningState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionProvisioningState.java index 5df9c31ab572..7951d6bfcbbd 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,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The current provisioning state. */ +/** + * The current provisioning state. + */ public final class PrivateEndpointConnectionProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Creating for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Deleting for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ + /** + * Static value Failed for PrivateEndpointConnectionProvisioningState. + */ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); /** * Creates a new instance of PrivateEndpointConnectionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public PrivateEndpointConnectionProvisioningState() { /** * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateEndpointConnectionProvisioningState. */ @@ -45,7 +55,7 @@ public static PrivateEndpointConnectionProvisioningState fromString(String name) /** * Gets known PrivateEndpointConnectionProvisioningState values. - * + * * @return known PrivateEndpointConnectionProvisioningState values. */ public static Collection values() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java index 0ae6d5ef7e2e..eb50adcefc29 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnectionWithSystemData.java @@ -6,33 +6,50 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; +import java.util.List; -/** An immutable client-side representation of PrivateEndpointConnectionWithSystemData. */ +/** + * An immutable client-side representation of PrivateEndpointConnectionWithSystemData. + */ public interface PrivateEndpointConnectionWithSystemData { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the privateEndpoint property: The resource of private end point. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the groupIds property: The group ids for the private endpoint resource. + * + * @return the groupIds value. + */ + List groupIds(); + + /** + * Gets the privateEndpoint property: The private endpoint resource. + * * @return the privateEndpoint value. */ PrivateEndpoint privateEndpoint(); @@ -40,30 +57,23 @@ public interface PrivateEndpointConnectionWithSystemData { /** * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the * connection between service consumer and provider. - * + * * @return the privateLinkServiceConnectionState value. */ PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); /** * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * + * * @return the provisioningState value. */ PrivateEndpointConnectionProvisioningState provisioningState(); - /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - SystemData systemData(); - /** * Gets the inner * com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner * object. - * + * * @return the inner object. */ PrivateEndpointConnectionWithSystemDataInner innerModel(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointConnections.java index e2fad3ebdb73..9089fca12c53 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 @@ -8,25 +8,27 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of PrivateEndpointConnections. */ +/** + * Resource collection API of PrivateEndpointConnections. + */ public interface PrivateEndpointConnections { /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName); + PagedIterable listByWorkspace(String resourceGroupName, + String workspaceName); /** * List private endpoint connections. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param context The context to associate with this operation. @@ -34,65 +36,65 @@ PagedIterable listByWorkspace( * @throws com.azure.core.management.exception.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}. + * with {@link PagedIterable}. */ - PagedIterable listByWorkspace( - String resourceGroupName, String workspaceName, 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 workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection along with {@link Response}. */ - Response getByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); + Response getByWorkspaceWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - PrivateEndpointConnectionWithSystemData getByWorkspace( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); + PrivateEndpointConnectionWithSystemData getByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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); + Response deleteByWorkspaceWithResponse(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, Context context); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -101,11 +103,11 @@ Response deleteByWorkspaceWithResponse( /** * 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. + * 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. @@ -113,49 +115,43 @@ Response deleteByWorkspaceWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Private Endpoint Connection resource along with {@link Response}. */ - Response updateByWorkspaceWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, + Response updateByWorkspaceWithResponse(String resourceGroupName, + String workspaceName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Private Endpoint Connection resource. */ - PrivateEndpointConnectionWithSystemData updateByWorkspace( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnectionWithSystemData updateByWorkspace(String resourceGroupName, String workspaceName, + String privateEndpointConnectionName, PrivateEndpointConnection connection); /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return list of private endpoint connection associated with the specified storage account as paginated response - * with {@link PagedIterable}. + * with {@link PagedIterable}. */ - PagedIterable listByHostPool( - String resourceGroupName, String hostPoolName); + PagedIterable listByHostPool(String resourceGroupName, + String hostPoolName); /** * List private endpoint connections associated with hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param pageSize Number of items per page. @@ -166,70 +162,65 @@ PagedIterable listByHostPool( * @throws com.azure.core.management.exception.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}. + * with {@link PagedIterable}. */ - PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 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. + * resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection along with {@link Response}. */ - Response getByHostPoolWithResponse( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName, Context context); + Response getByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, Context context); /** * Get a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a private endpoint connection. */ - PrivateEndpointConnectionWithSystemData getByHostPool( - String resourceGroupName, String hostPoolName, String privateEndpointConnectionName); + PrivateEndpointConnectionWithSystemData getByHostPool(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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); + Response deleteByHostPoolWithResponse(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, Context context); /** * Remove a connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -238,11 +229,11 @@ Response deleteByHostPoolWithResponse( /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * 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. @@ -250,29 +241,23 @@ Response deleteByHostPoolWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Private Endpoint Connection resource along with {@link Response}. */ - Response updateByHostPoolWithResponse( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection, + Response updateByHostPoolWithResponse(String resourceGroupName, + String hostPoolName, String privateEndpointConnectionName, PrivateEndpointConnection connection, Context context); /** * Approve or reject a private endpoint connection. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. + * resource. * @param connection Object containing the updated connection. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Private Endpoint Connection resource. */ - PrivateEndpointConnectionWithSystemData updateByHostPool( - String resourceGroupName, - String hostPoolName, - String privateEndpointConnectionName, - PrivateEndpointConnection connection); + PrivateEndpointConnectionWithSystemData updateByHostPool(String resourceGroupName, String hostPoolName, + String privateEndpointConnectionName, PrivateEndpointConnection connection); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateEndpointServiceConnectionStatus.java index 0dc90042b176..606ebd1d4362 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,21 +8,29 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The private endpoint connection status. */ +/** + * The private endpoint connection status. + */ public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum { - /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ + /** + * Static value Pending for PrivateEndpointServiceConnectionStatus. + */ public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ + /** + * Static value Approved for PrivateEndpointServiceConnectionStatus. + */ public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ + /** + * Static value Rejected for PrivateEndpointServiceConnectionStatus. + */ public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); /** * Creates a new instance of PrivateEndpointServiceConnectionStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +39,7 @@ public PrivateEndpointServiceConnectionStatus() { /** * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding PrivateEndpointServiceConnectionStatus. */ @@ -42,7 +50,7 @@ public static PrivateEndpointServiceConnectionStatus fromString(String name) { /** * Gets known PrivateEndpointServiceConnectionStatus values. - * + * * @return known PrivateEndpointServiceConnectionStatus values. */ public static Collection values() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java index 33100e2656b9..7244a9030ea3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResource.java @@ -4,56 +4,66 @@ package com.azure.resourcemanager.desktopvirtualization.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; import java.util.List; -/** An immutable client-side representation of PrivateLinkResource. */ +/** + * An immutable client-side representation of PrivateLinkResource. + */ public interface PrivateLinkResource { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the groupId property: The private link resource group id. - * + * * @return the groupId value. */ String groupId(); /** * Gets the requiredMembers property: The private link resource required member names. - * + * * @return the requiredMembers value. */ List requiredMembers(); /** * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. - * + * * @return the requiredZoneNames value. */ List requiredZoneNames(); /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner object. - * + * * @return the inner object. */ PrivateLinkResourceInner innerModel(); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResourceListResult.java index 24165f968933..cca892a92e70 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A list of private link resources. */ +/** + * A list of private link resources. + */ @Fluent public final class PrivateLinkResourceListResult { /* @@ -24,13 +26,15 @@ public final class PrivateLinkResourceListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of PrivateLinkResourceListResult class. */ + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ public PrivateLinkResourceListResult() { } /** * Get the value property: Array of private link resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Array of private link resources. - * + * * @param value the value value to set. * @return the PrivateLinkResourceListResult object itself. */ @@ -50,7 +54,7 @@ public PrivateLinkResourceListResult withValue(List va /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * 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/PrivateLinkResources.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PrivateLinkResources.java index c80034b42a09..e76f746ceb9c 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of PrivateLinkResources. */ +/** + * Resource collection API of PrivateLinkResources. + */ public interface PrivateLinkResources { /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -23,7 +25,7 @@ public interface PrivateLinkResources { /** * List the private link resources available for this workspace. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param pageSize Number of items per page. @@ -35,17 +37,12 @@ public interface PrivateLinkResources { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - PagedIterable listByWorkspace( - String resourceGroupName, - String workspaceName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context); /** * List the private link resources available for this hostpool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param hostPoolName The name of the host pool within the specified resource group. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -57,7 +54,7 @@ PagedIterable listByWorkspace( /** * 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. @@ -69,11 +66,6 @@ PagedIterable listByWorkspace( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of private link resources as paginated response with {@link PagedIterable}. */ - PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + 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 8c448bf0dcdd..66dbf2d30c91 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A collection of information about the state of the connection between service consumer and provider. */ +/** + * A collection of information about the state of the connection between service consumer and provider. + */ @Fluent public final class PrivateLinkServiceConnectionState { /* @@ -28,14 +30,16 @@ public final class PrivateLinkServiceConnectionState { @JsonProperty(value = "actionsRequired") private String actionsRequired; - /** Creates an instance of PrivateLinkServiceConnectionState class. */ + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ public PrivateLinkServiceConnectionState() { } /** * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. - * + * * @return the status value. */ public PrivateEndpointServiceConnectionStatus status() { @@ -45,7 +49,7 @@ public PrivateEndpointServiceConnectionStatus status() { /** * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the * service. - * + * * @param status the status value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -56,7 +60,7 @@ public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnec /** * Get the description property: The reason for approval/rejection of the connection. - * + * * @return the description value. */ public String description() { @@ -65,7 +69,7 @@ public String description() { /** * Set the description property: The reason for approval/rejection of the connection. - * + * * @param description the description value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -77,7 +81,7 @@ public PrivateLinkServiceConnectionState withDescription(String description) { /** * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on * the consumer. - * + * * @return the actionsRequired value. */ public String actionsRequired() { @@ -87,7 +91,7 @@ public String actionsRequired() { /** * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on * the consumer. - * + * * @param actionsRequired the actionsRequired value to set. * @return the PrivateLinkServiceConnectionState object itself. */ @@ -98,7 +102,7 @@ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequi /** * 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/ProvisioningState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ProvisioningState.java new file mode 100644 index 000000000000..93679f589ca2 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ProvisioningState.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The current provisioning state. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Provisioning for ProvisioningState. + */ + public static final ProvisioningState PROVISIONING = fromString("Provisioning"); + + /** + * Static value Failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for ProvisioningState. + */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} 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 40edec9b3e16..84c8fec69cac 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 @@ -13,15 +13,19 @@ * only be accessed via private endpoints. */ public final class PublicNetworkAccess extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccess. */ + /** + * Static value Enabled for PublicNetworkAccess. + */ public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - /** Static value Disabled for PublicNetworkAccess. */ + /** + * Static value Disabled for PublicNetworkAccess. + */ public static final PublicNetworkAccess DISABLED = fromString("Disabled"); /** * Creates a new instance of PublicNetworkAccess value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public PublicNetworkAccess() { /** * Creates or finds a PublicNetworkAccess from its string representation. - * + * * @param name a name to look for. * @return the corresponding PublicNetworkAccess. */ @@ -41,7 +45,7 @@ public static PublicNetworkAccess fromString(String name) { /** * Gets known PublicNetworkAccess values. - * + * * @return known PublicNetworkAccess values. */ public static Collection values() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfo.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfo.java index 7293faf50f09..b89d4ebb1ccd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfo.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationInfo.java @@ -7,32 +7,34 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of RegistrationInfo. */ +/** + * An immutable client-side representation of RegistrationInfo. + */ public interface RegistrationInfo { /** * Gets the expirationTime property: Expiration time of registration token. - * + * * @return the expirationTime value. */ OffsetDateTime expirationTime(); /** * Gets the token property: The registration token base64 encoded string. - * + * * @return the token value. */ String token(); /** * Gets the registrationTokenOperation property: The type of resetting the token. - * + * * @return the registrationTokenOperation value. */ RegistrationTokenOperation registrationTokenOperation(); /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner object. - * + * * @return the inner object. */ RegistrationInfoInner innerModel(); 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 6c2a45bfd2b5..d41d09467666 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Represents a RegistrationInfo definition. */ +/** + * Represents a RegistrationInfo definition. + */ @Fluent public final class RegistrationInfoPatch { /* @@ -23,13 +25,15 @@ public final class RegistrationInfoPatch { @JsonProperty(value = "registrationTokenOperation") private RegistrationTokenOperation registrationTokenOperation; - /** Creates an instance of RegistrationInfoPatch class. */ + /** + * Creates an instance of RegistrationInfoPatch class. + */ public RegistrationInfoPatch() { } /** * Get the expirationTime property: Expiration time of registration token. - * + * * @return the expirationTime value. */ public OffsetDateTime expirationTime() { @@ -38,7 +42,7 @@ public OffsetDateTime expirationTime() { /** * Set the expirationTime property: Expiration time of registration token. - * + * * @param expirationTime the expirationTime value to set. * @return the RegistrationInfoPatch object itself. */ @@ -49,7 +53,7 @@ public RegistrationInfoPatch withExpirationTime(OffsetDateTime expirationTime) { /** * Get the registrationTokenOperation property: The type of resetting the token. - * + * * @return the registrationTokenOperation value. */ public RegistrationTokenOperation registrationTokenOperation() { @@ -58,7 +62,7 @@ public RegistrationTokenOperation registrationTokenOperation() { /** * Set the registrationTokenOperation property: The type of resetting the token. - * + * * @param registrationTokenOperation the registrationTokenOperation value to set. * @return the RegistrationInfoPatch object itself. */ @@ -69,7 +73,7 @@ public RegistrationInfoPatch withRegistrationTokenOperation(RegistrationTokenOpe /** * 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/RegistrationTokenOperation.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/RegistrationTokenOperation.java index 507fa91aa452..13cbcb519ca6 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,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of resetting the token. */ +/** + * The type of resetting the token. + */ public final class RegistrationTokenOperation extends ExpandableStringEnum { - /** Static value Delete for RegistrationTokenOperation. */ + /** + * Static value Delete for RegistrationTokenOperation. + */ public static final RegistrationTokenOperation DELETE = fromString("Delete"); - /** Static value None for RegistrationTokenOperation. */ + /** + * Static value None for RegistrationTokenOperation. + */ public static final RegistrationTokenOperation NONE = fromString("None"); - /** Static value Update for RegistrationTokenOperation. */ + /** + * Static value Update for RegistrationTokenOperation. + */ public static final RegistrationTokenOperation UPDATE = fromString("Update"); /** * Creates a new instance of RegistrationTokenOperation value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public RegistrationTokenOperation() { /** * Creates or finds a RegistrationTokenOperation from its string representation. - * + * * @param name a name to look for. * @return the corresponding RegistrationTokenOperation. */ @@ -41,7 +49,7 @@ public static RegistrationTokenOperation fromString(String name) { /** * Gets known RegistrationTokenOperation values. - * + * * @return known RegistrationTokenOperation values. */ public static Collection values() { 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 28593bb36ea0..0ceb6d7438ab 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,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Resource Type of Application. */ +/** + * Resource Type of Application. + */ public final class RemoteApplicationType extends ExpandableStringEnum { - /** Static value InBuilt for RemoteApplicationType. */ + /** + * Static value InBuilt for RemoteApplicationType. + */ public static final RemoteApplicationType IN_BUILT = fromString("InBuilt"); - /** Static value MsixApplication for RemoteApplicationType. */ + /** + * Static value MsixApplication for RemoteApplicationType. + */ public static final RemoteApplicationType MSIX_APPLICATION = fromString("MsixApplication"); /** * Creates a new instance of RemoteApplicationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public RemoteApplicationType() { /** * Creates or finds a RemoteApplicationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding RemoteApplicationType. */ @@ -38,7 +44,7 @@ public static RemoteApplicationType fromString(String name) { /** * Gets known RemoteApplicationType values. - * + * * @return known RemoteApplicationType values. */ public static Collection values() { 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 8254c935fc57..af3d9ec2e375 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,12 +7,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The identity type. */ +/** + * The identity type. + */ public enum ResourceIdentityType { - /** Enum value SystemAssigned. */ + /** + * Enum value SystemAssigned. + */ SYSTEM_ASSIGNED("SystemAssigned"); - /** The actual serialized value for a ResourceIdentityType instance. */ + /** + * The actual serialized value for a ResourceIdentityType instance. + */ private final String value; ResourceIdentityType(String value) { @@ -21,7 +27,7 @@ public enum ResourceIdentityType { /** * Parses a serialized value to a ResourceIdentityType instance. - * + * * @param value the serialized value to parse. * @return the parsed ResourceIdentityType object, or null if unable to parse. */ @@ -39,7 +45,9 @@ public static ResourceIdentityType fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@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 f9d419cfd776..2d77ac93d016 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 @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -16,26 +17,19 @@ @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; @@ -58,7 +52,15 @@ public class ResourceModelWithAllowedPropertySet extends Resource { @JsonProperty(value = "plan") private ResourceModelWithAllowedPropertySetPlan plan; - /** Creates an instance of ResourceModelWithAllowedPropertySet class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ResourceModelWithAllowedPropertySet class. + */ public ResourceModelWithAllowedPropertySet() { } @@ -66,7 +68,7 @@ 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 * delete the resource if it is removed from the template since it is managed by another resource. - * + * * @return the managedBy value. */ public String managedBy() { @@ -77,7 +79,7 @@ public String managedBy() { * Set 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 * delete the resource if it is removed from the template since it is managed by another resource. - * + * * @param managedBy the managedBy value to set. * @return the ResourceModelWithAllowedPropertySet object itself. */ @@ -88,9 +90,9 @@ public ResourceModelWithAllowedPropertySet withManagedBy(String managedBy) { /** * Get the kind property: 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 + * 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. - * + * * @return the kind value. */ public String kind() { @@ -99,9 +101,9 @@ public String kind() { /** * Set the kind property: 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 + * 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. - * + * * @param kind the kind value to set. * @return the ResourceModelWithAllowedPropertySet object itself. */ @@ -115,7 +117,7 @@ public ResourceModelWithAllowedPropertySet withKind(String kind) { * 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. - * + * * @return the etag value. */ public String etag() { @@ -124,7 +126,7 @@ public String etag() { /** * Get the identity property: The identity property. - * + * * @return the identity value. */ public ResourceModelWithAllowedPropertySetIdentity identity() { @@ -133,7 +135,7 @@ public ResourceModelWithAllowedPropertySetIdentity identity() { /** * Set the identity property: The identity property. - * + * * @param identity the identity value to set. * @return the ResourceModelWithAllowedPropertySet object itself. */ @@ -144,7 +146,7 @@ public ResourceModelWithAllowedPropertySet withIdentity(ResourceModelWithAllowed /** * Get the sku property: The sku property. - * + * * @return the sku value. */ public ResourceModelWithAllowedPropertySetSku sku() { @@ -153,7 +155,7 @@ public ResourceModelWithAllowedPropertySetSku sku() { /** * Set the sku property: The sku property. - * + * * @param sku the sku value to set. * @return the ResourceModelWithAllowedPropertySet object itself. */ @@ -164,7 +166,7 @@ public ResourceModelWithAllowedPropertySet withSku(ResourceModelWithAllowedPrope /** * Get the plan property: The plan property. - * + * * @return the plan value. */ public ResourceModelWithAllowedPropertySetPlan plan() { @@ -173,7 +175,7 @@ public ResourceModelWithAllowedPropertySetPlan plan() { /** * Set the plan property: The plan property. - * + * * @param plan the plan value to set. * @return the ResourceModelWithAllowedPropertySet object itself. */ @@ -182,14 +184,27 @@ public ResourceModelWithAllowedPropertySet withPlan(ResourceModelWithAllowedProp return this; } - /** {@inheritDoc} */ + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySet withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySet withTags(Map tags) { super.withTags(tags); @@ -198,7 +213,7 @@ public ResourceModelWithAllowedPropertySet withTags(Map tags) { /** * 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/ResourceModelWithAllowedPropertySetIdentity.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceModelWithAllowedPropertySetIdentity.java index d85ff3215a1d..38e6c5a21614 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 @@ -6,14 +6,20 @@ import com.azure.core.annotation.Fluent; -/** The ResourceModelWithAllowedPropertySetIdentity model. */ +/** + * The ResourceModelWithAllowedPropertySetIdentity model. + */ @Fluent public final class ResourceModelWithAllowedPropertySetIdentity extends Identity { - /** Creates an instance of ResourceModelWithAllowedPropertySetIdentity class. */ + /** + * Creates an instance of ResourceModelWithAllowedPropertySetIdentity class. + */ public ResourceModelWithAllowedPropertySetIdentity() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetIdentity withType(ResourceIdentityType type) { super.withType(type); @@ -22,7 +28,7 @@ public ResourceModelWithAllowedPropertySetIdentity withType(ResourceIdentityType /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 5d11137579bd..634146fec682 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 @@ -6,42 +6,56 @@ import com.azure.core.annotation.Fluent; -/** The ResourceModelWithAllowedPropertySetPlan model. */ +/** + * The ResourceModelWithAllowedPropertySetPlan model. + */ @Fluent public final class ResourceModelWithAllowedPropertySetPlan extends Plan { - /** Creates an instance of ResourceModelWithAllowedPropertySetPlan class. */ + /** + * Creates an instance of ResourceModelWithAllowedPropertySetPlan class. + */ public ResourceModelWithAllowedPropertySetPlan() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetPlan withName(String name) { super.withName(name); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetPlan withPublisher(String publisher) { super.withPublisher(publisher); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetPlan withProduct(String product) { super.withProduct(product); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetPlan withPromotionCode(String promotionCode) { super.withPromotionCode(promotionCode); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetPlan withVersion(String version) { super.withVersion(version); @@ -50,7 +64,7 @@ public ResourceModelWithAllowedPropertySetPlan withVersion(String version) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 2ec2cc8ec542..26bb975d4891 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 @@ -6,42 +6,56 @@ import com.azure.core.annotation.Fluent; -/** The ResourceModelWithAllowedPropertySetSku model. */ +/** + * The ResourceModelWithAllowedPropertySetSku model. + */ @Fluent public final class ResourceModelWithAllowedPropertySetSku extends Sku { - /** Creates an instance of ResourceModelWithAllowedPropertySetSku class. */ + /** + * Creates an instance of ResourceModelWithAllowedPropertySetSku class. + */ public ResourceModelWithAllowedPropertySetSku() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetSku withName(String name) { super.withName(name); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetSku withTier(SkuTier tier) { super.withTier(tier); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetSku withSize(String size) { super.withSize(size); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetSku withFamily(String family) { super.withFamily(family); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ResourceModelWithAllowedPropertySetSku withCapacity(Integer capacity) { super.withCapacity(capacity); @@ -50,7 +64,7 @@ public ResourceModelWithAllowedPropertySetSku withCapacity(Integer capacity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperation.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperation.java index 09d857577d90..1b40ef2ba3da 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperation.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperation.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner; -/** An immutable client-side representation of ResourceProviderOperation. */ +/** + * An immutable client-side representation of ResourceProviderOperation. + */ public interface ResourceProviderOperation { /** * Gets the name property: Operation name, in format of {provider}/{resource}/{operation}. - * + * * @return the name value. */ String name(); /** * Gets the display property: Display metadata associated with the operation. - * + * * @return the display value. */ ResourceProviderOperationDisplay display(); /** * Gets the isDataAction property: Is a data action. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the properties property: Properties of the operation. - * + * * @return the properties value. */ OperationProperties properties(); @@ -39,7 +41,7 @@ public interface ResourceProviderOperation { /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner * object. - * + * * @return the inner object. */ ResourceProviderOperationInner innerModel(); 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 560241227dcd..428608607882 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Display metadata associated with the operation. */ +/** + * Display metadata associated with the operation. + */ @Fluent public final class ResourceProviderOperationDisplay { /* @@ -34,13 +36,15 @@ public final class ResourceProviderOperationDisplay { @JsonProperty(value = "description") private String description; - /** Creates an instance of ResourceProviderOperationDisplay class. */ + /** + * Creates an instance of ResourceProviderOperationDisplay class. + */ public ResourceProviderOperationDisplay() { } /** * Get the provider property: Resource provider: Microsoft Desktop Virtualization. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Set the provider property: Resource provider: Microsoft Desktop Virtualization. - * + * * @param provider the provider value to set. * @return the ResourceProviderOperationDisplay object itself. */ @@ -60,7 +64,7 @@ public ResourceProviderOperationDisplay withProvider(String provider) { /** * Get the resource property: Resource on which the operation is performed. - * + * * @return the resource value. */ public String resource() { @@ -69,7 +73,7 @@ public String resource() { /** * Set the resource property: Resource on which the operation is performed. - * + * * @param resource the resource value to set. * @return the ResourceProviderOperationDisplay object itself. */ @@ -80,7 +84,7 @@ public ResourceProviderOperationDisplay withResource(String resource) { /** * Get the operation property: Type of operation: get, read, delete, etc. - * + * * @return the operation value. */ public String operation() { @@ -89,7 +93,7 @@ public String operation() { /** * Set the operation property: Type of operation: get, read, delete, etc. - * + * * @param operation the operation value to set. * @return the ResourceProviderOperationDisplay object itself. */ @@ -100,7 +104,7 @@ public ResourceProviderOperationDisplay withOperation(String operation) { /** * Get the description property: Description of this operation. - * + * * @return the description value. */ public String description() { @@ -109,7 +113,7 @@ public String description() { /** * Set the description property: Description of this operation. - * + * * @param description the description value to set. * @return the ResourceProviderOperationDisplay object itself. */ @@ -120,7 +124,7 @@ public ResourceProviderOperationDisplay withDescription(String description) { /** * 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/ResourceProviderOperationList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ResourceProviderOperationList.java index bdca1b7e5ebb..7722c1775742 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Result of the request to list operations. */ +/** + * Result of the request to list operations. + */ @Fluent public final class ResourceProviderOperationList { /* @@ -24,13 +26,15 @@ public final class ResourceProviderOperationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ResourceProviderOperationList class. */ + /** + * Creates an instance of ResourceProviderOperationList class. + */ public ResourceProviderOperationList() { } /** * Get the value property: List of operations supported by this resource provider. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: List of operations supported by this resource provider. - * + * * @param value the value value to set. * @return the ResourceProviderOperationList object itself. */ @@ -50,7 +54,7 @@ public ResourceProviderOperationList withValue(List { - /** Static value Pooled for ScalingHostPoolType. */ + /** + * Static value Pooled for ScalingHostPoolType. + */ public static final ScalingHostPoolType POOLED = fromString("Pooled"); /** * Creates a new instance of ScalingHostPoolType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ScalingHostPoolType() { /** * Creates or finds a ScalingHostPoolType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScalingHostPoolType. */ @@ -35,7 +39,7 @@ public static ScalingHostPoolType fromString(String name) { /** * Gets known ScalingHostPoolType values. - * + * * @return known ScalingHostPoolType values. */ public static Collection values() { 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 8077031ca64a..1c7e1041fdfc 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 @@ -11,39 +11,41 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of ScalingPlan. */ +/** + * An immutable client-side representation of ScalingPlan. + */ public interface ScalingPlan { /** * 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 location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); @@ -52,16 +54,16 @@ public interface ScalingPlan { * Gets 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 delete the resource if it is removed from the template since it is managed by another resource. - * + * * @return the managedBy value. */ String managedBy(); /** * Gets the kind property: 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 + * 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. - * + * * @return the kind value. */ String kind(); @@ -71,143 +73,147 @@ public interface ScalingPlan { * 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. - * + * * @return the etag value. */ String etag(); /** * Gets the identity property: The identity property. - * + * * @return the identity value. */ ResourceModelWithAllowedPropertySetIdentity identity(); /** * Gets the sku property: The sku property. - * + * * @return the sku value. */ ResourceModelWithAllowedPropertySetSku sku(); /** * Gets the plan property: The plan property. - * + * * @return the plan value. */ ResourceModelWithAllowedPropertySetPlan plan(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of scaling plan. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the description property: Description of scaling plan. - * + * * @return the description value. */ String description(); /** * Gets the friendlyName property: User friendly name of scaling plan. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the timeZone property: Timezone of the scaling plan. - * + * * @return the timeZone value. */ String timeZone(); /** * Gets the hostPoolType property: HostPool type for desktop. - * + * * @return the hostPoolType value. */ ScalingHostPoolType hostPoolType(); /** * Gets the exclusionTag property: Exclusion tag for scaling plan. - * + * * @return the exclusionTag value. */ String exclusionTag(); /** * Gets the schedules property: List of ScalingPlanPooledSchedule definitions. - * + * * @return the schedules value. */ List schedules(); /** * Gets the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @return the hostPoolReferences value. */ List hostPoolReferences(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * 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.ScalingPlanInner object. - * + * * @return the inner object. */ ScalingPlanInner innerModel(); - /** The entirety of the ScalingPlan definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithTimeZone, - DefinitionStages.WithCreate { + /** + * The entirety of the ScalingPlan definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithTimeZone, DefinitionStages.WithCreate { } - /** The ScalingPlan definition stages. */ + /** + * The ScalingPlan definition stages. + */ interface DefinitionStages { - /** The first stage of the ScalingPlan definition. */ + /** + * The first stage of the ScalingPlan definition. + */ interface Blank extends WithLocation { } - /** The stage of the ScalingPlan definition allowing to specify location. */ + /** + * The stage of the ScalingPlan definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -215,29 +221,33 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ScalingPlan definition allowing to specify parent resource. */ + /** + * The stage of the ScalingPlan definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithTimeZone withExistingResourceGroup(String resourceGroupName); } - /** The stage of the ScalingPlan definition allowing to specify timeZone. */ + /** + * 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. */ @@ -249,169 +259,185 @@ interface WithTimeZone { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithManagedBy, - DefinitionStages.WithKind, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku, - DefinitionStages.WithPlan, - DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, - DefinitionStages.WithHostPoolType, - DefinitionStages.WithExclusionTag, - DefinitionStages.WithSchedules, - DefinitionStages.WithHostPoolReferences { + extends DefinitionStages.WithTags, DefinitionStages.WithManagedBy, DefinitionStages.WithKind, + DefinitionStages.WithIdentity, DefinitionStages.WithSku, DefinitionStages.WithPlan, + DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, DefinitionStages.WithHostPoolType, + DefinitionStages.WithExclusionTag, DefinitionStages.WithSchedules, DefinitionStages.WithHostPoolReferences { /** * Executes the create request. - * + * * @return the created resource. */ ScalingPlan create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ScalingPlan create(Context context); } - /** The stage of the ScalingPlan definition allowing to specify tags. */ + /** + * The stage of the ScalingPlan definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ScalingPlan definition allowing to specify managedBy. */ + /** + * The stage of the ScalingPlan definition allowing to specify managedBy. + */ interface WithManagedBy { /** * Specifies 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 delete the resource if it is removed from the template since it is managed by * another resource.. - * + * * @param managedBy 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. + * 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. * @return the next definition stage. */ WithCreate withManagedBy(String managedBy); } - /** The stage of the ScalingPlan definition allowing to specify kind. */ + /** + * The stage of the ScalingPlan definition allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: 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 + * 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.. - * + * * @param kind 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. + * same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the ScalingPlan definition allowing to specify identity. */ + /** + * The stage of the ScalingPlan definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity property.. - * + * * @param identity The identity property. * @return the next definition stage. */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } - /** The stage of the ScalingPlan definition allowing to specify sku. */ + /** + * The stage of the ScalingPlan definition allowing to specify sku. + */ interface WithSku { /** * Specifies the sku property: The sku property.. - * + * * @param sku The sku property. * @return the next definition stage. */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } - /** The stage of the ScalingPlan definition allowing to specify plan. */ + /** + * The stage of the ScalingPlan definition allowing to specify plan. + */ interface WithPlan { /** * Specifies the plan property: The plan property.. - * + * * @param plan The plan property. * @return the next definition stage. */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } - /** The stage of the ScalingPlan definition allowing to specify description. */ + /** + * The stage of the ScalingPlan definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of scaling plan.. - * + * * @param description Description of scaling plan. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the ScalingPlan definition allowing to specify friendlyName. */ + /** + * The stage of the ScalingPlan definition allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: User friendly name of scaling plan.. - * + * * @param friendlyName User friendly name of scaling plan. * @return the next definition stage. */ WithCreate withFriendlyName(String friendlyName); } - /** The stage of the ScalingPlan definition allowing to specify hostPoolType. */ + /** + * The stage of the ScalingPlan definition allowing to specify hostPoolType. + */ interface WithHostPoolType { /** * Specifies the hostPoolType property: HostPool type for desktop.. - * + * * @param hostPoolType HostPool type for desktop. * @return the next definition stage. */ WithCreate withHostPoolType(ScalingHostPoolType hostPoolType); } - /** The stage of the ScalingPlan definition allowing to specify exclusionTag. */ + /** + * The stage of the ScalingPlan definition allowing to specify exclusionTag. + */ interface WithExclusionTag { /** * Specifies the exclusionTag property: Exclusion tag for scaling plan.. - * + * * @param exclusionTag Exclusion tag for scaling plan. * @return the next definition stage. */ WithCreate withExclusionTag(String exclusionTag); } - /** The stage of the ScalingPlan definition allowing to specify schedules. */ + /** + * The stage of the ScalingPlan definition allowing to specify schedules. + */ interface WithSchedules { /** * Specifies the schedules property: List of ScalingPlanPooledSchedule definitions.. - * + * * @param schedules List of ScalingPlanPooledSchedule definitions. * @return the next definition stage. */ WithCreate withSchedules(List schedules); } - /** The stage of the ScalingPlan definition allowing to specify hostPoolReferences. */ + /** + * The stage of the ScalingPlan definition allowing to specify hostPoolReferences. + */ interface WithHostPoolReferences { /** * Specifies the hostPoolReferences property: List of ScalingHostPoolReference definitions.. - * + * * @param hostPoolReferences List of ScalingHostPoolReference definitions. * @return the next definition stage. */ @@ -421,109 +447,122 @@ interface WithHostPoolReferences { /** * Begins update for the ScalingPlan resource. - * + * * @return the stage of resource update. */ ScalingPlan.Update update(); - /** The template for ScalingPlan update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithDescription, - UpdateStages.WithFriendlyName, - UpdateStages.WithTimeZone, - UpdateStages.WithExclusionTag, - UpdateStages.WithSchedules, - UpdateStages.WithHostPoolReferences { + /** + * The template for ScalingPlan update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, + UpdateStages.WithTimeZone, UpdateStages.WithExclusionTag, UpdateStages.WithSchedules, + UpdateStages.WithHostPoolReferences { /** * Executes the update request. - * + * * @return the updated resource. */ ScalingPlan apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ScalingPlan apply(Context context); } - /** The ScalingPlan update stages. */ + /** + * The ScalingPlan update stages. + */ interface UpdateStages { - /** The stage of the ScalingPlan update allowing to specify tags. */ + /** + * The stage of the ScalingPlan update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: tags to be updated. - * + * * @param tags tags to be updated. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the ScalingPlan update allowing to specify description. */ + /** + * The stage of the ScalingPlan update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of scaling plan.. - * + * * @param description Description of scaling plan. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the ScalingPlan update allowing to specify friendlyName. */ + /** + * The stage of the ScalingPlan update allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: User friendly name of scaling plan.. - * + * * @param friendlyName User friendly name of scaling plan. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); } - /** The stage of the ScalingPlan update allowing to specify timeZone. */ + /** + * The stage of the ScalingPlan update 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. */ Update withTimeZone(String timeZone); } - /** The stage of the ScalingPlan update allowing to specify exclusionTag. */ + /** + * The stage of the ScalingPlan update allowing to specify exclusionTag. + */ interface WithExclusionTag { /** * Specifies the exclusionTag property: Exclusion tag for scaling plan.. - * + * * @param exclusionTag Exclusion tag for scaling plan. * @return the next definition stage. */ Update withExclusionTag(String exclusionTag); } - /** The stage of the ScalingPlan update allowing to specify schedules. */ + /** + * The stage of the ScalingPlan update allowing to specify schedules. + */ interface WithSchedules { /** * Specifies the schedules property: List of ScalingSchedule definitions.. - * + * * @param schedules List of ScalingSchedule definitions. * @return the next definition stage. */ Update withSchedules(List schedules); } - /** The stage of the ScalingPlan update allowing to specify hostPoolReferences. */ + /** + * The stage of the ScalingPlan update allowing to specify hostPoolReferences. + */ interface WithHostPoolReferences { /** * Specifies the hostPoolReferences property: List of ScalingHostPoolReference definitions.. - * + * * @param hostPoolReferences List of ScalingHostPoolReference definitions. * @return the next definition stage. */ @@ -533,14 +572,14 @@ interface WithHostPoolReferences { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ScalingPlan refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ 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 b27ef7c0f7f9..2591f8ecf4c4 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 @@ -11,8 +11,8 @@ /** * ScalingPlanList - * - *

List of scaling plan definitions. + * + * List of scaling plan definitions. */ @Fluent public final class ScalingPlanList { @@ -28,13 +28,15 @@ public final class ScalingPlanList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ScalingPlanList class. */ + /** + * Creates an instance of ScalingPlanList class. + */ public ScalingPlanList() { } /** * Get the value property: List of scaling plan definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of scaling plan definitions. - * + * * @param value the value value to set. * @return the ScalingPlanList object itself. */ @@ -54,7 +56,7 @@ public ScalingPlanList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/ScalingPlanPatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPatch.java index 381e4a076f8c..9f68d920d3ac 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 @@ -11,7 +11,9 @@ import java.util.List; import java.util.Map; -/** Scaling plan properties that can be patched. */ +/** + * Scaling plan properties that can be patched. + */ @Fluent public final class ScalingPlanPatch { /* @@ -27,13 +29,15 @@ public final class ScalingPlanPatch { @JsonProperty(value = "properties") private ScalingPlanPatchProperties innerProperties; - /** Creates an instance of ScalingPlanPatch class. */ + /** + * Creates an instance of ScalingPlanPatch class. + */ public ScalingPlanPatch() { } /** * Get the tags property: tags to be updated. - * + * * @return the tags value. */ public Map tags() { @@ -42,7 +46,7 @@ public Map tags() { /** * Set the tags property: tags to be updated. - * + * * @param tags the tags value to set. * @return the ScalingPlanPatch object itself. */ @@ -53,7 +57,7 @@ public ScalingPlanPatch withTags(Map tags) { /** * Get the innerProperties property: Detailed properties for scaling plan. - * + * * @return the innerProperties value. */ private ScalingPlanPatchProperties innerProperties() { @@ -62,7 +66,7 @@ private ScalingPlanPatchProperties innerProperties() { /** * Get the description property: Description of scaling plan. - * + * * @return the description value. */ public String description() { @@ -71,7 +75,7 @@ public String description() { /** * Set the description property: Description of scaling plan. - * + * * @param description the description value to set. * @return the ScalingPlanPatch object itself. */ @@ -85,7 +89,7 @@ public ScalingPlanPatch withDescription(String description) { /** * Get the friendlyName property: User friendly name of scaling plan. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -94,7 +98,7 @@ public String friendlyName() { /** * Set the friendlyName property: User friendly name of scaling plan. - * + * * @param friendlyName the friendlyName value to set. * @return the ScalingPlanPatch object itself. */ @@ -108,7 +112,7 @@ public ScalingPlanPatch withFriendlyName(String friendlyName) { /** * Get the timeZone property: Timezone of the scaling plan. - * + * * @return the timeZone value. */ public String timeZone() { @@ -117,7 +121,7 @@ public String timeZone() { /** * Set the timeZone property: Timezone of the scaling plan. - * + * * @param timeZone the timeZone value to set. * @return the ScalingPlanPatch object itself. */ @@ -131,7 +135,7 @@ public ScalingPlanPatch withTimeZone(String timeZone) { /** * Get the exclusionTag property: Exclusion tag for scaling plan. - * + * * @return the exclusionTag value. */ public String exclusionTag() { @@ -140,7 +144,7 @@ public String exclusionTag() { /** * Set the exclusionTag property: Exclusion tag for scaling plan. - * + * * @param exclusionTag the exclusionTag value to set. * @return the ScalingPlanPatch object itself. */ @@ -154,7 +158,7 @@ public ScalingPlanPatch withExclusionTag(String exclusionTag) { /** * Get the schedules property: List of ScalingSchedule definitions. - * + * * @return the schedules value. */ public List schedules() { @@ -163,7 +167,7 @@ public List schedules() { /** * Set the schedules property: List of ScalingSchedule definitions. - * + * * @param schedules the schedules value to set. * @return the ScalingPlanPatch object itself. */ @@ -177,7 +181,7 @@ public ScalingPlanPatch withSchedules(List schedules) { /** * Get the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @return the hostPoolReferences value. */ public List hostPoolReferences() { @@ -186,7 +190,7 @@ public List hostPoolReferences() { /** * Set the hostPoolReferences property: List of ScalingHostPoolReference definitions. - * + * * @param hostPoolReferences the hostPoolReferences value to set. * @return the ScalingPlanPatch object itself. */ @@ -200,7 +204,7 @@ public ScalingPlanPatch withHostPoolReferences(List ho /** * 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/ScalingPlanPersonalSchedule.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedule.java index 7a899c03a48e..5db3c022ee7d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedule.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedule.java @@ -9,46 +9,48 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; import java.util.List; -/** An immutable client-side representation of ScalingPlanPersonalSchedule. */ +/** + * An immutable client-side representation of ScalingPlanPersonalSchedule. + */ public interface ScalingPlanPersonalSchedule { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @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(); @@ -56,7 +58,7 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms * in the hostpool. - * + * * @return the rampUpAutoStartHosts value. */ StartupBehavior rampUpAutoStartHosts(); @@ -65,14 +67,14 @@ public interface ScalingPlanPersonalSchedule { * Gets the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by * turning them on manually. - * + * * @return the rampUpStartVMOnConnect value. */ SetStartVMOnConnect rampUpStartVMOnConnect(); /** * Gets the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. - * + * * @return the rampUpActionOnDisconnect value. */ SessionHandlingOperation rampUpActionOnDisconnect(); @@ -80,14 +82,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnDisconnect value. */ Integer rampUpMinutesToWaitOnDisconnect(); /** * Gets the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. - * + * * @return the rampUpActionOnLogoff value. */ SessionHandlingOperation rampUpActionOnLogoff(); @@ -95,14 +97,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnLogoff value. */ Integer rampUpMinutesToWaitOnLogoff(); /** * Gets the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ Time peakStartTime(); @@ -110,14 +112,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the peak phase. - * + * * @return the peakStartVMOnConnect value. */ SetStartVMOnConnect peakStartVMOnConnect(); /** * Gets the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. - * + * * @return the peakActionOnDisconnect value. */ SessionHandlingOperation peakActionOnDisconnect(); @@ -125,14 +127,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the peak period. - * + * * @return the peakMinutesToWaitOnDisconnect value. */ Integer peakMinutesToWaitOnDisconnect(); /** * Gets the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. - * + * * @return the peakActionOnLogoff value. */ SessionHandlingOperation peakActionOnLogoff(); @@ -140,14 +142,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the peak period. - * + * * @return the peakMinutesToWaitOnLogoff value. */ Integer peakMinutesToWaitOnLogoff(); /** * Gets the rampDownStartTime property: Starting time for ramp down period. - * + * * @return the rampDownStartTime value. */ Time rampDownStartTime(); @@ -155,7 +157,7 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp down phase. - * + * * @return the rampDownStartVMOnConnect value. */ SetStartVMOnConnect rampDownStartVMOnConnect(); @@ -163,7 +165,7 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down * period. - * + * * @return the rampDownActionOnDisconnect value. */ SessionHandlingOperation rampDownActionOnDisconnect(); @@ -171,14 +173,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnDisconnect value. */ Integer rampDownMinutesToWaitOnDisconnect(); /** * Gets the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. - * + * * @return the rampDownActionOnLogoff value. */ SessionHandlingOperation rampDownActionOnLogoff(); @@ -186,14 +188,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired * session handling action when a user logs off during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnLogoff value. */ Integer rampDownMinutesToWaitOnLogoff(); /** * Gets the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ Time offPeakStartTime(); @@ -201,7 +203,7 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the off-peak phase. - * + * * @return the offPeakStartVMOnConnect value. */ SetStartVMOnConnect offPeakStartVMOnConnect(); @@ -209,7 +211,7 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak * period. - * + * * @return the offPeakActionOnDisconnect value. */ SessionHandlingOperation offPeakActionOnDisconnect(); @@ -217,14 +219,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnDisconnect value. */ Integer offPeakMinutesToWaitOnDisconnect(); /** * Gets the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. - * + * * @return the offPeakActionOnLogoff value. */ SessionHandlingOperation offPeakActionOnLogoff(); @@ -232,14 +234,14 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnLogoff value. */ Integer offPeakMinutesToWaitOnLogoff(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); @@ -247,27 +249,35 @@ public interface ScalingPlanPersonalSchedule { /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner * object. - * + * * @return the inner object. */ ScalingPlanPersonalScheduleInner innerModel(); - /** The entirety of the ScalingPlanPersonalSchedule definition. */ + /** + * The entirety of the ScalingPlanPersonalSchedule definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ScalingPlanPersonalSchedule definition stages. */ + /** + * The ScalingPlanPersonalSchedule definition stages. + */ interface DefinitionStages { - /** The first stage of the ScalingPlanPersonalSchedule definition. */ + /** + * The first stage of the ScalingPlanPersonalSchedule definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify parent resource. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, scalingPlanName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @return the next definition stage. @@ -279,105 +289,101 @@ interface WithParentResource { * The stage of the ScalingPlanPersonalSchedule definition which contains all the minimum required properties * for the resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithDaysOfWeek, - DefinitionStages.WithRampUpStartTime, - DefinitionStages.WithRampUpAutoStartHosts, - DefinitionStages.WithRampUpStartVMOnConnect, - DefinitionStages.WithRampUpActionOnDisconnect, - DefinitionStages.WithRampUpMinutesToWaitOnDisconnect, - DefinitionStages.WithRampUpActionOnLogoff, - DefinitionStages.WithRampUpMinutesToWaitOnLogoff, - DefinitionStages.WithPeakStartTime, - DefinitionStages.WithPeakStartVMOnConnect, - DefinitionStages.WithPeakActionOnDisconnect, - DefinitionStages.WithPeakMinutesToWaitOnDisconnect, - DefinitionStages.WithPeakActionOnLogoff, - DefinitionStages.WithPeakMinutesToWaitOnLogoff, - DefinitionStages.WithRampDownStartTime, - DefinitionStages.WithRampDownStartVMOnConnect, - DefinitionStages.WithRampDownActionOnDisconnect, - DefinitionStages.WithRampDownMinutesToWaitOnDisconnect, - DefinitionStages.WithRampDownActionOnLogoff, - DefinitionStages.WithRampDownMinutesToWaitOnLogoff, - DefinitionStages.WithOffPeakStartTime, - DefinitionStages.WithOffPeakStartVMOnConnect, - DefinitionStages.WithOffPeakActionOnDisconnect, - DefinitionStages.WithOffPeakMinutesToWaitOnDisconnect, - DefinitionStages.WithOffPeakActionOnLogoff, - DefinitionStages.WithOffPeakMinutesToWaitOnLogoff { + interface WithCreate extends DefinitionStages.WithDaysOfWeek, DefinitionStages.WithRampUpStartTime, + DefinitionStages.WithRampUpAutoStartHosts, DefinitionStages.WithRampUpStartVMOnConnect, + DefinitionStages.WithRampUpActionOnDisconnect, DefinitionStages.WithRampUpMinutesToWaitOnDisconnect, + DefinitionStages.WithRampUpActionOnLogoff, DefinitionStages.WithRampUpMinutesToWaitOnLogoff, + DefinitionStages.WithPeakStartTime, DefinitionStages.WithPeakStartVMOnConnect, + DefinitionStages.WithPeakActionOnDisconnect, DefinitionStages.WithPeakMinutesToWaitOnDisconnect, + DefinitionStages.WithPeakActionOnLogoff, DefinitionStages.WithPeakMinutesToWaitOnLogoff, + DefinitionStages.WithRampDownStartTime, DefinitionStages.WithRampDownStartVMOnConnect, + DefinitionStages.WithRampDownActionOnDisconnect, DefinitionStages.WithRampDownMinutesToWaitOnDisconnect, + DefinitionStages.WithRampDownActionOnLogoff, DefinitionStages.WithRampDownMinutesToWaitOnLogoff, + DefinitionStages.WithOffPeakStartTime, DefinitionStages.WithOffPeakStartVMOnConnect, + DefinitionStages.WithOffPeakActionOnDisconnect, DefinitionStages.WithOffPeakMinutesToWaitOnDisconnect, + DefinitionStages.WithOffPeakActionOnLogoff, DefinitionStages.WithOffPeakMinutesToWaitOnLogoff { /** * Executes the create request. - * + * * @return the created resource. */ ScalingPlanPersonalSchedule create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ScalingPlanPersonalSchedule create(Context context); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify daysOfWeek. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify daysOfWeek. + */ interface WithDaysOfWeek { /** * Specifies the daysOfWeek property: Set of days of the week on which this schedule is active.. - * + * * @param daysOfWeek Set of days of the week on which this schedule is active. * @return the next definition stage. */ WithCreate withDaysOfWeek(List daysOfWeek); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpStartTime. + */ interface WithRampUpStartTime { /** * Specifies the rampUpStartTime property: Starting time for ramp up period.. - * + * * @param rampUpStartTime Starting time for ramp up period. * @return the next definition stage. */ WithCreate withRampUpStartTime(Time rampUpStartTime); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpAutoStartHosts. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpAutoStartHosts. + */ interface WithRampUpAutoStartHosts { /** * Specifies the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for * personal vms in the hostpool.. - * + * * @param rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in - * the hostpool. + * the hostpool. * @return the next definition stage. */ WithCreate withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpStartVMOnConnect. + */ interface WithRampUpStartVMOnConnect { /** * Specifies the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using * rampUpAutoStartHosts or by turning them on manually.. - * + * * @param rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during - * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or - * by turning them on manually. + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by + * turning them on manually. * @return the next definition stage. */ WithCreate withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpActionOnDisconnect. + */ interface WithRampUpActionOnDisconnect { /** * Specifies the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the * ramp up period.. - * + * * @param rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period. * @return the next definition stage. */ @@ -391,69 +397,79 @@ interface WithRampUpMinutesToWaitOnDisconnect { /** * Specifies the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the * desired session handling action when a user disconnects during the ramp up period.. - * + * * @param rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session - * handling action when a user disconnects during the ramp up period. + * handling action when a user disconnects during the ramp up period. * @return the next definition stage. */ WithCreate withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpActionOnLogoff. + */ interface WithRampUpActionOnLogoff { /** * Specifies the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up * period.. - * + * * @param rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period. * @return the next definition stage. */ WithCreate withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpMinutesToWaitOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampUpMinutesToWaitOnLogoff. + */ interface WithRampUpMinutesToWaitOnLogoff { /** * Specifies the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the ramp up period.. - * + * * @param rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the ramp up period. + * handling action when a user logs off during the ramp up period. * @return the next definition stage. */ WithCreate withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakStartTime. + */ interface WithPeakStartTime { /** * Specifies the peakStartTime property: Starting time for peak period.. - * + * * @param peakStartTime Starting time for peak period. * @return the next definition stage. */ WithCreate withPeakStartTime(Time peakStartTime); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakStartVMOnConnect. + */ interface WithPeakStartVMOnConnect { /** * Specifies the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the peak phase.. - * + * * @param peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the - * peak phase. + * peak phase. * @return the next definition stage. */ WithCreate withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakActionOnDisconnect. + */ interface WithPeakActionOnDisconnect { /** * Specifies the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak * period.. - * + * * @param peakActionOnDisconnect Action to be taken after a user disconnect during the peak period. * @return the next definition stage. */ @@ -467,68 +483,78 @@ interface WithPeakMinutesToWaitOnDisconnect { /** * Specifies the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the * desired session handling action when a user disconnects during the peak period.. - * + * * @param peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session - * handling action when a user disconnects during the peak period. + * handling action when a user disconnects during the peak period. * @return the next definition stage. */ WithCreate withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakActionOnLogoff. + */ interface WithPeakActionOnLogoff { /** * Specifies the peakActionOnLogoff property: Action to be taken after a logoff during the peak period.. - * + * * @param peakActionOnLogoff Action to be taken after a logoff during the peak period. * @return the next definition stage. */ WithCreate withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakMinutesToWaitOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify peakMinutesToWaitOnLogoff. + */ interface WithPeakMinutesToWaitOnLogoff { /** * Specifies the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the peak period.. - * + * * @param peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the peak period. + * handling action when a user logs off during the peak period. * @return the next definition stage. */ WithCreate withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownStartTime. + */ interface WithRampDownStartTime { /** * Specifies the rampDownStartTime property: Starting time for ramp down period.. - * + * * @param rampDownStartTime Starting time for ramp down period. * @return the next definition stage. */ WithCreate withRampDownStartTime(Time rampDownStartTime); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownStartVMOnConnect. + */ interface WithRampDownStartVMOnConnect { /** * Specifies the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the ramp down phase.. - * + * * @param rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during - * the ramp down phase. + * the ramp down phase. * @return the next definition stage. */ WithCreate withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownActionOnDisconnect. + */ interface WithRampDownActionOnDisconnect { /** * Specifies the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the * ramp down period.. - * + * * @param rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period. * @return the next definition stage. */ @@ -543,20 +569,22 @@ interface WithRampDownMinutesToWaitOnDisconnect { /** * Specifies the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing * the desired session handling action when a user disconnects during the ramp down period.. - * + * * @param rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired - * session handling action when a user disconnects during the ramp down period. + * session handling action when a user disconnects during the ramp down period. * @return the next definition stage. */ WithCreate withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify rampDownActionOnLogoff. + */ interface WithRampDownActionOnLogoff { /** * Specifies the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down * period.. - * + * * @param rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period. * @return the next definition stage. */ @@ -570,44 +598,50 @@ interface WithRampDownMinutesToWaitOnLogoff { /** * Specifies the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the ramp down period.. - * + * * @param rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the ramp down period. + * handling action when a user logs off during the ramp down period. * @return the next definition stage. */ WithCreate withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakStartTime. + */ interface WithOffPeakStartTime { /** * Specifies the offPeakStartTime property: Starting time for off-peak period.. - * + * * @param offPeakStartTime Starting time for off-peak period. * @return the next definition stage. */ WithCreate withOffPeakStartTime(Time offPeakStartTime); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakStartVMOnConnect. + */ interface WithOffPeakStartVMOnConnect { /** * Specifies the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the off-peak phase.. - * + * * @param offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during - * the off-peak phase. + * the off-peak phase. * @return the next definition stage. */ WithCreate withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakActionOnDisconnect. + */ interface WithOffPeakActionOnDisconnect { /** * Specifies the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the * off-peak period.. - * + * * @param offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period. * @return the next definition stage. */ @@ -621,34 +655,38 @@ interface WithOffPeakMinutesToWaitOnDisconnect { /** * Specifies the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing * the desired session handling action when a user disconnects during the off-peak period.. - * + * * @param offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session - * handling action when a user disconnects during the off-peak period. + * handling action when a user disconnects during the off-peak period. * @return the next definition stage. */ WithCreate withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakActionOnLogoff. + */ interface WithOffPeakActionOnLogoff { /** * Specifies the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak * period.. - * + * * @param offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period. * @return the next definition stage. */ WithCreate withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakMinutesToWaitOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule definition allowing to specify offPeakMinutesToWaitOnLogoff. + */ interface WithOffPeakMinutesToWaitOnLogoff { /** * Specifies the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the off-peak period.. - * + * * @param offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the off-peak period. + * handling action when a user logs off during the off-peak period. * @return the next definition stage. */ WithCreate withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff); @@ -657,260 +695,284 @@ interface WithOffPeakMinutesToWaitOnLogoff { /** * Begins update for the ScalingPlanPersonalSchedule resource. - * + * * @return the stage of resource update. */ ScalingPlanPersonalSchedule.Update update(); - /** The template for ScalingPlanPersonalSchedule update. */ - interface Update - extends UpdateStages.WithDaysOfWeek, - UpdateStages.WithRampUpStartTime, - UpdateStages.WithRampUpAutoStartHosts, - UpdateStages.WithRampUpStartVMOnConnect, - UpdateStages.WithRampUpActionOnDisconnect, - UpdateStages.WithRampUpMinutesToWaitOnDisconnect, - UpdateStages.WithRampUpActionOnLogoff, - UpdateStages.WithRampUpMinutesToWaitOnLogoff, - UpdateStages.WithPeakStartTime, - UpdateStages.WithPeakStartVMOnConnect, - UpdateStages.WithPeakActionOnDisconnect, - UpdateStages.WithPeakMinutesToWaitOnDisconnect, - UpdateStages.WithPeakActionOnLogoff, - UpdateStages.WithPeakMinutesToWaitOnLogoff, - UpdateStages.WithRampDownStartTime, - UpdateStages.WithRampDownStartVMOnConnect, - UpdateStages.WithRampDownActionOnDisconnect, - UpdateStages.WithRampDownMinutesToWaitOnDisconnect, - UpdateStages.WithRampDownActionOnLogoff, - UpdateStages.WithRampDownMinutesToWaitOnLogoff, - UpdateStages.WithOffPeakStartTime, - UpdateStages.WithOffPeakStartVMOnConnect, - UpdateStages.WithOffPeakActionOnDisconnect, - UpdateStages.WithOffPeakMinutesToWaitOnDisconnect, - UpdateStages.WithOffPeakActionOnLogoff, - UpdateStages.WithOffPeakMinutesToWaitOnLogoff { + /** + * The template for ScalingPlanPersonalSchedule update. + */ + interface Update extends UpdateStages.WithDaysOfWeek, UpdateStages.WithRampUpStartTime, + UpdateStages.WithRampUpAutoStartHosts, UpdateStages.WithRampUpStartVMOnConnect, + UpdateStages.WithRampUpActionOnDisconnect, UpdateStages.WithRampUpMinutesToWaitOnDisconnect, + UpdateStages.WithRampUpActionOnLogoff, UpdateStages.WithRampUpMinutesToWaitOnLogoff, + UpdateStages.WithPeakStartTime, UpdateStages.WithPeakStartVMOnConnect, UpdateStages.WithPeakActionOnDisconnect, + UpdateStages.WithPeakMinutesToWaitOnDisconnect, UpdateStages.WithPeakActionOnLogoff, + UpdateStages.WithPeakMinutesToWaitOnLogoff, UpdateStages.WithRampDownStartTime, + UpdateStages.WithRampDownStartVMOnConnect, UpdateStages.WithRampDownActionOnDisconnect, + UpdateStages.WithRampDownMinutesToWaitOnDisconnect, UpdateStages.WithRampDownActionOnLogoff, + UpdateStages.WithRampDownMinutesToWaitOnLogoff, UpdateStages.WithOffPeakStartTime, + UpdateStages.WithOffPeakStartVMOnConnect, UpdateStages.WithOffPeakActionOnDisconnect, + UpdateStages.WithOffPeakMinutesToWaitOnDisconnect, UpdateStages.WithOffPeakActionOnLogoff, + UpdateStages.WithOffPeakMinutesToWaitOnLogoff { /** * Executes the update request. - * + * * @return the updated resource. */ ScalingPlanPersonalSchedule apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ScalingPlanPersonalSchedule apply(Context context); } - /** The ScalingPlanPersonalSchedule update stages. */ + /** + * The ScalingPlanPersonalSchedule update stages. + */ interface UpdateStages { - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify daysOfWeek. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify daysOfWeek. + */ interface WithDaysOfWeek { /** * Specifies the daysOfWeek property: Set of days of the week on which this schedule is active.. - * + * * @param daysOfWeek Set of days of the week on which this schedule is active. * @return the next definition stage. */ Update withDaysOfWeek(List daysOfWeek); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpStartTime. + */ interface WithRampUpStartTime { /** * Specifies the rampUpStartTime property: Starting time for ramp up period.. - * + * * @param rampUpStartTime Starting time for ramp up period. * @return the next definition stage. */ Update withRampUpStartTime(Time rampUpStartTime); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpAutoStartHosts. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpAutoStartHosts. + */ interface WithRampUpAutoStartHosts { /** * Specifies the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for * personal vms in the hostpool.. - * + * * @param rampUpAutoStartHosts The desired startup behavior during the ramp up period for personal vms in - * the hostpool. + * the hostpool. * @return the next definition stage. */ Update withRampUpAutoStartHosts(StartupBehavior rampUpAutoStartHosts); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpStartVMOnConnect. + */ interface WithRampUpStartVMOnConnect { /** * Specifies the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the ramp up phase. If this is disabled, session hosts must be turned on using * rampUpAutoStartHosts or by turning them on manually.. - * + * * @param rampUpStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during - * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or - * by turning them on manually. + * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by + * turning them on manually. * @return the next definition stage. */ Update withRampUpStartVMOnConnect(SetStartVMOnConnect rampUpStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpActionOnDisconnect. + */ interface WithRampUpActionOnDisconnect { /** * Specifies the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the * ramp up period.. - * + * * @param rampUpActionOnDisconnect Action to be taken after a user disconnect during the ramp up period. * @return the next definition stage. */ Update withRampUpActionOnDisconnect(SessionHandlingOperation rampUpActionOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpMinutesToWaitOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpMinutesToWaitOnDisconnect. + */ interface WithRampUpMinutesToWaitOnDisconnect { /** * Specifies the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the * desired session handling action when a user disconnects during the ramp up period.. - * + * * @param rampUpMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session - * handling action when a user disconnects during the ramp up period. + * handling action when a user disconnects during the ramp up period. * @return the next definition stage. */ Update withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpActionOnLogoff. + */ interface WithRampUpActionOnLogoff { /** * Specifies the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up * period.. - * + * * @param rampUpActionOnLogoff Action to be taken after a logoff during the ramp up period. * @return the next definition stage. */ Update withRampUpActionOnLogoff(SessionHandlingOperation rampUpActionOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpMinutesToWaitOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampUpMinutesToWaitOnLogoff. + */ interface WithRampUpMinutesToWaitOnLogoff { /** * Specifies the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the ramp up period.. - * + * * @param rampUpMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the ramp up period. + * handling action when a user logs off during the ramp up period. * @return the next definition stage. */ Update withRampUpMinutesToWaitOnLogoff(Integer rampUpMinutesToWaitOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify peakStartTime. + */ interface WithPeakStartTime { /** * Specifies the peakStartTime property: Starting time for peak period.. - * + * * @param peakStartTime Starting time for peak period. * @return the next definition stage. */ Update withPeakStartTime(Time peakStartTime); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify peakStartVMOnConnect. + */ interface WithPeakStartVMOnConnect { /** * Specifies the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the peak phase.. - * + * * @param peakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during the - * peak phase. + * peak phase. * @return the next definition stage. */ Update withPeakStartVMOnConnect(SetStartVMOnConnect peakStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify peakActionOnDisconnect. + */ interface WithPeakActionOnDisconnect { /** * Specifies the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak * period.. - * + * * @param peakActionOnDisconnect Action to be taken after a user disconnect during the peak period. * @return the next definition stage. */ Update withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakMinutesToWaitOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify peakMinutesToWaitOnDisconnect. + */ interface WithPeakMinutesToWaitOnDisconnect { /** * Specifies the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the * desired session handling action when a user disconnects during the peak period.. - * + * * @param peakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session - * handling action when a user disconnects during the peak period. + * handling action when a user disconnects during the peak period. * @return the next definition stage. */ Update withPeakMinutesToWaitOnDisconnect(Integer peakMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify peakActionOnLogoff. + */ interface WithPeakActionOnLogoff { /** * Specifies the peakActionOnLogoff property: Action to be taken after a logoff during the peak period.. - * + * * @param peakActionOnLogoff Action to be taken after a logoff during the peak period. * @return the next definition stage. */ Update withPeakActionOnLogoff(SessionHandlingOperation peakActionOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify peakMinutesToWaitOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify peakMinutesToWaitOnLogoff. + */ interface WithPeakMinutesToWaitOnLogoff { /** * Specifies the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the peak period.. - * + * * @param peakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the peak period. + * handling action when a user logs off during the peak period. * @return the next definition stage. */ Update withPeakMinutesToWaitOnLogoff(Integer peakMinutesToWaitOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownStartTime. + */ interface WithRampDownStartTime { /** * Specifies the rampDownStartTime property: Starting time for ramp down period.. - * + * * @param rampDownStartTime Starting time for ramp down period. * @return the next definition stage. */ Update withRampDownStartTime(Time rampDownStartTime); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownStartVMOnConnect. + */ interface WithRampDownStartVMOnConnect { /** * Specifies the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the ramp down phase.. - * + * * @param rampDownStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during - * the ramp down phase. + * the ramp down phase. * @return the next definition stage. */ Update withRampDownStartVMOnConnect(SetStartVMOnConnect rampDownStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownActionOnDisconnect. + */ interface WithRampDownActionOnDisconnect { /** * Specifies the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the * ramp down period.. - * + * * @param rampDownActionOnDisconnect Action to be taken after a user disconnect during the ramp down period. * @return the next definition stage. */ @@ -924,108 +986,124 @@ interface WithRampDownMinutesToWaitOnDisconnect { /** * Specifies the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing * the desired session handling action when a user disconnects during the ramp down period.. - * + * * @param rampDownMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired - * session handling action when a user disconnects during the ramp down period. + * session handling action when a user disconnects during the ramp down period. * @return the next definition stage. */ Update withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownActionOnLogoff. + */ interface WithRampDownActionOnLogoff { /** * Specifies the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down * period.. - * + * * @param rampDownActionOnLogoff Action to be taken after a logoff during the ramp down period. * @return the next definition stage. */ Update withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownMinutesToWaitOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify rampDownMinutesToWaitOnLogoff. + */ interface WithRampDownMinutesToWaitOnLogoff { /** * Specifies the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the ramp down period.. - * + * * @param rampDownMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the ramp down period. + * handling action when a user logs off during the ramp down period. * @return the next definition stage. */ Update withRampDownMinutesToWaitOnLogoff(Integer rampDownMinutesToWaitOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakStartTime. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakStartTime. + */ interface WithOffPeakStartTime { /** * Specifies the offPeakStartTime property: Starting time for off-peak period.. - * + * * @param offPeakStartTime Starting time for off-peak period. * @return the next definition stage. */ Update withOffPeakStartTime(Time offPeakStartTime); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakStartVMOnConnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakStartVMOnConnect. + */ interface WithOffPeakStartVMOnConnect { /** * Specifies the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the * hostpool during the off-peak phase.. - * + * * @param offPeakStartVMOnConnect The desired configuration of Start VM On Connect for the hostpool during - * the off-peak phase. + * the off-peak phase. * @return the next definition stage. */ Update withOffPeakStartVMOnConnect(SetStartVMOnConnect offPeakStartVMOnConnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakActionOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakActionOnDisconnect. + */ interface WithOffPeakActionOnDisconnect { /** * Specifies the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the * off-peak period.. - * + * * @param offPeakActionOnDisconnect Action to be taken after a user disconnect during the off-peak period. * @return the next definition stage. */ Update withOffPeakActionOnDisconnect(SessionHandlingOperation offPeakActionOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakMinutesToWaitOnDisconnect. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakMinutesToWaitOnDisconnect. + */ interface WithOffPeakMinutesToWaitOnDisconnect { /** * Specifies the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing * the desired session handling action when a user disconnects during the off-peak period.. - * + * * @param offPeakMinutesToWaitOnDisconnect The time in minutes to wait before performing the desired session - * handling action when a user disconnects during the off-peak period. + * handling action when a user disconnects during the off-peak period. * @return the next definition stage. */ Update withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakActionOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakActionOnLogoff. + */ interface WithOffPeakActionOnLogoff { /** * Specifies the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak * period.. - * + * * @param offPeakActionOnLogoff Action to be taken after a logoff during the off-peak period. * @return the next definition stage. */ Update withOffPeakActionOnLogoff(SessionHandlingOperation offPeakActionOnLogoff); } - /** The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakMinutesToWaitOnLogoff. */ + /** + * The stage of the ScalingPlanPersonalSchedule update allowing to specify offPeakMinutesToWaitOnLogoff. + */ interface WithOffPeakMinutesToWaitOnLogoff { /** * Specifies the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the * desired session handling action when a user logs off during the off-peak period.. - * + * * @param offPeakMinutesToWaitOnLogoff The time in minutes to wait before performing the desired session - * handling action when a user logs off during the off-peak period. + * handling action when a user logs off during the off-peak period. * @return the next definition stage. */ Update withOffPeakMinutesToWaitOnLogoff(Integer offPeakMinutesToWaitOnLogoff); @@ -1034,14 +1112,14 @@ interface WithOffPeakMinutesToWaitOnLogoff { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ScalingPlanPersonalSchedule refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java index 80e3f211b2c4..fd9cb3315e90 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalScheduleList.java @@ -11,8 +11,8 @@ /** * ScalingPlanPersonalScheduleList - * - *

List of ScalingPlanPersonalSchedule definitions. + * + * List of ScalingPlanPersonalSchedule definitions. */ @Fluent public final class ScalingPlanPersonalScheduleList { @@ -28,13 +28,15 @@ public final class ScalingPlanPersonalScheduleList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ScalingPlanPersonalScheduleList class. */ + /** + * Creates an instance of ScalingPlanPersonalScheduleList class. + */ public ScalingPlanPersonalScheduleList() { } /** * Get the value property: List of ScalingPlanPersonalSchedule definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of ScalingPlanPersonalSchedule definitions. - * + * * @param value the value value to set. * @return the ScalingPlanPersonalScheduleList object itself. */ @@ -54,7 +56,7 @@ public ScalingPlanPersonalScheduleList withValue(List daysOfWeek() { @@ -42,7 +46,7 @@ public List daysOfWeek() { /** * Set the daysOfWeek property: Set of days of the week on which this schedule is active. - * + * * @param daysOfWeek the daysOfWeek value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -56,7 +60,7 @@ public ScalingPlanPersonalSchedulePatch withDaysOfWeek(List daysOfWee /** * Get the rampUpStartTime property: Starting time for ramp up period. - * + * * @return the rampUpStartTime value. */ public Time rampUpStartTime() { @@ -65,7 +69,7 @@ public Time rampUpStartTime() { /** * Set the rampUpStartTime property: Starting time for ramp up period. - * + * * @param rampUpStartTime the rampUpStartTime value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -80,7 +84,7 @@ public ScalingPlanPersonalSchedulePatch withRampUpStartTime(Time rampUpStartTime /** * Get the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in * the hostpool. - * + * * @return the rampUpAutoStartHosts value. */ public StartupBehavior rampUpAutoStartHosts() { @@ -90,7 +94,7 @@ public StartupBehavior rampUpAutoStartHosts() { /** * Set the rampUpAutoStartHosts property: The desired startup behavior during the ramp up period for personal vms in * the hostpool. - * + * * @param rampUpAutoStartHosts the rampUpAutoStartHosts value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -106,7 +110,7 @@ public ScalingPlanPersonalSchedulePatch withRampUpAutoStartHosts(StartupBehavior * Get the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning * them on manually. - * + * * @return the rampUpStartVMOnConnect value. */ public SetStartVMOnConnect rampUpStartVMOnConnect() { @@ -117,7 +121,7 @@ public SetStartVMOnConnect rampUpStartVMOnConnect() { * Set the rampUpStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the ramp up phase. If this is disabled, session hosts must be turned on using rampUpAutoStartHosts or by turning * them on manually. - * + * * @param rampUpStartVMOnConnect the rampUpStartVMOnConnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -131,7 +135,7 @@ public ScalingPlanPersonalSchedulePatch withRampUpStartVMOnConnect(SetStartVMOnC /** * Get the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. - * + * * @return the rampUpActionOnDisconnect value. */ public SessionHandlingOperation rampUpActionOnDisconnect() { @@ -140,12 +144,12 @@ public SessionHandlingOperation rampUpActionOnDisconnect() { /** * Set the rampUpActionOnDisconnect property: Action to be taken after a user disconnect during the ramp up period. - * + * * @param rampUpActionOnDisconnect the rampUpActionOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withRampUpActionOnDisconnect( - SessionHandlingOperation rampUpActionOnDisconnect) { + public ScalingPlanPersonalSchedulePatch + withRampUpActionOnDisconnect(SessionHandlingOperation rampUpActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -156,7 +160,7 @@ public ScalingPlanPersonalSchedulePatch withRampUpActionOnDisconnect( /** * Get the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnDisconnect value. */ public Integer rampUpMinutesToWaitOnDisconnect() { @@ -166,12 +170,12 @@ public Integer rampUpMinutesToWaitOnDisconnect() { /** * Set the rampUpMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp up period. - * + * * @param rampUpMinutesToWaitOnDisconnect the rampUpMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withRampUpMinutesToWaitOnDisconnect( - Integer rampUpMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalSchedulePatch + withRampUpMinutesToWaitOnDisconnect(Integer rampUpMinutesToWaitOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -181,7 +185,7 @@ public ScalingPlanPersonalSchedulePatch withRampUpMinutesToWaitOnDisconnect( /** * Get the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. - * + * * @return the rampUpActionOnLogoff value. */ public SessionHandlingOperation rampUpActionOnLogoff() { @@ -190,7 +194,7 @@ public SessionHandlingOperation rampUpActionOnLogoff() { /** * Set the rampUpActionOnLogoff property: Action to be taken after a logoff during the ramp up period. - * + * * @param rampUpActionOnLogoff the rampUpActionOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -205,7 +209,7 @@ public ScalingPlanPersonalSchedulePatch withRampUpActionOnLogoff(SessionHandling /** * Get the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp up period. - * + * * @return the rampUpMinutesToWaitOnLogoff value. */ public Integer rampUpMinutesToWaitOnLogoff() { @@ -215,7 +219,7 @@ public Integer rampUpMinutesToWaitOnLogoff() { /** * Set the rampUpMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp up period. - * + * * @param rampUpMinutesToWaitOnLogoff the rampUpMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -229,7 +233,7 @@ public ScalingPlanPersonalSchedulePatch withRampUpMinutesToWaitOnLogoff(Integer /** * Get the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ public Time peakStartTime() { @@ -238,7 +242,7 @@ public Time peakStartTime() { /** * Set the peakStartTime property: Starting time for peak period. - * + * * @param peakStartTime the peakStartTime value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -253,7 +257,7 @@ public ScalingPlanPersonalSchedulePatch withPeakStartTime(Time peakStartTime) { /** * Get the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the peak phase. - * + * * @return the peakStartVMOnConnect value. */ public SetStartVMOnConnect peakStartVMOnConnect() { @@ -263,7 +267,7 @@ public SetStartVMOnConnect peakStartVMOnConnect() { /** * Set the peakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool during * the peak phase. - * + * * @param peakStartVMOnConnect the peakStartVMOnConnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -277,7 +281,7 @@ public ScalingPlanPersonalSchedulePatch withPeakStartVMOnConnect(SetStartVMOnCon /** * Get the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. - * + * * @return the peakActionOnDisconnect value. */ public SessionHandlingOperation peakActionOnDisconnect() { @@ -286,12 +290,12 @@ public SessionHandlingOperation peakActionOnDisconnect() { /** * Set the peakActionOnDisconnect property: Action to be taken after a user disconnect during the peak period. - * + * * @param peakActionOnDisconnect the peakActionOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withPeakActionOnDisconnect( - SessionHandlingOperation peakActionOnDisconnect) { + public ScalingPlanPersonalSchedulePatch + withPeakActionOnDisconnect(SessionHandlingOperation peakActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -302,7 +306,7 @@ public ScalingPlanPersonalSchedulePatch withPeakActionOnDisconnect( /** * Get the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session * handling action when a user disconnects during the peak period. - * + * * @return the peakMinutesToWaitOnDisconnect value. */ public Integer peakMinutesToWaitOnDisconnect() { @@ -312,7 +316,7 @@ public Integer peakMinutesToWaitOnDisconnect() { /** * Set the peakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired session * handling action when a user disconnects during the peak period. - * + * * @param peakMinutesToWaitOnDisconnect the peakMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -326,7 +330,7 @@ public ScalingPlanPersonalSchedulePatch withPeakMinutesToWaitOnDisconnect(Intege /** * Get the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. - * + * * @return the peakActionOnLogoff value. */ public SessionHandlingOperation peakActionOnLogoff() { @@ -335,7 +339,7 @@ public SessionHandlingOperation peakActionOnLogoff() { /** * Set the peakActionOnLogoff property: Action to be taken after a logoff during the peak period. - * + * * @param peakActionOnLogoff the peakActionOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -350,7 +354,7 @@ public ScalingPlanPersonalSchedulePatch withPeakActionOnLogoff(SessionHandlingOp /** * Get the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the peak period. - * + * * @return the peakMinutesToWaitOnLogoff value. */ public Integer peakMinutesToWaitOnLogoff() { @@ -360,7 +364,7 @@ public Integer peakMinutesToWaitOnLogoff() { /** * Set the peakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the peak period. - * + * * @param peakMinutesToWaitOnLogoff the peakMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -374,7 +378,7 @@ public ScalingPlanPersonalSchedulePatch withPeakMinutesToWaitOnLogoff(Integer pe /** * Get the rampDownStartTime property: Starting time for ramp down period. - * + * * @return the rampDownStartTime value. */ public Time rampDownStartTime() { @@ -383,7 +387,7 @@ public Time rampDownStartTime() { /** * Set the rampDownStartTime property: Starting time for ramp down period. - * + * * @param rampDownStartTime the rampDownStartTime value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -398,7 +402,7 @@ public ScalingPlanPersonalSchedulePatch withRampDownStartTime(Time rampDownStart /** * Get the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp down phase. - * + * * @return the rampDownStartVMOnConnect value. */ public SetStartVMOnConnect rampDownStartVMOnConnect() { @@ -408,7 +412,7 @@ public SetStartVMOnConnect rampDownStartVMOnConnect() { /** * Set the rampDownStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the ramp down phase. - * + * * @param rampDownStartVMOnConnect the rampDownStartVMOnConnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -423,7 +427,7 @@ public ScalingPlanPersonalSchedulePatch withRampDownStartVMOnConnect(SetStartVMO /** * Get the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down * period. - * + * * @return the rampDownActionOnDisconnect value. */ public SessionHandlingOperation rampDownActionOnDisconnect() { @@ -433,12 +437,12 @@ public SessionHandlingOperation rampDownActionOnDisconnect() { /** * Set the rampDownActionOnDisconnect property: Action to be taken after a user disconnect during the ramp down * period. - * + * * @param rampDownActionOnDisconnect the rampDownActionOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withRampDownActionOnDisconnect( - SessionHandlingOperation rampDownActionOnDisconnect) { + public ScalingPlanPersonalSchedulePatch + withRampDownActionOnDisconnect(SessionHandlingOperation rampDownActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -449,7 +453,7 @@ public ScalingPlanPersonalSchedulePatch withRampDownActionOnDisconnect( /** * Get the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnDisconnect value. */ public Integer rampDownMinutesToWaitOnDisconnect() { @@ -459,12 +463,12 @@ public Integer rampDownMinutesToWaitOnDisconnect() { /** * Set the rampDownMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the ramp down period. - * + * * @param rampDownMinutesToWaitOnDisconnect the rampDownMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withRampDownMinutesToWaitOnDisconnect( - Integer rampDownMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalSchedulePatch + withRampDownMinutesToWaitOnDisconnect(Integer rampDownMinutesToWaitOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -474,7 +478,7 @@ public ScalingPlanPersonalSchedulePatch withRampDownMinutesToWaitOnDisconnect( /** * Get the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. - * + * * @return the rampDownActionOnLogoff value. */ public SessionHandlingOperation rampDownActionOnLogoff() { @@ -483,12 +487,12 @@ public SessionHandlingOperation rampDownActionOnLogoff() { /** * Set the rampDownActionOnLogoff property: Action to be taken after a logoff during the ramp down period. - * + * * @param rampDownActionOnLogoff the rampDownActionOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withRampDownActionOnLogoff( - SessionHandlingOperation rampDownActionOnLogoff) { + public ScalingPlanPersonalSchedulePatch + withRampDownActionOnLogoff(SessionHandlingOperation rampDownActionOnLogoff) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -499,7 +503,7 @@ public ScalingPlanPersonalSchedulePatch withRampDownActionOnLogoff( /** * Get the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp down period. - * + * * @return the rampDownMinutesToWaitOnLogoff value. */ public Integer rampDownMinutesToWaitOnLogoff() { @@ -509,7 +513,7 @@ public Integer rampDownMinutesToWaitOnLogoff() { /** * Set the rampDownMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the ramp down period. - * + * * @param rampDownMinutesToWaitOnLogoff the rampDownMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -523,7 +527,7 @@ public ScalingPlanPersonalSchedulePatch withRampDownMinutesToWaitOnLogoff(Intege /** * Get the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ public Time offPeakStartTime() { @@ -532,7 +536,7 @@ public Time offPeakStartTime() { /** * Set the offPeakStartTime property: Starting time for off-peak period. - * + * * @param offPeakStartTime the offPeakStartTime value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -547,7 +551,7 @@ public ScalingPlanPersonalSchedulePatch withOffPeakStartTime(Time offPeakStartTi /** * Get the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the off-peak phase. - * + * * @return the offPeakStartVMOnConnect value. */ public SetStartVMOnConnect offPeakStartVMOnConnect() { @@ -557,7 +561,7 @@ public SetStartVMOnConnect offPeakStartVMOnConnect() { /** * Set the offPeakStartVMOnConnect property: The desired configuration of Start VM On Connect for the hostpool * during the off-peak phase. - * + * * @param offPeakStartVMOnConnect the offPeakStartVMOnConnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -572,7 +576,7 @@ public ScalingPlanPersonalSchedulePatch withOffPeakStartVMOnConnect(SetStartVMOn /** * Get the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak * period. - * + * * @return the offPeakActionOnDisconnect value. */ public SessionHandlingOperation offPeakActionOnDisconnect() { @@ -582,12 +586,12 @@ public SessionHandlingOperation offPeakActionOnDisconnect() { /** * Set the offPeakActionOnDisconnect property: Action to be taken after a user disconnect during the off-peak * period. - * + * * @param offPeakActionOnDisconnect the offPeakActionOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withOffPeakActionOnDisconnect( - SessionHandlingOperation offPeakActionOnDisconnect) { + public ScalingPlanPersonalSchedulePatch + withOffPeakActionOnDisconnect(SessionHandlingOperation offPeakActionOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -598,7 +602,7 @@ public ScalingPlanPersonalSchedulePatch withOffPeakActionOnDisconnect( /** * Get the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnDisconnect value. */ public Integer offPeakMinutesToWaitOnDisconnect() { @@ -608,12 +612,12 @@ public Integer offPeakMinutesToWaitOnDisconnect() { /** * Set the offPeakMinutesToWaitOnDisconnect property: The time in minutes to wait before performing the desired * session handling action when a user disconnects during the off-peak period. - * + * * @param offPeakMinutesToWaitOnDisconnect the offPeakMinutesToWaitOnDisconnect value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ - public ScalingPlanPersonalSchedulePatch withOffPeakMinutesToWaitOnDisconnect( - Integer offPeakMinutesToWaitOnDisconnect) { + public ScalingPlanPersonalSchedulePatch + withOffPeakMinutesToWaitOnDisconnect(Integer offPeakMinutesToWaitOnDisconnect) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPersonalScheduleProperties(); } @@ -623,7 +627,7 @@ public ScalingPlanPersonalSchedulePatch withOffPeakMinutesToWaitOnDisconnect( /** * Get the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. - * + * * @return the offPeakActionOnLogoff value. */ public SessionHandlingOperation offPeakActionOnLogoff() { @@ -632,7 +636,7 @@ public SessionHandlingOperation offPeakActionOnLogoff() { /** * Set the offPeakActionOnLogoff property: Action to be taken after a logoff during the off-peak period. - * + * * @param offPeakActionOnLogoff the offPeakActionOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -647,7 +651,7 @@ public ScalingPlanPersonalSchedulePatch withOffPeakActionOnLogoff(SessionHandlin /** * Get the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the off-peak period. - * + * * @return the offPeakMinutesToWaitOnLogoff value. */ public Integer offPeakMinutesToWaitOnLogoff() { @@ -657,7 +661,7 @@ public Integer offPeakMinutesToWaitOnLogoff() { /** * Set the offPeakMinutesToWaitOnLogoff property: The time in minutes to wait before performing the desired session * handling action when a user logs off during the off-peak period. - * + * * @param offPeakMinutesToWaitOnLogoff the offPeakMinutesToWaitOnLogoff value to set. * @return the ScalingPlanPersonalSchedulePatch object itself. */ @@ -671,7 +675,7 @@ public ScalingPlanPersonalSchedulePatch withOffPeakMinutesToWaitOnLogoff(Integer /** * 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/ScalingPlanPersonalSchedules.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedules.java index 5c8b0790049a..5d529134a8a8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedules.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPersonalSchedules.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ScalingPlanPersonalSchedules. */ +/** + * Resource collection API of ScalingPlanPersonalSchedules. + */ public interface ScalingPlanPersonalSchedules { /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -22,12 +24,12 @@ public interface ScalingPlanPersonalSchedules { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a ScalingPlanPersonalSchedule along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, Context context); + Response getWithResponse(String resourceGroupName, String scalingPlanName, + String scalingPlanScheduleName, Context context); /** * Get a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -40,7 +42,7 @@ Response getWithResponse( /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -50,12 +52,12 @@ Response getWithResponse( * @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); + Response deleteWithResponse(String resourceGroupName, String scalingPlanName, String scalingPlanScheduleName, + Context context); /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param scalingPlanScheduleName The name of the ScalingPlanSchedule. @@ -67,7 +69,7 @@ Response deleteWithResponse( /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,7 +81,7 @@ Response deleteWithResponse( /** * List ScalingPlanPersonalSchedules. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param scalingPlanName The name of the scaling plan. * @param pageSize Number of items per page. @@ -91,17 +93,12 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return scalingPlanPersonalScheduleList as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, - String scalingPlanName, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable list(String resourceGroupName, String scalingPlanName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context); /** * Get a ScalingPlanPersonalSchedule. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -112,7 +109,7 @@ PagedIterable list( /** * Get a ScalingPlanPersonalSchedule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,7 +121,7 @@ PagedIterable list( /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -134,7 +131,7 @@ PagedIterable list( /** * Remove a ScalingPlanPersonalSchedule. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -146,7 +143,7 @@ PagedIterable list( /** * Begins definition for a new ScalingPlanPersonalSchedule resource. - * + * * @param name resource name. * @return the first stage of the new ScalingPlanPersonalSchedule definition. */ diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java index 9217dd0d945f..3d39aa051a9b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedule.java @@ -9,158 +9,160 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; import java.util.List; -/** An immutable client-side representation of ScalingPlanPooledSchedule. */ +/** + * 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. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @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(); @@ -168,27 +170,35 @@ public interface ScalingPlanPooledSchedule { /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner * object. - * + * * @return the inner object. */ ScalingPlanPooledScheduleInner innerModel(); - /** The entirety of the ScalingPlanPooledSchedule definition. */ + /** + * The entirety of the ScalingPlanPooledSchedule definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ScalingPlanPooledSchedule definition stages. */ + /** + * The ScalingPlanPooledSchedule definition stages. + */ interface DefinitionStages { - /** The first stage of the ScalingPlanPooledSchedule definition. */ + /** + * The first stage of the ScalingPlanPooledSchedule definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ScalingPlanPooledSchedule definition allowing to specify parent resource. */ + /** + * 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. @@ -200,459 +210,513 @@ interface WithParentResource { * 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 { + 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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); + WithCreate + withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm); } - /** The stage of the ScalingPlanPooledSchedule definition allowing to specify rampDownMinimumHostsPct. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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); + 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 { + /** + * 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. */ + /** + * The ScalingPlanPooledSchedule update stages. + */ interface UpdateStages { - /** The stage of the ScalingPlanPooledSchedule update allowing to specify daysOfWeek. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ @@ -662,14 +726,14 @@ interface WithOffPeakLoadBalancingAlgorithm { /** * 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. */ 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 index ef6ffd32c6f8..2da9080e51e0 100644 --- 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 @@ -11,8 +11,8 @@ /** * ScalingPlanPooledScheduleList - * - *

List of ScalingPlanPooledSchedule definitions. + * + * List of ScalingPlanPooledSchedule definitions. */ @Fluent public final class ScalingPlanPooledScheduleList { @@ -28,13 +28,15 @@ public final class ScalingPlanPooledScheduleList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ScalingPlanPooledScheduleList class. */ + /** + * Creates an instance of ScalingPlanPooledScheduleList class. + */ public ScalingPlanPooledScheduleList() { } /** * Get the value property: List of ScalingPlanPooledSchedule definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of ScalingPlanPooledSchedule definitions. - * + * * @param value the value value to set. * @return the ScalingPlanPooledScheduleList object itself. */ @@ -54,7 +56,7 @@ public ScalingPlanPooledScheduleList withValue(List daysOfWeek() { @@ -43,7 +63,7 @@ public List 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. */ @@ -57,7 +77,7 @@ public ScalingPlanPooledSchedulePatch withDaysOfWeek(List daysOfWeek) /** * Get the rampUpStartTime property: Starting time for ramp up period. - * + * * @return the rampUpStartTime value. */ public Time rampUpStartTime() { @@ -66,7 +86,7 @@ public Time rampUpStartTime() { /** * Set the rampUpStartTime property: Starting time for ramp up period. - * + * * @param rampUpStartTime the rampUpStartTime value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -80,7 +100,7 @@ public ScalingPlanPooledSchedulePatch withRampUpStartTime(Time rampUpStartTime) /** * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. - * + * * @return the rampUpLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { @@ -89,12 +109,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledSchedulePatch + withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -104,7 +124,7 @@ public ScalingPlanPooledSchedulePatch withRampUpLoadBalancingAlgorithm( /** * Get the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. - * + * * @return the rampUpMinimumHostsPct value. */ public Integer rampUpMinimumHostsPct() { @@ -113,7 +133,7 @@ public Integer rampUpMinimumHostsPct() { /** * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. - * + * * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -127,7 +147,7 @@ public ScalingPlanPooledSchedulePatch withRampUpMinimumHostsPct(Integer rampUpMi /** * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @return the rampUpCapacityThresholdPct value. */ public Integer rampUpCapacityThresholdPct() { @@ -136,7 +156,7 @@ public Integer rampUpCapacityThresholdPct() { /** * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -150,7 +170,7 @@ public ScalingPlanPooledSchedulePatch withRampUpCapacityThresholdPct(Integer ram /** * Get the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ public Time peakStartTime() { @@ -159,7 +179,7 @@ public Time peakStartTime() { /** * Set the peakStartTime property: Starting time for peak period. - * + * * @param peakStartTime the peakStartTime value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -173,7 +193,7 @@ public ScalingPlanPooledSchedulePatch withPeakStartTime(Time peakStartTime) { /** * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. - * + * * @return the peakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { @@ -182,12 +202,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledSchedulePatch + withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -197,7 +217,7 @@ public ScalingPlanPooledSchedulePatch withPeakLoadBalancingAlgorithm( /** * Get the rampDownStartTime property: Starting time for ramp down period. - * + * * @return the rampDownStartTime value. */ public Time rampDownStartTime() { @@ -206,7 +226,7 @@ public Time rampDownStartTime() { /** * Set the rampDownStartTime property: Starting time for ramp down period. - * + * * @param rampDownStartTime the rampDownStartTime value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -220,7 +240,7 @@ public ScalingPlanPooledSchedulePatch withRampDownStartTime(Time rampDownStartTi /** * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. - * + * * @return the rampDownLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { @@ -229,12 +249,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledSchedulePatch + withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -244,7 +264,7 @@ public ScalingPlanPooledSchedulePatch withRampDownLoadBalancingAlgorithm( /** * Get the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. - * + * * @return the rampDownMinimumHostsPct value. */ public Integer rampDownMinimumHostsPct() { @@ -253,7 +273,7 @@ public Integer rampDownMinimumHostsPct() { /** * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. - * + * * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -267,7 +287,7 @@ public ScalingPlanPooledSchedulePatch withRampDownMinimumHostsPct(Integer rampDo /** * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @return the rampDownCapacityThresholdPct value. */ public Integer rampDownCapacityThresholdPct() { @@ -276,7 +296,7 @@ public Integer rampDownCapacityThresholdPct() { /** * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -290,7 +310,7 @@ public ScalingPlanPooledSchedulePatch withRampDownCapacityThresholdPct(Integer r /** * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. - * + * * @return the rampDownForceLogoffUsers value. */ public Boolean rampDownForceLogoffUsers() { @@ -299,7 +319,7 @@ public Boolean 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. */ @@ -313,7 +333,7 @@ public ScalingPlanPooledSchedulePatch withRampDownForceLogoffUsers(Boolean rampD /** * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. - * + * * @return the rampDownStopHostsWhen value. */ public StopHostsWhen rampDownStopHostsWhen() { @@ -322,7 +342,7 @@ public StopHostsWhen 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. */ @@ -336,7 +356,7 @@ public ScalingPlanPooledSchedulePatch withRampDownStopHostsWhen(StopHostsWhen ra /** * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. - * + * * @return the rampDownWaitTimeMinutes value. */ public Integer rampDownWaitTimeMinutes() { @@ -345,7 +365,7 @@ public Integer 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. */ @@ -359,7 +379,7 @@ public ScalingPlanPooledSchedulePatch withRampDownWaitTimeMinutes(Integer rampDo /** * Get the rampDownNotificationMessage property: Notification message for users during ramp down period. - * + * * @return the rampDownNotificationMessage value. */ public String rampDownNotificationMessage() { @@ -368,7 +388,7 @@ public String 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. */ @@ -382,7 +402,7 @@ public ScalingPlanPooledSchedulePatch withRampDownNotificationMessage(String ram /** * Get the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ public Time offPeakStartTime() { @@ -391,7 +411,7 @@ public Time offPeakStartTime() { /** * Set the offPeakStartTime property: Starting time for off-peak period. - * + * * @param offPeakStartTime the offPeakStartTime value to set. * @return the ScalingPlanPooledSchedulePatch object itself. */ @@ -405,7 +425,7 @@ public ScalingPlanPooledSchedulePatch withOffPeakStartTime(Time offPeakStartTime /** * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. - * + * * @return the offPeakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { @@ -414,12 +434,12 @@ public SessionHostLoadBalancingAlgorithm 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) { + public ScalingPlanPooledSchedulePatch + withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { if (this.innerProperties() == null) { this.innerProperties = new ScalingPlanPooledScheduleProperties(); } @@ -429,7 +449,7 @@ public ScalingPlanPooledSchedulePatch withOffPeakLoadBalancingAlgorithm( /** * 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/ScalingPlanPooledSchedules.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingPlanPooledSchedules.java index 282d38e9b4b5..47a01b94e020 100644 --- 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ScalingPlanPooledSchedules. */ +/** + * 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. @@ -22,12 +24,12 @@ public interface ScalingPlanPooledSchedules { * @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); + 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. @@ -40,7 +42,7 @@ Response getWithResponse( /** * 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. @@ -50,12 +52,12 @@ Response getWithResponse( * @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); + 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. @@ -67,7 +69,7 @@ Response deleteWithResponse( /** * 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. @@ -79,7 +81,7 @@ Response deleteWithResponse( /** * 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. @@ -91,17 +93,12 @@ Response deleteWithResponse( * @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); + 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. @@ -112,7 +109,7 @@ PagedIterable list( /** * 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. @@ -124,7 +121,7 @@ PagedIterable list( /** * 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. @@ -134,7 +131,7 @@ PagedIterable list( /** * 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. @@ -146,7 +143,7 @@ PagedIterable list( /** * Begins definition for a new ScalingPlanPooledSchedule resource. - * + * * @param name resource name. * @return the first stage of the new ScalingPlanPooledSchedule definition. */ 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 efce89a0a941..c7be030bdd61 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ScalingPlans. */ +/** + * Resource collection API of ScalingPlans. + */ public interface ScalingPlans { /** * 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. @@ -21,12 +23,12 @@ public interface ScalingPlans { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a scaling plan along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String scalingPlanName, Context context); + 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -51,7 +53,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -62,7 +64,7 @@ Response getByResourceGroupWithResponse( /** * 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. @@ -73,7 +75,7 @@ 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. @@ -84,12 +86,12 @@ Response getByResourceGroupWithResponse( * @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, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip, 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 PagedIterable}. @@ -98,7 +100,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -112,7 +114,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -124,7 +126,7 @@ PagedIterable listByResourceGroup( /** * 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. @@ -136,17 +138,12 @@ PagedIterable listByResourceGroup( * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, Integer pageSize, + Boolean isDescending, Integer initialSkip, Context context); /** * Get a scaling plan. - * + * * @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. @@ -157,7 +154,7 @@ PagedIterable listByHostPool( /** * Get a scaling plan. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -169,7 +166,7 @@ PagedIterable listByHostPool( /** * Remove a scaling plan. - * + * * @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. @@ -179,7 +176,7 @@ PagedIterable listByHostPool( /** * Remove a scaling plan. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -191,7 +188,7 @@ PagedIterable listByHostPool( /** * Begins definition for a new ScalingPlan resource. - * + * * @param name resource name. * @return the first stage of the new ScalingPlan definition. */ 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 dcf2877f4783..a176afe0c6cd 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,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** A ScalingPlanPooledSchedule. */ +/** + * A ScalingPlanPooledSchedule. + */ @Fluent public final class ScalingSchedule { /* @@ -119,13 +121,15 @@ public final class ScalingSchedule { @JsonProperty(value = "offPeakLoadBalancingAlgorithm") private SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm; - /** Creates an instance of ScalingSchedule class. */ + /** + * Creates an instance of ScalingSchedule class. + */ public ScalingSchedule() { } /** * Get the name property: Name of the ScalingPlanPooledSchedule. - * + * * @return the name value. */ public String name() { @@ -134,7 +138,7 @@ public String name() { /** * Set the name property: Name of the ScalingPlanPooledSchedule. - * + * * @param name the name value to set. * @return the ScalingSchedule object itself. */ @@ -145,7 +149,7 @@ public ScalingSchedule withName(String name) { /** * Get the daysOfWeek property: Set of days of the week on which this schedule is active. - * + * * @return the daysOfWeek value. */ public List daysOfWeek() { @@ -154,7 +158,7 @@ public List 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 ScalingSchedule object itself. */ @@ -165,7 +169,7 @@ public ScalingSchedule withDaysOfWeek(List daysOf /** * Get the rampUpStartTime property: Starting time for ramp up period. - * + * * @return the rampUpStartTime value. */ public Time rampUpStartTime() { @@ -174,7 +178,7 @@ public Time rampUpStartTime() { /** * Set the rampUpStartTime property: Starting time for ramp up period. - * + * * @param rampUpStartTime the rampUpStartTime value to set. * @return the ScalingSchedule object itself. */ @@ -185,7 +189,7 @@ public ScalingSchedule withRampUpStartTime(Time rampUpStartTime) { /** * Get the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. - * + * * @return the rampUpLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { @@ -194,19 +198,19 @@ public SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm() { /** * Set the rampUpLoadBalancingAlgorithm property: Load balancing algorithm for ramp up period. - * + * * @param rampUpLoadBalancingAlgorithm the rampUpLoadBalancingAlgorithm value to set. * @return the ScalingSchedule object itself. */ - public ScalingSchedule withRampUpLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm rampUpLoadBalancingAlgorithm) { + public ScalingSchedule + 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() { @@ -215,7 +219,7 @@ public Integer rampUpMinimumHostsPct() { /** * Set the rampUpMinimumHostsPct property: Minimum host percentage for ramp up period. - * + * * @param rampUpMinimumHostsPct the rampUpMinimumHostsPct value to set. * @return the ScalingSchedule object itself. */ @@ -226,7 +230,7 @@ public ScalingSchedule withRampUpMinimumHostsPct(Integer rampUpMinimumHostsPct) /** * Get the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @return the rampUpCapacityThresholdPct value. */ public Integer rampUpCapacityThresholdPct() { @@ -235,7 +239,7 @@ public Integer rampUpCapacityThresholdPct() { /** * Set the rampUpCapacityThresholdPct property: Capacity threshold for ramp up period. - * + * * @param rampUpCapacityThresholdPct the rampUpCapacityThresholdPct value to set. * @return the ScalingSchedule object itself. */ @@ -246,7 +250,7 @@ public ScalingSchedule withRampUpCapacityThresholdPct(Integer rampUpCapacityThre /** * Get the peakStartTime property: Starting time for peak period. - * + * * @return the peakStartTime value. */ public Time peakStartTime() { @@ -255,7 +259,7 @@ public Time peakStartTime() { /** * Set the peakStartTime property: Starting time for peak period. - * + * * @param peakStartTime the peakStartTime value to set. * @return the ScalingSchedule object itself. */ @@ -266,7 +270,7 @@ public ScalingSchedule withPeakStartTime(Time peakStartTime) { /** * Get the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. - * + * * @return the peakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { @@ -275,19 +279,19 @@ public SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm() { /** * Set the peakLoadBalancingAlgorithm property: Load balancing algorithm for peak period. - * + * * @param peakLoadBalancingAlgorithm the peakLoadBalancingAlgorithm value to set. * @return the ScalingSchedule object itself. */ - public ScalingSchedule withPeakLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm peakLoadBalancingAlgorithm) { + public ScalingSchedule + 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() { @@ -296,7 +300,7 @@ public Time rampDownStartTime() { /** * Set the rampDownStartTime property: Starting time for ramp down period. - * + * * @param rampDownStartTime the rampDownStartTime value to set. * @return the ScalingSchedule object itself. */ @@ -307,7 +311,7 @@ public ScalingSchedule withRampDownStartTime(Time rampDownStartTime) { /** * Get the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. - * + * * @return the rampDownLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { @@ -316,19 +320,19 @@ public SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm() { /** * Set the rampDownLoadBalancingAlgorithm property: Load balancing algorithm for ramp down period. - * + * * @param rampDownLoadBalancingAlgorithm the rampDownLoadBalancingAlgorithm value to set. * @return the ScalingSchedule object itself. */ - public ScalingSchedule withRampDownLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm rampDownLoadBalancingAlgorithm) { + public ScalingSchedule + 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() { @@ -337,7 +341,7 @@ public Integer rampDownMinimumHostsPct() { /** * Set the rampDownMinimumHostsPct property: Minimum host percentage for ramp down period. - * + * * @param rampDownMinimumHostsPct the rampDownMinimumHostsPct value to set. * @return the ScalingSchedule object itself. */ @@ -348,7 +352,7 @@ public ScalingSchedule withRampDownMinimumHostsPct(Integer rampDownMinimumHostsP /** * Get the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @return the rampDownCapacityThresholdPct value. */ public Integer rampDownCapacityThresholdPct() { @@ -357,7 +361,7 @@ public Integer rampDownCapacityThresholdPct() { /** * Set the rampDownCapacityThresholdPct property: Capacity threshold for ramp down period. - * + * * @param rampDownCapacityThresholdPct the rampDownCapacityThresholdPct value to set. * @return the ScalingSchedule object itself. */ @@ -368,7 +372,7 @@ public ScalingSchedule withRampDownCapacityThresholdPct(Integer rampDownCapacity /** * Get the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. - * + * * @return the rampDownForceLogoffUsers value. */ public Boolean rampDownForceLogoffUsers() { @@ -377,7 +381,7 @@ public Boolean rampDownForceLogoffUsers() { /** * Set the rampDownForceLogoffUsers property: Should users be logged off forcefully from hosts. - * + * * @param rampDownForceLogoffUsers the rampDownForceLogoffUsers value to set. * @return the ScalingSchedule object itself. */ @@ -388,7 +392,7 @@ public ScalingSchedule withRampDownForceLogoffUsers(Boolean rampDownForceLogoffU /** * Get the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. - * + * * @return the rampDownStopHostsWhen value. */ public StopHostsWhen rampDownStopHostsWhen() { @@ -397,7 +401,7 @@ public StopHostsWhen rampDownStopHostsWhen() { /** * Set the rampDownStopHostsWhen property: Specifies when to stop hosts during ramp down period. - * + * * @param rampDownStopHostsWhen the rampDownStopHostsWhen value to set. * @return the ScalingSchedule object itself. */ @@ -408,7 +412,7 @@ public ScalingSchedule withRampDownStopHostsWhen(StopHostsWhen rampDownStopHosts /** * Get the rampDownWaitTimeMinutes property: Number of minutes to wait to stop hosts during ramp down period. - * + * * @return the rampDownWaitTimeMinutes value. */ public Integer rampDownWaitTimeMinutes() { @@ -417,7 +421,7 @@ public Integer 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 ScalingSchedule object itself. */ @@ -428,7 +432,7 @@ public ScalingSchedule withRampDownWaitTimeMinutes(Integer rampDownWaitTimeMinut /** * Get the rampDownNotificationMessage property: Notification message for users during ramp down period. - * + * * @return the rampDownNotificationMessage value. */ public String rampDownNotificationMessage() { @@ -437,7 +441,7 @@ public String rampDownNotificationMessage() { /** * Set the rampDownNotificationMessage property: Notification message for users during ramp down period. - * + * * @param rampDownNotificationMessage the rampDownNotificationMessage value to set. * @return the ScalingSchedule object itself. */ @@ -448,7 +452,7 @@ public ScalingSchedule withRampDownNotificationMessage(String rampDownNotificati /** * Get the offPeakStartTime property: Starting time for off-peak period. - * + * * @return the offPeakStartTime value. */ public Time offPeakStartTime() { @@ -457,7 +461,7 @@ public Time offPeakStartTime() { /** * Set the offPeakStartTime property: Starting time for off-peak period. - * + * * @param offPeakStartTime the offPeakStartTime value to set. * @return the ScalingSchedule object itself. */ @@ -468,7 +472,7 @@ public ScalingSchedule withOffPeakStartTime(Time offPeakStartTime) { /** * Get the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. - * + * * @return the offPeakLoadBalancingAlgorithm value. */ public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { @@ -477,19 +481,19 @@ public SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm() { /** * Set the offPeakLoadBalancingAlgorithm property: Load balancing algorithm for off-peak period. - * + * * @param offPeakLoadBalancingAlgorithm the offPeakLoadBalancingAlgorithm value to set. * @return the ScalingSchedule object itself. */ - public ScalingSchedule withOffPeakLoadBalancingAlgorithm( - SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { + public ScalingSchedule + withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm offPeakLoadBalancingAlgorithm) { this.offPeakLoadBalancingAlgorithm = offPeakLoadBalancingAlgorithm; 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/ScalingScheduleDaysOfWeekItem.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingScheduleDaysOfWeekItem.java index cac2d85a606c..5951008bf51b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingScheduleDaysOfWeekItem.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ScalingScheduleDaysOfWeekItem.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScalingScheduleDaysOfWeekItem. */ +/** + * Defines values for ScalingScheduleDaysOfWeekItem. + */ public final class ScalingScheduleDaysOfWeekItem extends ExpandableStringEnum { - /** Static value Sunday for ScalingScheduleDaysOfWeekItem. */ + /** + * Static value Sunday for ScalingScheduleDaysOfWeekItem. + */ public static final ScalingScheduleDaysOfWeekItem SUNDAY = fromString("Sunday"); - /** Static value Monday for ScalingScheduleDaysOfWeekItem. */ + /** + * Static value Monday for ScalingScheduleDaysOfWeekItem. + */ public static final ScalingScheduleDaysOfWeekItem MONDAY = fromString("Monday"); - /** Static value Tuesday for ScalingScheduleDaysOfWeekItem. */ + /** + * Static value Tuesday for ScalingScheduleDaysOfWeekItem. + */ public static final ScalingScheduleDaysOfWeekItem TUESDAY = fromString("Tuesday"); - /** Static value Wednesday for ScalingScheduleDaysOfWeekItem. */ + /** + * Static value Wednesday for ScalingScheduleDaysOfWeekItem. + */ public static final ScalingScheduleDaysOfWeekItem WEDNESDAY = fromString("Wednesday"); - /** Static value Thursday for ScalingScheduleDaysOfWeekItem. */ + /** + * Static value Thursday for ScalingScheduleDaysOfWeekItem. + */ public static final ScalingScheduleDaysOfWeekItem THURSDAY = fromString("Thursday"); - /** Static value Friday for ScalingScheduleDaysOfWeekItem. */ + /** + * Static value Friday for ScalingScheduleDaysOfWeekItem. + */ public static final ScalingScheduleDaysOfWeekItem FRIDAY = fromString("Friday"); - /** Static value Saturday for ScalingScheduleDaysOfWeekItem. */ + /** + * Static value Saturday for ScalingScheduleDaysOfWeekItem. + */ public static final ScalingScheduleDaysOfWeekItem SATURDAY = fromString("Saturday"); /** * Creates a new instance of ScalingScheduleDaysOfWeekItem value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public ScalingScheduleDaysOfWeekItem() { /** * Creates or finds a ScalingScheduleDaysOfWeekItem from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScalingScheduleDaysOfWeekItem. */ @@ -53,7 +69,7 @@ public static ScalingScheduleDaysOfWeekItem fromString(String name) { /** * Gets known ScalingScheduleDaysOfWeekItem values. - * + * * @return known ScalingScheduleDaysOfWeekItem values. */ public static Collection values() { 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 83d0d8e3b8bf..83caaf768d00 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Represents message sent to a UserSession. */ +/** + * Represents message sent to a UserSession. + */ @Fluent public final class SendMessage { /* @@ -22,13 +24,15 @@ public final class SendMessage { @JsonProperty(value = "messageBody") private String messageBody; - /** Creates an instance of SendMessage class. */ + /** + * Creates an instance of SendMessage class. + */ public SendMessage() { } /** * Get the messageTitle property: Title of message. - * + * * @return the messageTitle value. */ public String messageTitle() { @@ -37,7 +41,7 @@ public String messageTitle() { /** * Set the messageTitle property: Title of message. - * + * * @param messageTitle the messageTitle value to set. * @return the SendMessage object itself. */ @@ -48,7 +52,7 @@ public SendMessage withMessageTitle(String messageTitle) { /** * Get the messageBody property: Body of message. - * + * * @return the messageBody value. */ public String messageBody() { @@ -57,7 +61,7 @@ public String messageBody() { /** * Set the messageBody property: Body of message. - * + * * @param messageBody the messageBody value to set. * @return the SendMessage object itself. */ @@ -68,7 +72,7 @@ public SendMessage withMessageBody(String messageBody) { /** * 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/ServiceSpecification.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ServiceSpecification.java index 83dc76eef9db..b536c2164ce2 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Service specification payload. */ +/** + * Service specification payload. + */ @Fluent public final class ServiceSpecification { /* @@ -17,13 +19,15 @@ public final class ServiceSpecification { @JsonProperty(value = "logSpecifications") private List logSpecifications; - /** Creates an instance of ServiceSpecification class. */ + /** + * Creates an instance of ServiceSpecification class. + */ public ServiceSpecification() { } /** * Get the logSpecifications property: Specifications of the Log for Azure Monitoring. - * + * * @return the logSpecifications value. */ public List logSpecifications() { @@ -32,7 +36,7 @@ public List logSpecifications() { /** * Set the logSpecifications property: Specifications of the Log for Azure Monitoring. - * + * * @param logSpecifications the logSpecifications value to set. * @return the ServiceSpecification object itself. */ @@ -43,7 +47,7 @@ public ServiceSpecification withLogSpecifications(List logSpec /** * 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/SessionHandlingOperation.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHandlingOperation.java index 17002258a15b..48b7f2323e72 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHandlingOperation.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHandlingOperation.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Action to be taken after a user disconnect during the ramp up period. */ +/** + * Action to be taken after a user disconnect during the ramp up period. + */ public final class SessionHandlingOperation extends ExpandableStringEnum { - /** Static value None for SessionHandlingOperation. */ + /** + * Static value None for SessionHandlingOperation. + */ public static final SessionHandlingOperation NONE = fromString("None"); - /** Static value Deallocate for SessionHandlingOperation. */ + /** + * Static value Deallocate for SessionHandlingOperation. + */ public static final SessionHandlingOperation DEALLOCATE = fromString("Deallocate"); - /** Static value Hibernate for SessionHandlingOperation. */ + /** + * Static value Hibernate for SessionHandlingOperation. + */ public static final SessionHandlingOperation HIBERNATE = fromString("Hibernate"); /** * Creates a new instance of SessionHandlingOperation value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public SessionHandlingOperation() { /** * Creates or finds a SessionHandlingOperation from its string representation. - * + * * @param name a name to look for. * @return the corresponding SessionHandlingOperation. */ @@ -41,7 +49,7 @@ public static SessionHandlingOperation fromString(String name) { /** * Gets known SessionHandlingOperation values. - * + * * @return known SessionHandlingOperation values. */ public static Collection values() { 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 7dcc7ec093a1..4a0f98935261 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 @@ -9,158 +9,160 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of SessionHost. */ +/** + * An immutable client-side representation of SessionHost. + */ public interface SessionHost { /** * 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. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of SessionHost. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the lastHeartBeat property: Last heart beat from SessionHost. - * + * * @return the lastHeartBeat value. */ OffsetDateTime lastHeartBeat(); /** * Gets the sessions property: Number of sessions on SessionHost. - * + * * @return the sessions value. */ Integer sessions(); /** * Gets the agentVersion property: Version of agent on SessionHost. - * + * * @return the agentVersion value. */ String agentVersion(); /** * Gets the allowNewSession property: Allow a new session. - * + * * @return the allowNewSession value. */ Boolean allowNewSession(); /** * Gets the virtualMachineId property: Virtual Machine Id of SessionHost's underlying virtual machine. - * + * * @return the virtualMachineId value. */ String virtualMachineId(); /** * Gets the resourceId property: Resource Id of SessionHost's underlying virtual machine. - * + * * @return the resourceId value. */ String resourceId(); /** * Gets the assignedUser property: User assigned to SessionHost. - * + * * @return the assignedUser value. */ String assignedUser(); /** * Gets the friendlyName property: Friendly name of SessionHost. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the status property: Status for a SessionHost. - * + * * @return the status value. */ Status status(); /** * Gets the statusTimestamp property: The timestamp of the status. - * + * * @return the statusTimestamp value. */ OffsetDateTime statusTimestamp(); /** * Gets the osVersion property: The version of the OS on the session host. - * + * * @return the osVersion value. */ String osVersion(); /** * Gets the sxSStackVersion property: The version of the side by side stack on the session host. - * + * * @return the sxSStackVersion value. */ String sxSStackVersion(); /** * Gets the updateState property: Update state of a SessionHost. - * + * * @return the updateState value. */ UpdateState updateState(); /** * Gets the lastUpdateTime property: The timestamp of the last update. - * + * * @return the lastUpdateTime value. */ OffsetDateTime lastUpdateTime(); /** * Gets the updateErrorMessage property: The error message. - * + * * @return the updateErrorMessage value. */ String updateErrorMessage(); /** * Gets the sessionHostHealthCheckResults property: List of SessionHostHealthCheckReports. - * + * * @return the sessionHostHealthCheckResults value. */ List sessionHostHealthCheckResults(); /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostInner object. - * + * * @return the inner object. */ SessionHostInner innerModel(); 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 index 4d5a713f129e..217b6e12ddba 100644 --- 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 @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of maintenance for session host components. */ +/** + * The type of maintenance for session host components. + */ public final class SessionHostComponentUpdateType extends ExpandableStringEnum { - /** Static value Default for SessionHostComponentUpdateType. */ + /** + * Static value Default for SessionHostComponentUpdateType. + */ public static final SessionHostComponentUpdateType DEFAULT = fromString("Default"); - /** Static value Scheduled for SessionHostComponentUpdateType. */ + /** + * Static value Scheduled for SessionHostComponentUpdateType. + */ public static final SessionHostComponentUpdateType SCHEDULED = fromString("Scheduled"); /** * Creates a new instance of SessionHostComponentUpdateType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SessionHostComponentUpdateType() { /** * Creates or finds a SessionHostComponentUpdateType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SessionHostComponentUpdateType. */ @@ -38,7 +44,7 @@ public static SessionHostComponentUpdateType fromString(String name) { /** * Gets known SessionHostComponentUpdateType values. - * + * * @return known SessionHostComponentUpdateType values. */ public static Collection values() { 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 a230bae92728..be04f84f67d3 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Contains details on the failure. */ +/** + * Contains details on the failure. + */ @Immutable public final class SessionHostHealthCheckFailureDetails { /* @@ -29,13 +31,15 @@ public final class SessionHostHealthCheckFailureDetails { @JsonProperty(value = "lastHealthCheckDateTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime lastHealthCheckDateTime; - /** Creates an instance of SessionHostHealthCheckFailureDetails class. */ + /** + * Creates an instance of SessionHostHealthCheckFailureDetails class. + */ public SessionHostHealthCheckFailureDetails() { } /** * Get the message property: Failure message: hints on what is wrong and how to recover. - * + * * @return the message value. */ public String message() { @@ -44,7 +48,7 @@ public String message() { /** * Get the errorCode property: Error code corresponding for the failure. - * + * * @return the errorCode value. */ public Integer errorCode() { @@ -53,7 +57,7 @@ public Integer errorCode() { /** * Get the lastHealthCheckDateTime property: The timestamp of the last update. - * + * * @return the lastHealthCheckDateTime value. */ public OffsetDateTime lastHealthCheckDateTime() { @@ -62,7 +66,7 @@ public OffsetDateTime lastHealthCheckDateTime() { /** * 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/SessionHostHealthCheckReport.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostHealthCheckReport.java index ffbb3359e9f4..fa575011bbac 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** The report for session host information. */ +/** + * The report for session host information. + */ @Immutable public final class SessionHostHealthCheckReport { /* @@ -28,13 +30,15 @@ public final class SessionHostHealthCheckReport { @JsonProperty(value = "additionalFailureDetails", access = JsonProperty.Access.WRITE_ONLY) private SessionHostHealthCheckFailureDetails additionalFailureDetails; - /** Creates an instance of SessionHostHealthCheckReport class. */ + /** + * Creates an instance of SessionHostHealthCheckReport class. + */ public SessionHostHealthCheckReport() { } /** * Get the healthCheckName property: Represents the name of the health check operation performed. - * + * * @return the healthCheckName value. */ public HealthCheckName healthCheckName() { @@ -43,7 +47,7 @@ public HealthCheckName healthCheckName() { /** * Get the healthCheckResult property: Represents the Health state of the health check we performed. - * + * * @return the healthCheckResult value. */ public HealthCheckResult healthCheckResult() { @@ -52,7 +56,7 @@ public HealthCheckResult healthCheckResult() { /** * Get the additionalFailureDetails property: Additional detailed information on the failure. - * + * * @return the additionalFailureDetails value. */ public SessionHostHealthCheckFailureDetails additionalFailureDetails() { @@ -61,7 +65,7 @@ public SessionHostHealthCheckFailureDetails additionalFailureDetails() { /** * 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/SessionHostList.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostList.java index 98ee565fd7b3..fc7a431f8c59 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 @@ -11,8 +11,8 @@ /** * SessionHostList - * - *

List of SessionHost definitions. + * + * List of SessionHost definitions. */ @Fluent public final class SessionHostList { @@ -28,13 +28,15 @@ public final class SessionHostList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SessionHostList class. */ + /** + * Creates an instance of SessionHostList class. + */ public SessionHostList() { } /** * Get the value property: List of SessionHost definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of SessionHost definitions. - * + * * @param value the value value to set. * @return the SessionHostList object itself. */ @@ -54,7 +56,7 @@ public SessionHostList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/SessionHostLoadBalancingAlgorithm.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHostLoadBalancingAlgorithm.java index bc274fcd51dd..24b3a1c6ba1d 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,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Load balancing algorithm for ramp up period. */ +/** + * Load balancing algorithm for ramp up period. + */ public final class SessionHostLoadBalancingAlgorithm extends ExpandableStringEnum { - /** Static value BreadthFirst for SessionHostLoadBalancingAlgorithm. */ + /** + * Static value BreadthFirst for SessionHostLoadBalancingAlgorithm. + */ public static final SessionHostLoadBalancingAlgorithm BREADTH_FIRST = fromString("BreadthFirst"); - /** Static value DepthFirst for SessionHostLoadBalancingAlgorithm. */ + /** + * Static value DepthFirst for SessionHostLoadBalancingAlgorithm. + */ public static final SessionHostLoadBalancingAlgorithm DEPTH_FIRST = fromString("DepthFirst"); /** * Creates a new instance of SessionHostLoadBalancingAlgorithm value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public SessionHostLoadBalancingAlgorithm() { /** * Creates or finds a SessionHostLoadBalancingAlgorithm from its string representation. - * + * * @param name a name to look for. * @return the corresponding SessionHostLoadBalancingAlgorithm. */ @@ -38,7 +44,7 @@ public static SessionHostLoadBalancingAlgorithm fromString(String name) { /** * Gets known SessionHostLoadBalancingAlgorithm values. - * + * * @return known SessionHostLoadBalancingAlgorithm values. */ public static Collection values() { 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 50376b094467..265d9996259a 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 @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostPatchProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** SessionHost properties that can be patched. */ +/** + * SessionHost properties that can be patched. + */ @Fluent public final class SessionHostPatch extends ProxyResource { /* @@ -18,22 +21,39 @@ public final class SessionHostPatch extends ProxyResource { @JsonProperty(value = "properties") private SessionHostPatchProperties innerProperties; - /** Creates an instance of SessionHostPatch class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SessionHostPatch class. + */ public SessionHostPatch() { } /** * Get the innerProperties property: Detailed properties for SessionHost. - * + * * @return the innerProperties value. */ private SessionHostPatchProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the allowNewSession property: Allow a new session. - * + * * @return the allowNewSession value. */ public Boolean allowNewSession() { @@ -42,7 +62,7 @@ public Boolean allowNewSession() { /** * Set the allowNewSession property: Allow a new session. - * + * * @param allowNewSession the allowNewSession value to set. * @return the SessionHostPatch object itself. */ @@ -56,7 +76,7 @@ public SessionHostPatch withAllowNewSession(Boolean allowNewSession) { /** * Get the assignedUser property: User assigned to SessionHost. - * + * * @return the assignedUser value. */ public String assignedUser() { @@ -65,7 +85,7 @@ public String assignedUser() { /** * Set the assignedUser property: User assigned to SessionHost. - * + * * @param assignedUser the assignedUser value to set. * @return the SessionHostPatch object itself. */ @@ -79,7 +99,7 @@ public SessionHostPatch withAssignedUser(String assignedUser) { /** * Get the friendlyName property: Friendly name of SessionHost. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -88,7 +108,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of SessionHost. - * + * * @param friendlyName the friendlyName value to set. * @return the SessionHostPatch object itself. */ @@ -102,7 +122,7 @@ public SessionHostPatch withFriendlyName(String friendlyName) { /** * 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/SessionHosts.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SessionHosts.java index ca698cfc8556..c952a771f113 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of SessionHosts. */ +/** + * 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. @@ -22,12 +24,12 @@ public interface SessionHosts { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a session host along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, Context context); + Response getWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Context context); /** * 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. @@ -40,7 +42,7 @@ Response getWithResponse( /** * 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. @@ -51,12 +53,12 @@ Response getWithResponse( * @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 sessionHostname, Boolean force, Context context); + Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Boolean force, 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. @@ -68,7 +70,7 @@ Response deleteWithResponse( /** * 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. @@ -80,17 +82,12 @@ Response deleteWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a SessionHost definition along with {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - Boolean force, - SessionHostPatch sessionHost, - Context context); + Response updateWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + Boolean force, 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. @@ -103,7 +100,7 @@ Response updateWithResponse( /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -115,7 +112,7 @@ Response updateWithResponse( /** * 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. @@ -127,11 +124,6 @@ Response updateWithResponse( * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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 9968941080de..8096c5ad74fa 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,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** State of user session. */ +/** + * State of user session. + */ public final class SessionState extends ExpandableStringEnum { - /** Static value Unknown for SessionState. */ + /** + * Static value Unknown for SessionState. + */ public static final SessionState UNKNOWN = fromString("Unknown"); - /** Static value Active for SessionState. */ + /** + * Static value Active for SessionState. + */ public static final SessionState ACTIVE = fromString("Active"); - /** Static value Disconnected for SessionState. */ + /** + * Static value Disconnected for SessionState. + */ public static final SessionState DISCONNECTED = fromString("Disconnected"); - /** Static value Pending for SessionState. */ + /** + * Static value Pending for SessionState. + */ public static final SessionState PENDING = fromString("Pending"); - /** Static value LogOff for SessionState. */ + /** + * Static value LogOff for SessionState. + */ public static final SessionState LOG_OFF = fromString("LogOff"); - /** Static value UserProfileDiskMounted for SessionState. */ + /** + * Static value UserProfileDiskMounted for SessionState. + */ public static final SessionState USER_PROFILE_DISK_MOUNTED = fromString("UserProfileDiskMounted"); /** * Creates a new instance of SessionState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public SessionState() { /** * Creates or finds a SessionState from its string representation. - * + * * @param name a name to look for. * @return the corresponding SessionState. */ @@ -50,7 +64,7 @@ public static SessionState fromString(String name) { /** * Gets known SessionState values. - * + * * @return known SessionState values. */ public static Collection values() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java index fc399b48546e..fd1d472f0e57 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/SetStartVMOnConnect.java @@ -13,15 +13,19 @@ * session hosts must be turned on using rampUpAutoStartHosts or by turning them on manually. */ public final class SetStartVMOnConnect extends ExpandableStringEnum { - /** Static value Enable for SetStartVMOnConnect. */ + /** + * Static value Enable for SetStartVMOnConnect. + */ public static final SetStartVMOnConnect ENABLE = fromString("Enable"); - /** Static value Disable for SetStartVMOnConnect. */ + /** + * Static value Disable for SetStartVMOnConnect. + */ public static final SetStartVMOnConnect DISABLE = fromString("Disable"); /** * Creates a new instance of SetStartVMOnConnect value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public SetStartVMOnConnect() { /** * Creates or finds a SetStartVMOnConnect from its string representation. - * + * * @param name a name to look for. * @return the corresponding SetStartVMOnConnect. */ @@ -41,7 +45,7 @@ public static SetStartVMOnConnect fromString(String name) { /** * Gets known SetStartVMOnConnect values. - * + * * @return known SetStartVMOnConnect values. */ public static Collection values() { 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 f16cc2cafcf6..850e97a49c16 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 @@ -8,25 +8,25 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The resource model definition representing SKU. */ +/** + * The resource model definition representing SKU. + */ @Fluent public class Sku { /* - * The name of the SKU. Ex - P3. It is typically a letter+number code + * The name of the SKU. E.g. P3. It is typically a letter+number code */ @JsonProperty(value = "name", required = true) 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; @@ -38,19 +38,20 @@ public class Sku { 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. */ + /** + * 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. - * + * Get the name property: The name of the SKU. E.g. P3. It is typically a letter+number code. + * * @return the name value. */ public String name() { @@ -58,8 +59,8 @@ public String name() { } /** - * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * + * Set the name property: The name of the SKU. E.g. P3. It is typically a letter+number code. + * * @param name the name value to set. * @return the Sku object itself. */ @@ -71,7 +72,7 @@ public Sku withName(String name) { /** * Get the tier property: 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. - * + * * @return the tier value. */ public SkuTier tier() { @@ -81,7 +82,7 @@ public SkuTier tier() { /** * Set the tier property: 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. - * + * * @param tier the tier value to set. * @return the Sku object itself. */ @@ -93,7 +94,7 @@ public Sku withTier(SkuTier tier) { /** * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this * would be the standalone code. - * + * * @return the size value. */ public String size() { @@ -103,7 +104,7 @@ public String size() { /** * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this * would be the standalone code. - * + * * @param size the size value to set. * @return the Sku object itself. */ @@ -115,7 +116,7 @@ public Sku withSize(String size) { /** * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @return the family value. */ public String family() { @@ -125,7 +126,7 @@ public String family() { /** * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be * captured here. - * + * * @param family the family value to set. * @return the Sku object itself. */ @@ -137,7 +138,7 @@ public Sku withFamily(String family) { /** * Get the capacity property: 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. - * + * * @return the capacity value. */ public Integer capacity() { @@ -147,7 +148,7 @@ public Integer capacity() { /** * Set the capacity property: 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. - * + * * @param capacity the capacity value to set. * @return the Sku object itself. */ @@ -158,13 +159,12 @@ public Sku withCapacity(Integer capacity) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); } } 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 b65dbcdc83eb..bf9f7f7234b8 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 @@ -12,19 +12,29 @@ * required on a PUT. */ public enum SkuTier { - /** Enum value Free. */ + /** + * Enum value Free. + */ FREE("Free"), - /** Enum value Basic. */ + /** + * Enum value Basic. + */ BASIC("Basic"), - /** Enum value Standard. */ + /** + * Enum value Standard. + */ STANDARD("Standard"), - /** Enum value Premium. */ + /** + * Enum value Premium. + */ PREMIUM("Premium"); - /** The actual serialized value for a SkuTier instance. */ + /** + * The actual serialized value for a SkuTier instance. + */ private final String value; SkuTier(String value) { @@ -33,7 +43,7 @@ public enum SkuTier { /** * Parses a serialized value to a SkuTier instance. - * + * * @param value the serialized value to parse. * @return the parsed SkuTier object, or null if unable to parse. */ @@ -51,7 +61,9 @@ public static SkuTier fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@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 68ffd472b759..bb71fdaffba8 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,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of single sign on Secret Type. */ +/** + * The type of single sign on Secret Type. + */ public final class SsoSecretType extends ExpandableStringEnum { - /** Static value SharedKey for SsoSecretType. */ + /** + * Static value SharedKey for SsoSecretType. + */ public static final SsoSecretType SHARED_KEY = fromString("SharedKey"); - /** Static value Certificate for SsoSecretType. */ + /** + * Static value Certificate for SsoSecretType. + */ public static final SsoSecretType CERTIFICATE = fromString("Certificate"); - /** Static value SharedKeyInKeyVault for SsoSecretType. */ + /** + * Static value SharedKeyInKeyVault for SsoSecretType. + */ public static final SsoSecretType SHARED_KEY_IN_KEY_VAULT = fromString("SharedKeyInKeyVault"); - /** Static value CertificateInKeyVault for SsoSecretType. */ + /** + * Static value CertificateInKeyVault for SsoSecretType. + */ public static final SsoSecretType CERTIFICATE_IN_KEY_VAULT = fromString("CertificateInKeyVault"); /** * Creates a new instance of SsoSecretType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public SsoSecretType() { /** * Creates or finds a SsoSecretType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SsoSecretType. */ @@ -44,7 +54,7 @@ public static SsoSecretType fromString(String name) { /** * Gets known SsoSecretType values. - * + * * @return known SsoSecretType values. */ public static Collection values() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItem.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItem.java index 45098dfda0be..6e181ef87e65 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItem.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItem.java @@ -4,69 +4,79 @@ package com.azure.resourcemanager.desktopvirtualization.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemInner; -/** An immutable client-side representation of StartMenuItem. */ +/** + * An immutable client-side representation of StartMenuItem. + */ public interface StartMenuItem { /** * 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: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the appAlias property: Alias of StartMenuItem. - * + * * @return the appAlias value. */ String appAlias(); /** * Gets the filePath property: Path to the file of StartMenuItem. - * + * * @return the filePath value. */ String filePath(); /** * Gets the commandLineArguments property: Command line arguments for StartMenuItem. - * + * * @return the commandLineArguments value. */ String commandLineArguments(); /** * Gets the iconPath property: Path to the icon. - * + * * @return the iconPath value. */ String iconPath(); /** * Gets the iconIndex property: Index of the icon. - * + * * @return the iconIndex value. */ Integer iconIndex(); /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemInner object. - * + * * @return the inner object. */ StartMenuItemInner innerModel(); 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 16872bbd23db..095e7e056408 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 @@ -11,8 +11,8 @@ /** * StartMenuItemList - * - *

List of StartMenuItem definitions. + * + * List of StartMenuItem definitions. */ @Fluent public final class StartMenuItemList { @@ -28,13 +28,15 @@ public final class StartMenuItemList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of StartMenuItemList class. */ + /** + * Creates an instance of StartMenuItemList class. + */ public StartMenuItemList() { } /** * Get the value property: List of StartMenuItem definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of StartMenuItem definitions. - * + * * @param value the value value to set. * @return the StartMenuItemList object itself. */ @@ -54,7 +56,7 @@ public StartMenuItemList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/StartMenuItems.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartMenuItems.java index 8d9977a8b98d..6a93a98e939f 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 @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of StartMenuItems. */ +/** + * Resource collection API of StartMenuItems. + */ public interface StartMenuItems { /** * 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. @@ -23,7 +25,7 @@ public interface StartMenuItems { /** * List start menu items in the given application group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param applicationGroupName The name of the application group. * @param pageSize Number of items per page. @@ -35,11 +37,6 @@ public interface StartMenuItems { * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - 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/StartupBehavior.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartupBehavior.java index a26cd2b0b57f..c2694d90781a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartupBehavior.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/StartupBehavior.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The desired startup behavior during the ramp up period for personal vms in the hostpool. */ +/** + * The desired startup behavior during the ramp up period for personal vms in the hostpool. + */ public final class StartupBehavior extends ExpandableStringEnum { - /** Static value None for StartupBehavior. */ + /** + * Static value None for StartupBehavior. + */ public static final StartupBehavior NONE = fromString("None"); - /** Static value WithAssignedUser for StartupBehavior. */ + /** + * Static value WithAssignedUser for StartupBehavior. + */ public static final StartupBehavior WITH_ASSIGNED_USER = fromString("WithAssignedUser"); - /** Static value All for StartupBehavior. */ + /** + * Static value All for StartupBehavior. + */ public static final StartupBehavior ALL = fromString("All"); /** * Creates a new instance of StartupBehavior value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public StartupBehavior() { /** * Creates or finds a StartupBehavior from its string representation. - * + * * @param name a name to look for. * @return the corresponding StartupBehavior. */ @@ -41,7 +49,7 @@ public static StartupBehavior fromString(String name) { /** * Gets known StartupBehavior values. - * + * * @return known StartupBehavior values. */ public static Collection values() { 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 db11425a6d49..c0f348a721ae 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,47 +8,73 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Status for a SessionHost. */ +/** + * Status for a SessionHost. + */ public final class Status extends ExpandableStringEnum { - /** Static value Available for Status. */ + /** + * Static value Available for Status. + */ public static final Status AVAILABLE = fromString("Available"); - /** Static value Unavailable for Status. */ + /** + * Static value Unavailable for Status. + */ public static final Status UNAVAILABLE = fromString("Unavailable"); - /** Static value Shutdown for Status. */ + /** + * Static value Shutdown for Status. + */ public static final Status SHUTDOWN = fromString("Shutdown"); - /** Static value Disconnected for Status. */ + /** + * Static value Disconnected for Status. + */ public static final Status DISCONNECTED = fromString("Disconnected"); - /** Static value Upgrading for Status. */ + /** + * Static value Upgrading for Status. + */ public static final Status UPGRADING = fromString("Upgrading"); - /** Static value UpgradeFailed for Status. */ + /** + * Static value UpgradeFailed for Status. + */ public static final Status UPGRADE_FAILED = fromString("UpgradeFailed"); - /** Static value NoHeartbeat for Status. */ + /** + * Static value NoHeartbeat for Status. + */ public static final Status NO_HEARTBEAT = fromString("NoHeartbeat"); - /** Static value NotJoinedToDomain for Status. */ + /** + * Static value NotJoinedToDomain for Status. + */ public static final Status NOT_JOINED_TO_DOMAIN = fromString("NotJoinedToDomain"); - /** Static value DomainTrustRelationshipLost for Status. */ + /** + * Static value DomainTrustRelationshipLost for Status. + */ public static final Status DOMAIN_TRUST_RELATIONSHIP_LOST = fromString("DomainTrustRelationshipLost"); - /** Static value SxSStackListenerNotReady for Status. */ + /** + * Static value SxSStackListenerNotReady for Status. + */ public static final Status SX_SSTACK_LISTENER_NOT_READY = fromString("SxSStackListenerNotReady"); - /** Static value FSLogixNotHealthy for Status. */ + /** + * Static value FSLogixNotHealthy for Status. + */ public static final Status FSLOGIX_NOT_HEALTHY = fromString("FSLogixNotHealthy"); - /** Static value NeedsAssistance for Status. */ + /** + * Static value NeedsAssistance for Status. + */ public static final Status NEEDS_ASSISTANCE = fromString("NeedsAssistance"); /** * Creates a new instance of Status value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -57,7 +83,7 @@ public Status() { /** * Creates or finds a Status from its string representation. - * + * * @param name a name to look for. * @return the corresponding Status. */ @@ -68,7 +94,7 @@ public static Status fromString(String name) { /** * Gets known Status values. - * + * * @return known Status values. */ public static Collection values() { 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 d053925b9797..3060d84f88f4 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,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Specifies when to stop hosts during ramp down period. */ +/** + * Specifies when to stop hosts during ramp down period. + */ public final class StopHostsWhen extends ExpandableStringEnum { - /** Static value ZeroSessions for StopHostsWhen. */ + /** + * Static value ZeroSessions for StopHostsWhen. + */ public static final StopHostsWhen ZERO_SESSIONS = fromString("ZeroSessions"); - /** Static value ZeroActiveSessions for StopHostsWhen. */ + /** + * Static value ZeroActiveSessions for StopHostsWhen. + */ public static final StopHostsWhen ZERO_ACTIVE_SESSIONS = fromString("ZeroActiveSessions"); /** * Creates a new instance of StopHostsWhen value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public StopHostsWhen() { /** * Creates or finds a StopHostsWhen from its string representation. - * + * * @param name a name to look for. * @return the corresponding StopHostsWhen. */ @@ -38,7 +44,7 @@ public static StopHostsWhen fromString(String name) { /** * Gets known StopHostsWhen values. - * + * * @return known StopHostsWhen values. */ public static Collection values() { 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 8e06cf5d8cfc..911c9da9bbce 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The time for a scaling action to occur. */ +/** + * The time for a scaling action to occur. + */ @Fluent public final class Time { /* @@ -22,13 +24,15 @@ public final class Time { @JsonProperty(value = "minute", required = true) private int minute; - /** Creates an instance of Time class. */ + /** + * Creates an instance of Time class. + */ public Time() { } /** * Get the hour property: The hour. - * + * * @return the hour value. */ public int hour() { @@ -37,7 +41,7 @@ public int hour() { /** * Set the hour property: The hour. - * + * * @param hour the hour value to set. * @return the Time object itself. */ @@ -48,7 +52,7 @@ public Time withHour(int hour) { /** * Get the minute property: The minute. - * + * * @return the minute value. */ public int minute() { @@ -57,7 +61,7 @@ public int minute() { /** * Set the minute property: The minute. - * + * * @param minute the minute value to set. * @return the Time object itself. */ @@ -68,7 +72,7 @@ public Time withMinute(int minute) { /** * 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/UpdateState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UpdateState.java index a0f4d84110cf..d3723e3eb8ae 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,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Update state of a SessionHost. */ +/** + * Update state of a SessionHost. + */ public final class UpdateState extends ExpandableStringEnum { - /** Static value Initial for UpdateState. */ + /** + * Static value Initial for UpdateState. + */ public static final UpdateState INITIAL = fromString("Initial"); - /** Static value Pending for UpdateState. */ + /** + * Static value Pending for UpdateState. + */ public static final UpdateState PENDING = fromString("Pending"); - /** Static value Started for UpdateState. */ + /** + * Static value Started for UpdateState. + */ public static final UpdateState STARTED = fromString("Started"); - /** Static value Succeeded for UpdateState. */ + /** + * Static value Succeeded for UpdateState. + */ public static final UpdateState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for UpdateState. */ + /** + * Static value Failed for UpdateState. + */ public static final UpdateState FAILED = fromString("Failed"); /** * Creates a new instance of UpdateState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public UpdateState() { /** * Creates or finds a UpdateState from its string representation. - * + * * @param name a name to look for. * @return the corresponding UpdateState. */ @@ -47,7 +59,7 @@ public static UpdateState fromString(String name) { /** * Gets known UpdateState values. - * + * * @return known UpdateState values. */ public static Collection values() { diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSession.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSession.java index e671912a11ef..29a03ac0dc10 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSession.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSession.java @@ -8,81 +8,83 @@ import com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of UserSession. */ +/** + * An immutable client-side representation of UserSession. + */ public interface UserSession { /** * 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. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of user session. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the userPrincipalName property: The user principal name. - * + * * @return the userPrincipalName value. */ String userPrincipalName(); /** * Gets the applicationType property: Application type of application. - * + * * @return the applicationType value. */ ApplicationType applicationType(); /** * Gets the sessionState property: State of user session. - * + * * @return the sessionState value. */ SessionState sessionState(); /** * Gets the activeDirectoryUsername property: The active directory user name. - * + * * @return the activeDirectoryUsername value. */ String activeDirectoryUsername(); /** * Gets the createTime property: The timestamp of the user session create. - * + * * @return the createTime value. */ OffsetDateTime createTime(); /** * Gets the inner com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionInner object. - * + * * @return the inner object. */ UserSessionInner innerModel(); 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 b46192c4d4d3..762288b34296 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 @@ -11,8 +11,8 @@ /** * UserSessionList - * - *

List of UserSession definitions. + * + * List of UserSession definitions. */ @Fluent public final class UserSessionList { @@ -28,13 +28,15 @@ public final class UserSessionList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of UserSessionList class. */ + /** + * Creates an instance of UserSessionList class. + */ public UserSessionList() { } /** * Get the value property: List of UserSession definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of UserSession definitions. - * + * * @param value the value value to set. * @return the UserSessionList object itself. */ @@ -54,7 +56,7 @@ public UserSessionList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/UserSessions.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/UserSessions.java index 035c3aca7b26..15f117fcaa2e 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of UserSessions. */ +/** + * Resource collection API of UserSessions. + */ public interface UserSessions { /** * 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. @@ -24,7 +26,7 @@ public interface UserSessions { /** * 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. @@ -37,18 +39,12 @@ public interface UserSessions { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return userSessionList as paginated response with {@link PagedIterable}. */ - PagedIterable listByHostPool( - String resourceGroupName, - String hostPoolName, - String filter, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable listByHostPool(String resourceGroupName, String hostPoolName, String filter, + Integer pageSize, Boolean isDescending, Integer initialSkip, 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. @@ -59,12 +55,12 @@ PagedIterable listByHostPool( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a userSession along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); + Response getWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, 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. @@ -78,7 +74,7 @@ Response getWithResponse( /** * 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. @@ -90,17 +86,12 @@ Response getWithResponse( * @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 sessionHostname, - String userSessionId, - Boolean force, - Context context); + Response deleteWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, Boolean force, 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. @@ -113,7 +104,7 @@ Response deleteWithResponse( /** * 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. @@ -126,7 +117,7 @@ Response deleteWithResponse( /** * 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. @@ -139,18 +130,12 @@ Response deleteWithResponse( * @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, - Integer pageSize, - Boolean isDescending, - Integer initialSkip, - Context context); + PagedIterable list(String resourceGroupName, String hostPoolName, String sessionHostname, + Integer pageSize, Boolean isDescending, Integer initialSkip, 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. @@ -161,12 +146,12 @@ PagedIterable list( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response disconnectWithResponse( - String resourceGroupName, String hostPoolName, String sessionHostname, String userSessionId, Context context); + Response disconnectWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + String userSessionId, 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. @@ -179,7 +164,7 @@ Response disconnectWithResponse( /** * 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. @@ -191,17 +176,12 @@ Response disconnectWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response sendMessageWithResponse( - String resourceGroupName, - String hostPoolName, - String sessionHostname, - String userSessionId, - SendMessage sendMessage, - Context context); + Response sendMessageWithResponse(String resourceGroupName, String hostPoolName, String sessionHostname, + 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. 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 ed77248a8288..e90a7727bd35 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 @@ -11,39 +11,41 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of Workspace. */ +/** + * An immutable client-side representation of Workspace. + */ public interface Workspace { /** * 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 location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); @@ -52,16 +54,16 @@ public interface Workspace { * Gets 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 delete the resource if it is removed from the template since it is managed by another resource. - * + * * @return the managedBy value. */ String managedBy(); /** * Gets the kind property: 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 + * 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. - * + * * @return the kind value. */ String kind(); @@ -71,70 +73,70 @@ public interface Workspace { * 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. - * + * * @return the etag value. */ String etag(); /** * Gets the identity property: The identity property. - * + * * @return the identity value. */ ResourceModelWithAllowedPropertySetIdentity identity(); /** * Gets the sku property: The sku property. - * + * * @return the sku value. */ ResourceModelWithAllowedPropertySetSku sku(); /** * Gets the plan property: The plan property. - * + * * @return the plan value. */ ResourceModelWithAllowedPropertySetPlan plan(); /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the objectId property: ObjectId of Workspace. (internal use). - * + * * @return the objectId value. */ String objectId(); /** * Gets the description property: Description of Workspace. - * + * * @return the description value. */ String description(); /** * Gets the friendlyName property: Friendly name of Workspace. - * + * * @return the friendlyName value. */ String friendlyName(); /** * Gets the applicationGroupReferences property: List of applicationGroup resource Ids. - * + * * @return the applicationGroupReferences value. */ List applicationGroupReferences(); /** * Gets the cloudPcResource property: Is cloud pc resource. - * + * * @return the cloudPcResource value. */ Boolean cloudPcResource(); @@ -142,7 +144,7 @@ public interface Workspace { /** * Gets the publicNetworkAccess property: Enabled allows this resource to be accessed from both public and private * networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @return the publicNetworkAccess value. */ PublicNetworkAccess publicNetworkAccess(); @@ -150,58 +152,63 @@ public interface Workspace { /** * 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. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * 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.WorkspaceInner object. - * + * * @return the inner object. */ WorkspaceInner innerModel(); - /** The entirety of the Workspace definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Workspace definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Workspace definition stages. */ + /** + * The Workspace definition stages. + */ interface DefinitionStages { - /** The first stage of the Workspace definition. */ + /** + * The first stage of the Workspace definition. + */ interface Blank extends WithLocation { } - /** The stage of the Workspace definition allowing to specify location. */ + /** + * The stage of the Workspace definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -209,18 +216,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Workspace definition allowing to specify parent resource. */ + /** + * The stage of the Workspace definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -231,149 +240,162 @@ interface WithResourceGroup { * The stage of the Workspace definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithManagedBy, - DefinitionStages.WithKind, - DefinitionStages.WithIdentity, - DefinitionStages.WithSku, - DefinitionStages.WithPlan, - DefinitionStages.WithDescription, - DefinitionStages.WithFriendlyName, - DefinitionStages.WithApplicationGroupReferences, - DefinitionStages.WithPublicNetworkAccess { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithManagedBy, + DefinitionStages.WithKind, DefinitionStages.WithIdentity, DefinitionStages.WithSku, + DefinitionStages.WithPlan, DefinitionStages.WithDescription, DefinitionStages.WithFriendlyName, + DefinitionStages.WithApplicationGroupReferences, DefinitionStages.WithPublicNetworkAccess { /** * Executes the create request. - * + * * @return the created resource. */ Workspace create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Workspace create(Context context); } - /** The stage of the Workspace definition allowing to specify tags. */ + /** + * The stage of the Workspace definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Workspace definition allowing to specify managedBy. */ + /** + * The stage of the Workspace definition allowing to specify managedBy. + */ interface WithManagedBy { /** * Specifies 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 delete the resource if it is removed from the template since it is managed by * another resource.. - * + * * @param managedBy 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. + * 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. * @return the next definition stage. */ WithCreate withManagedBy(String managedBy); } - /** The stage of the Workspace definition allowing to specify kind. */ + /** + * The stage of the Workspace definition allowing to specify kind. + */ interface WithKind { /** * Specifies the kind property: 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 + * 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.. - * + * * @param kind 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. + * same type. E.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must + * validate and persist this value. * @return the next definition stage. */ WithCreate withKind(String kind); } - /** The stage of the Workspace definition allowing to specify identity. */ + /** + * The stage of the Workspace definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: The identity property.. - * + * * @param identity The identity property. * @return the next definition stage. */ WithCreate withIdentity(ResourceModelWithAllowedPropertySetIdentity identity); } - /** The stage of the Workspace definition allowing to specify sku. */ + /** + * The stage of the Workspace definition allowing to specify sku. + */ interface WithSku { /** * Specifies the sku property: The sku property.. - * + * * @param sku The sku property. * @return the next definition stage. */ WithCreate withSku(ResourceModelWithAllowedPropertySetSku sku); } - /** The stage of the Workspace definition allowing to specify plan. */ + /** + * The stage of the Workspace definition allowing to specify plan. + */ interface WithPlan { /** * Specifies the plan property: The plan property.. - * + * * @param plan The plan property. * @return the next definition stage. */ WithCreate withPlan(ResourceModelWithAllowedPropertySetPlan plan); } - /** The stage of the Workspace definition allowing to specify description. */ + /** + * The stage of the Workspace definition allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of Workspace.. - * + * * @param description Description of Workspace. * @return the next definition stage. */ WithCreate withDescription(String description); } - /** The stage of the Workspace definition allowing to specify friendlyName. */ + /** + * The stage of the Workspace definition allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of Workspace.. - * + * * @param friendlyName Friendly name of Workspace. * @return the next definition stage. */ WithCreate withFriendlyName(String friendlyName); } - /** The stage of the Workspace definition allowing to specify applicationGroupReferences. */ + /** + * The stage of the Workspace definition allowing to specify applicationGroupReferences. + */ interface WithApplicationGroupReferences { /** * Specifies the applicationGroupReferences property: List of applicationGroup resource Ids.. - * + * * @param applicationGroupReferences List of applicationGroup resource Ids. * @return the next definition stage. */ WithCreate withApplicationGroupReferences(List applicationGroupReferences); } - /** The stage of the Workspace definition allowing to specify publicNetworkAccess. */ + /** + * The stage of the Workspace definition allowing to specify publicNetworkAccess. + */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: Enabled allows this resource to be accessed from both public * and private networks, Disabled allows this resource to only be accessed via private endpoints. - * + * * @param publicNetworkAccess Enabled allows this resource to be accessed from both public and private - * networks, Disabled allows this resource to only be accessed via private endpoints. + * networks, Disabled allows this resource to only be accessed via private endpoints. * @return the next definition stage. */ WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); @@ -382,86 +404,96 @@ interface WithPublicNetworkAccess { /** * Begins update for the Workspace resource. - * + * * @return the stage of resource update. */ Workspace.Update update(); - /** The template for Workspace update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithDescription, - UpdateStages.WithFriendlyName, - UpdateStages.WithApplicationGroupReferences, - UpdateStages.WithPublicNetworkAccess { + /** + * The template for Workspace update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, + UpdateStages.WithApplicationGroupReferences, UpdateStages.WithPublicNetworkAccess { /** * Executes the update request. - * + * * @return the updated resource. */ Workspace apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Workspace apply(Context context); } - /** The Workspace update stages. */ + /** + * The Workspace update stages. + */ interface UpdateStages { - /** The stage of the Workspace update allowing to specify tags. */ + /** + * The stage of the Workspace update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: tags to be updated. - * + * * @param tags tags to be updated. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Workspace update allowing to specify description. */ + /** + * The stage of the Workspace update allowing to specify description. + */ interface WithDescription { /** * Specifies the description property: Description of Workspace.. - * + * * @param description Description of Workspace. * @return the next definition stage. */ Update withDescription(String description); } - /** The stage of the Workspace update allowing to specify friendlyName. */ + /** + * The stage of the Workspace update allowing to specify friendlyName. + */ interface WithFriendlyName { /** * Specifies the friendlyName property: Friendly name of Workspace.. - * + * * @param friendlyName Friendly name of Workspace. * @return the next definition stage. */ Update withFriendlyName(String friendlyName); } - /** The stage of the Workspace update allowing to specify applicationGroupReferences. */ + /** + * The stage of the Workspace update allowing to specify applicationGroupReferences. + */ interface WithApplicationGroupReferences { /** * Specifies the applicationGroupReferences property: List of applicationGroup links.. - * + * * @param applicationGroupReferences List of applicationGroup links. * @return the next definition stage. */ Update withApplicationGroupReferences(List applicationGroupReferences); } - /** The stage of the Workspace update allowing to specify publicNetworkAccess. */ + /** + * The stage of the Workspace update allowing to specify publicNetworkAccess. + */ interface WithPublicNetworkAccess { /** * Specifies the publicNetworkAccess property: Enabled to allow this resource to be access from the public * network. - * + * * @param publicNetworkAccess Enabled to allow this resource to be access from the public network. * @return the next definition stage. */ @@ -471,14 +503,14 @@ interface WithPublicNetworkAccess { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Workspace refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed 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 318ca2db9a64..f361f19d80c5 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 @@ -11,8 +11,8 @@ /** * WorkspaceList - * - *

List of Workspace definitions. + * + * List of Workspace definitions. */ @Fluent public final class WorkspaceList { @@ -28,13 +28,15 @@ public final class WorkspaceList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of WorkspaceList class. */ + /** + * Creates an instance of WorkspaceList class. + */ public WorkspaceList() { } /** * Get the value property: List of Workspace definitions. - * + * * @return the value value. */ public List value() { @@ -43,7 +45,7 @@ public List value() { /** * Set the value property: List of Workspace definitions. - * + * * @param value the value value to set. * @return the WorkspaceList object itself. */ @@ -54,7 +56,7 @@ public WorkspaceList withValue(List value) { /** * Get the nextLink property: Link to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -63,7 +65,7 @@ public String nextLink() { /** * 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/WorkspacePatch.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/WorkspacePatch.java index a2c2849e2ee5..977ec2065c38 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 @@ -11,7 +11,9 @@ import java.util.List; import java.util.Map; -/** Workspace properties that can be patched. */ +/** + * Workspace properties that can be patched. + */ @Fluent public final class WorkspacePatch { /* @@ -27,13 +29,15 @@ public final class WorkspacePatch { @JsonProperty(value = "properties") private WorkspacePatchProperties innerProperties; - /** Creates an instance of WorkspacePatch class. */ + /** + * Creates an instance of WorkspacePatch class. + */ public WorkspacePatch() { } /** * Get the tags property: tags to be updated. - * + * * @return the tags value. */ public Map tags() { @@ -42,7 +46,7 @@ public Map tags() { /** * Set the tags property: tags to be updated. - * + * * @param tags the tags value to set. * @return the WorkspacePatch object itself. */ @@ -53,7 +57,7 @@ public WorkspacePatch withTags(Map tags) { /** * Get the innerProperties property: Detailed properties for Workspace. - * + * * @return the innerProperties value. */ private WorkspacePatchProperties innerProperties() { @@ -62,7 +66,7 @@ private WorkspacePatchProperties innerProperties() { /** * Get the description property: Description of Workspace. - * + * * @return the description value. */ public String description() { @@ -71,7 +75,7 @@ public String description() { /** * Set the description property: Description of Workspace. - * + * * @param description the description value to set. * @return the WorkspacePatch object itself. */ @@ -85,7 +89,7 @@ public WorkspacePatch withDescription(String description) { /** * Get the friendlyName property: Friendly name of Workspace. - * + * * @return the friendlyName value. */ public String friendlyName() { @@ -94,7 +98,7 @@ public String friendlyName() { /** * Set the friendlyName property: Friendly name of Workspace. - * + * * @param friendlyName the friendlyName value to set. * @return the WorkspacePatch object itself. */ @@ -108,7 +112,7 @@ public WorkspacePatch withFriendlyName(String friendlyName) { /** * Get the applicationGroupReferences property: List of applicationGroup links. - * + * * @return the applicationGroupReferences value. */ public List applicationGroupReferences() { @@ -117,7 +121,7 @@ public List applicationGroupReferences() { /** * Set the applicationGroupReferences property: List of applicationGroup links. - * + * * @param applicationGroupReferences the applicationGroupReferences value to set. * @return the WorkspacePatch object itself. */ @@ -131,7 +135,7 @@ public WorkspacePatch withApplicationGroupReferences(List applicationGro /** * Get the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @return the publicNetworkAccess value. */ public PublicNetworkAccess publicNetworkAccess() { @@ -140,7 +144,7 @@ public PublicNetworkAccess publicNetworkAccess() { /** * Set the publicNetworkAccess property: Enabled to allow this resource to be access from the public network. - * + * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the WorkspacePatch object itself. */ @@ -154,7 +158,7 @@ public WorkspacePatch withPublicNetworkAccess(PublicNetworkAccess publicNetworkA /** * 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/Workspaces.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/Workspaces.java index be4529a32ef8..c584e21924b3 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Workspaces. */ +/** + * Resource collection API of Workspaces. + */ public interface Workspaces { /** * 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. @@ -25,7 +27,7 @@ public interface Workspaces { /** * 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. @@ -37,7 +39,7 @@ public interface Workspaces { /** * 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. @@ -50,7 +52,7 @@ public interface Workspaces { /** * 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. @@ -61,7 +63,7 @@ public interface Workspaces { /** * 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. @@ -72,7 +74,7 @@ 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. @@ -83,12 +85,12 @@ public interface Workspaces { * @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, Integer pageSize, Boolean isDescending, Integer initialSkip, Context context); + PagedIterable listByResourceGroup(String resourceGroupName, Integer pageSize, Boolean isDescending, + Integer initialSkip, 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 PagedIterable}. @@ -97,7 +99,7 @@ PagedIterable listByResourceGroup( /** * List workspaces in subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -108,7 +110,7 @@ PagedIterable listByResourceGroup( /** * Get a workspace. - * + * * @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. @@ -119,7 +121,7 @@ PagedIterable listByResourceGroup( /** * Get a workspace. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -131,7 +133,7 @@ PagedIterable listByResourceGroup( /** * Remove a workspace. - * + * * @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. @@ -141,7 +143,7 @@ PagedIterable listByResourceGroup( /** * Remove a workspace. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -153,7 +155,7 @@ PagedIterable listByResourceGroup( /** * Begins definition for a new Workspace resource. - * + * * @param name resource name. * @return the first stage of the new Workspace definition. */ diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/package-info.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/package-info.java index e101adf77c19..ac9ee1c6643f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/package-info.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for DesktopVirtualizationApiClient. null. */ +/** + * Package containing the data models for DesktopVirtualizationApiClient. + * null. + */ package com.azure.resourcemanager.desktopvirtualization.models; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/package-info.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/package-info.java index 50766baf55a6..5240260090e6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/package-info.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for DesktopVirtualizationApiClient. null. */ +/** + * Package containing the classes for DesktopVirtualizationApiClient. + * null. + */ package com.azure.resourcemanager.desktopvirtualization; diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/module-info.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/module-info.java index b9d12db35dc5..c3afaf894f3e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/module-info.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.desktopvirtualization { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.desktopvirtualization; exports com.azure.resourcemanager.desktopvirtualization.fluent; exports com.azure.resourcemanager.desktopvirtualization.fluent.models; exports com.azure.resourcemanager.desktopvirtualization.models; - - opens com.azure.resourcemanager.desktopvirtualization.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.desktopvirtualization.models to - com.azure.core, - com.fasterxml.jackson.databind; -} + opens com.azure.resourcemanager.desktopvirtualization.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.desktopvirtualization.models to com.azure.core, com.fasterxml.jackson.databind; +} \ No newline at end of file diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-desktopvirtualization/proxy-config.json b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-desktopvirtualization/proxy-config.json new file mode 100644 index 000000000000..506cf87a7d5b --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-desktopvirtualization/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.desktopvirtualization.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.WorkspacesClientImpl$WorkspacesService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.ScalingPlansClientImpl$ScalingPlansService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.ScalingPlanPooledSchedulesClientImpl$ScalingPlanPooledSchedulesService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.ScalingPlanPersonalSchedulesClientImpl$ScalingPlanPersonalSchedulesService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.ApplicationGroupsClientImpl$ApplicationGroupsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.StartMenuItemsClientImpl$StartMenuItemsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.ApplicationsClientImpl$ApplicationsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.DesktopsClientImpl$DesktopsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.HostPoolsClientImpl$HostPoolsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.UserSessionsClientImpl$UserSessionsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.SessionHostsClientImpl$SessionHostsService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.MsixPackagesClientImpl$MsixPackagesService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.AppAttachPackageInfoesClientImpl$AppAttachPackageInfoesService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.MsixImagesClientImpl$MsixImagesService" ], [ "com.azure.resourcemanager.desktopvirtualization.implementation.AppAttachPackagesClientImpl$AppAttachPackagesService" ] ] \ No newline at end of file diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-desktopvirtualization/reflect-config.json b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-desktopvirtualization/reflect-config.json new file mode 100644 index 000000000000..8f8f082a98cf --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-desktopvirtualization/reflect-config.json @@ -0,0 +1,676 @@ +[ { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.OperationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.LogSpecification", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.Identity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.Sku", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.Plan", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.WorkspacePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspacePatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionListResultWithSystemData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.WorkspaceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.Time", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedulePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledScheduleList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalScheduleList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.StartMenuItemList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ApplicationPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ApplicationList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.DesktopList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPropertiesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.RegistrationInfoInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.HostPoolPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.HostPoolPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.RegistrationInfoPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.HostPoolList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.UserSessionList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionHostHealthCheckReport", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionHostHealthCheckFailureDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionHostList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.MsixPackagePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackagePatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.MsixPackageList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ImportPackageInfoRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageInfoProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ExpandMsixImageList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackagePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackagePatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SendMessage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ScalingScheduleDaysOfWeekItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.HostPoolType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PersonalDesktopAssignmentType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.LoadBalancerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.RegistrationTokenOperation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SsoSecretType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PreferredAppGroupType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.HostpoolPublicNetworkAccess", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ApplicationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SessionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.Status", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.UpdateState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.HealthCheckName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.HealthCheckResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageArchitectures", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.PackageTimestamped", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.FailHealthCheckOnStagingFailure", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.SkuTier", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.desktopvirtualization.models.ResourceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageCreateOrUpdateSamples.java new file mode 100644 index 000000000000..908d13f035f3 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageCreateOrUpdateSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageInfoProperties; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageProperties; +import com.azure.resourcemanager.desktopvirtualization.models.FailHealthCheckOnStagingFailure; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; +import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; +import java.time.OffsetDateTime; +import java.util.Arrays; + +/** + * Samples for AppAttachPackage CreateOrUpdate. + */ +public final class AppAttachPackageCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Create.json + */ + /** + * Sample code: AppAttachPackage_Create. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .define("msixpackagefullname") + .withRegion("southcentralus") + .withExistingResourceGroup("resourceGroup1") + .withProperties(new AppAttachPackageProperties() + .withImage(new AppAttachPackageInfoProperties().withPackageAlias("msixpackagealias") + .withImagePath("imagepath") + .withPackageName("MsixPackageName") + .withPackageFamilyName("MsixPackage_FamilyName") + .withPackageFullName("MsixPackage_FullName") + .withDisplayName("displayname") + .withPackageRelativePath("packagerelativepath") + .withIsRegularRegistration(false) + .withIsActive(false) + .withPackageDependencies( + Arrays.asList(new MsixPackageDependencies().withDependencyName("MsixPackage_Dependency_Name") + .withPublisher("MsixPackage_Dependency_Publisher") + .withMinVersion("packageDep_version"))) + .withVersion("packageversion") + .withLastUpdated(OffsetDateTime.parse("2008-09-22T14:01:54.9571247Z")) + .withPackageApplications(Arrays.asList(new MsixPackageApplications().withAppId("AppId") + .withDescription("PackageApplicationDescription") + .withAppUserModelId("AppUserModelId") + .withFriendlyName("FriendlyName") + .withIconImageName("Iconimagename") + .withRawIcon("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()) + .withRawPng("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()))) + .withCertificateName("certName") + .withCertificateExpiry(OffsetDateTime.parse("2023-01-02T17:18:19.1234567Z"))) + .withHostPoolReferences(Arrays.asList()) + .withKeyVaultUrl("fakeTokenPlaceholder") + .withFailHealthCheckOnStagingFailure(FailHealthCheckOnStagingFailure.NEEDS_ASSISTANCE)) + .create(); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageDeleteSamples.java new file mode 100644 index 000000000000..c4150b14410c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** + * Samples for AppAttachPackage Delete. + */ +public final class AppAttachPackageDeleteSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Delete.json + */ + /** + * Sample code: AppAttachPackage_Delete. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .deleteByResourceGroupWithResponse("resourceGroup1", "packagefullname", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageGetByResourceGroupSamples.java new file mode 100644 index 000000000000..838a7db71c2d --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageGetByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** + * Samples for AppAttachPackage GetByResourceGroup. + */ +public final class AppAttachPackageGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Get.json + */ + /** + * Sample code: AppAttachPackage_Get. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .getByResourceGroupWithResponse("resourceGroup1", "packagefullname", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageInfoImportMethodSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageInfoImportMethodSamples.java new file mode 100644 index 000000000000..59a1ade9a05c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageInfoImportMethodSamples.java @@ -0,0 +1,28 @@ +// Copyright (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.AppAttachPackageArchitectures; +import com.azure.resourcemanager.desktopvirtualization.models.ImportPackageInfoRequest; + +/** + * Samples for AppAttachPackageInfo ImportMethod. + */ +public final class AppAttachPackageInfoImportMethodSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackageInfo_Import_Post.json + */ + /** + * Sample code: AppAttachPackageInfo_Import. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void appAttachPackageInfoImport( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackageInfoes() + .importMethod("resourceGroup1", "hostpool1", new ImportPackageInfoRequest().withPath("imagepath") + .withPackageArchitecture(AppAttachPackageArchitectures.X64), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListByResourceGroupSamples.java new file mode 100644 index 000000000000..2eb4f2c3b295 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** + * Samples for AppAttachPackage ListByResourceGroup. + */ +public final class AppAttachPackageListByResourceGroupSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_ListByResourceGroup.json + */ + /** + * Sample code: AppAttachPackage_ListByResourceGroup. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void appAttachPackageListByResourceGroup( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages() + .listByResourceGroup("resourceGroup1", "HostPoolName eq 'hostpool1'", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListSamples.java new file mode 100644 index 000000000000..3af79f5813bb --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.generated; + +/** + * Samples for AppAttachPackage List. + */ +public final class AppAttachPackageListSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_ListBySubscription.json + */ + /** + * Sample code: AppAttachPackage_ListBySubscription. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void appAttachPackageListBySubscription( + com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.appAttachPackages().list("HostPoolName eq 'hostpool1'", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageUpdateSamples.java new file mode 100644 index 000000000000..0c04d59ca13c --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (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.AppAttachPackage; + +/** + * Samples for AppAttachPackage Update. + */ +public final class AppAttachPackageUpdateSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/AppAttachPackage_Update.json + */ + /** + * Sample code: AppAttachPackage_Update. + * + * @param manager Entry point to DesktopVirtualizationManager. + */ + public static void + appAttachPackageUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + AppAttachPackage resource = manager.appAttachPackages() + .getByResourceGroupWithResponse("resourceGroup1", "msixpackagefullname", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java index bb8172264487..787bac15f388 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 @@ -8,20 +8,21 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ApplicationGroups CreateOrUpdate. */ +/** + * Samples for ApplicationGroups CreateOrUpdate. + */ public final class ApplicationGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() + public static void + applicationGroupCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applicationGroups() .define("applicationGroup1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") 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 60108384f45c..e271ab9d910a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ApplicationGroups Delete. */ +/** + * Samples for ApplicationGroups Delete. + */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() + public static void + applicationGroupDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applicationGroups() .deleteByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java index bf74645cc6ac..897932c8514d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ApplicationGroups GetByResourceGroup. */ +/** + * Samples for ApplicationGroups GetByResourceGroup. + */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() + public static void + applicationGroupGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applicationGroups() .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java index f4860929fe98..89609f88fc96 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java @@ -4,26 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ApplicationGroups ListByResourceGroup. */ +/** + * Samples for ApplicationGroups ListByResourceGroup. + */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void applicationGroupListByResourceGroup( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applicationGroups() - .listByResourceGroup( - "resourceGroup1", - "applicationGroupType eq 'RailApplication'", - 10, - true, - 0, + manager.applicationGroups() + .listByResourceGroup("resourceGroup1", "applicationGroupType eq 'RailApplication'", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java index 4be0ec5be229..c9d2a5533bb9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ApplicationGroups List. */ +/** + * Samples for ApplicationGroups List. + */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + applicationGroupList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.applicationGroups().list("applicationGroupType eq 'RailApplication'", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java index d947de84a414..06271caa72ef 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 @@ -8,25 +8,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ApplicationGroups Update. */ +/** + * Samples for ApplicationGroups Update. + */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGroupsUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ApplicationGroup resource = - manager - .applicationGroups() - .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + applicationGroupsUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + ApplicationGroup resource = manager.applicationGroups() + .getByResourceGroupWithResponse("resourceGroup1", "applicationGroup1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") 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 9cb6306bac21..a9e3d9d26984 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 @@ -6,20 +6,21 @@ import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -/** Samples for Applications CreateOrUpdate. */ +/** + * Samples for Applications CreateOrUpdate. + */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Create.json */ /** * Sample code: Application_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() + public static void + applicationCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() .define("application1") .withExistingApplicationGroup("resourceGroup1", "applicationGroup1") .withCommandLineSetting(CommandLineSetting.ALLOW) 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 a08d501719e0..46192f805507 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Applications Delete. */ +/** + * Samples for Applications Delete. + */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Delete.json */ /** * Sample code: Application_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() - .deleteWithResponse( - "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); + public static void + applicationDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() + .deleteWithResponse("resourceGroup1", "applicationGroup1", "application1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java index a5e9be9340d2..2f0e27bc9f4f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Applications Get. */ +/** + * Samples for Applications Get. + */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Get.json */ /** * Sample code: Application_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() + public static void + applicationGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() .getWithResponse("resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java index 0acf2a3e579d..9840815a7d18 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Applications List. */ +/** + * Samples for Applications List. + */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_List.json */ /** * Sample code: Applications_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationsList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .applications() + public static void + applicationsList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.applications() .list("resourceGroup1", "applicationGroup1", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java index ad21688194c5..e9fd47cd7fc7 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 @@ -8,26 +8,24 @@ import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -/** Samples for Applications Update. */ +/** + * Samples for Applications Update. + */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Application_Update.json */ /** * Sample code: Application_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void applicationUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - Application resource = - manager - .applications() - .getWithResponse( - "resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + applicationUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + Application resource = manager.applications() + .getWithResponse("resourceGroup1", "applicationGroup1", "application1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withDescription("des1") .withFriendlyName("friendly") .withFilePath("path") 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 6ee3076ede97..59bd802cd863 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Desktops Get. */ +/** + * Samples for Desktops Get. + */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void desktopGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .desktops() + public static void + desktopGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.desktops() .getWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java index 76dd322caec7..e329beb368ae 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Desktops List. */ +/** + * Samples for Desktops List. + */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_List.json */ /** * Sample code: Desktop_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void desktopList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + desktopList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.desktops().list("resourceGroup1", "applicationGroup1", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java index fd3ce680eb4d..e6badf070771 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 @@ -6,24 +6,22 @@ import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; -/** Samples for Desktops Update. */ +/** + * Samples for Desktops Update. + */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void desktopUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .desktops() - .updateWithResponse( - "resourceGroup1", - "applicationGroup1", - "SessionDesktop", + public static void + desktopUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.desktops() + .updateWithResponse("resourceGroup1", "applicationGroup1", "SessionDesktop", new DesktopPatch().withDescription("des1").withFriendlyName("friendly"), com.azure.core.util.Context.NONE); } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java index aebcc181e4f4..82532f430c05 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 @@ -20,20 +20,21 @@ import java.util.HashMap; import java.util.Map; -/** Samples for HostPools CreateOrUpdate. */ +/** + * Samples for HostPools CreateOrUpdate. + */ public final class HostPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .hostPools() + public static void + hostPoolCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.hostPools() .define("hostPool1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") @@ -46,8 +47,7 @@ public static void hostPoolCreate( .withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType.AUTOMATIC) .withMaxSessionLimit(999999) .withRegistrationInfo( - new RegistrationInfoInner() - .withExpirationTime(OffsetDateTime.parse("2020-10-01T14:01:54.9571247Z")) + new RegistrationInfoInner().withExpirationTime(OffsetDateTime.parse("2020-10-01T14:01:54.9571247Z")) .withRegistrationTokenOperation(RegistrationTokenOperation.UPDATE)) .withVmTemplate("{json:json}") .withSsoadfsAuthority("https://adfs") @@ -55,16 +55,12 @@ public static void hostPoolCreate( .withSsoClientSecretKeyVaultPath("https://keyvault/secret") .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) - .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)))) + .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 777aaa57fb5d..9c80403d4ab7 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for HostPools Delete. */ +/** + * Samples for HostPools Delete. + */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + hostPoolDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.hostPools().deleteWithResponse("resourceGroup1", "hostPool1", true, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java index 8ab5ce0650e0..6a8f3b71da0c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for HostPools GetByResourceGroup. */ +/** + * Samples for HostPools GetByResourceGroup. + */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .hostPools() + public static void + hostPoolGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.hostPools() .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java index 8f8a1916a901..81a21d1b4999 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for HostPools ListByResourceGroup. */ +/** + * Samples for HostPools ListByResourceGroup. + */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void hostPoolListByResourceGroup( 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 e4edb9ceea55..31449505a44d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for HostPools List. */ +/** + * Samples for HostPools List. + */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_List.json */ /** * Sample code: HostPool_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + hostPoolList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.hostPools().list(10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java index 516b1e4c3329..b61e86232af3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for HostPools RetrieveRegistrationToken. */ +/** + * Samples for HostPools RetrieveRegistrationToken. + */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void hostPoolsRetrieveRegistrationTokenPost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .hostPools() + manager.hostPools() .retrieveRegistrationTokenWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java index 171045fcfb64..45e968e8d2a0 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 @@ -19,25 +19,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for HostPools Update. */ +/** + * Samples for HostPools Update. + */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void hostPoolUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - HostPool resource = - manager - .hostPools() - .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + hostPoolUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + HostPool resource = manager.hostPools() + .getByResourceGroupWithResponse("resourceGroup1", "hostPool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withFriendlyName("friendly") .withDescription("des1") @@ -45,8 +44,7 @@ public static void hostPoolUpdate( .withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType.AUTOMATIC) .withLoadBalancerType(LoadBalancerType.BREADTH_FIRST) .withRegistrationInfo( - new RegistrationInfoPatch() - .withExpirationTime(OffsetDateTime.parse("2020-10-01T15:01:54.9571247Z")) + new RegistrationInfoPatch().withExpirationTime(OffsetDateTime.parse("2020-10-01T15:01:54.9571247Z")) .withRegistrationTokenOperation(RegistrationTokenOperation.UPDATE)) .withVmTemplate("{json:json}") .withSsoadfsAuthority("https://adfs") @@ -55,15 +53,12 @@ public static void hostPoolUpdate( .withSsoSecretType(SsoSecretType.SHARED_KEY) .withStartVMOnConnect(false) .withAgentUpdate( - new AgentUpdatePatchProperties() - .withType(SessionHostComponentUpdateType.SCHEDULED) + 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)))) + .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 08e32074dcc8..27d42e1c703e 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 @@ -6,24 +6,22 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; -/** Samples for MsixImages Expand. */ +/** + * Samples for MsixImages Expand. + */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void msixImageExpand( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixImages() - .expand( - "resourceGroup1", - "hostpool1", - new MsixImageUri().withUri("imagepath"), + public static void + msixImageExpand(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixImages() + .expand("resourceGroup1", "hostpool1", new MsixImageUri().withUri("imagepath"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java index 7eb05104702e..90b19c57e2b0 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 @@ -9,20 +9,21 @@ import java.time.OffsetDateTime; import java.util.Arrays; -/** Samples for MsixPackages CreateOrUpdate. */ +/** + * Samples for MsixPackages CreateOrUpdate. + */ public final class MsixPackagesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixPackages() + public static void + mSIXPackageCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixPackages() .define("msixpackagefullname") .withExistingHostPool("resourceGroup1", "hostpool1") .withImagePath("imagepath") @@ -33,25 +34,18 @@ public static void mSIXPackageCreate( .withIsRegularRegistration(false) .withIsActive(false) .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("MsixTest_Dependency_Name") - .withPublisher("PublishedName") - .withMinVersion("version"))) + Arrays.asList(new MsixPackageDependencies().withDependencyName("MsixTest_Dependency_Name") + .withPublisher("PublishedName") + .withMinVersion("version"))) .withVersion("version") .withLastUpdated(OffsetDateTime.parse("2008-09-22T14:01:54.9571247Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("ApplicationId") - .withDescription("application-desc") - .withAppUserModelId("AppUserModelId") - .withFriendlyName("friendlyname") - .withIconImageName("Apptile") - .withRawIcon("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()) - .withRawPng("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()))) + .withPackageApplications(Arrays.asList(new MsixPackageApplications().withAppId("ApplicationId") + .withDescription("application-desc") + .withAppUserModelId("AppUserModelId") + .withFriendlyName("friendlyname") + .withIconImageName("Apptile") + .withRawIcon("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()) + .withRawPng("VGhpcyBpcyBhIHN0cmluZyB0byBoYXNo".getBytes()))) .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 3535f5d6c93d..46cbc93d7e83 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for MsixPackages Delete. */ +/** + * Samples for MsixPackages Delete. + */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixPackages() + public static void + mSIXPackageDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixPackages() .deleteWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java index d74c26d6d288..8c1e5bc783dc 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for MsixPackages Get. */ +/** + * Samples for MsixPackages Get. + */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .msixPackages() + public static void + mSIXPackageGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.msixPackages() .getWithResponse("resourceGroup1", "hostpool1", "packagefullname", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java index f45e7e5ede6c..636aa55f24e8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for MsixPackages List. */ +/** + * Samples for MsixPackages List. + */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + mSIXPackageList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.msixPackages().list("resourceGroup1", "hostpool1", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java index 671bd72e6eb4..06f8b7fc711e 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 @@ -6,23 +6,23 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; -/** Samples for MsixPackages Update. */ +/** + * Samples for MsixPackages Update. + */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void mSIXPackageUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - MsixPackage resource = - manager - .msixPackages() - .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", com.azure.core.util.Context.NONE) - .getValue(); + public static void + mSIXPackageUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + MsixPackage resource = manager.msixPackages() + .getWithResponse("resourceGroup1", "hostpool1", "msixpackagefullname", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withIsActive(true).withIsRegularRegistration(false).withDisplayName("displayname").apply(); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java index 28b0226815cc..7ef24be6cef4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void operationDescriptionList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + operationDescriptionList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java index e32cfef70403..c129b127e728 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java @@ -4,24 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateEndpointConnections DeleteByHostPool. */ +/** + * Samples for PrivateEndpointConnections DeleteByHostPool. + */ public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_DeleteByHostPool.json */ /** * Sample code: PrivateEndpointConnection_DeleteByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionDeleteByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .deleteByHostPoolWithResponse( - "resourceGroup1", - "hostPool1", - "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .deleteByHostPoolWithResponse("resourceGroup1", "hostPool1", + "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java index 69f4b8e0ed9e..0ebace7dbc34 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java @@ -4,24 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateEndpointConnections DeleteByWorkspace. */ +/** + * Samples for PrivateEndpointConnections DeleteByWorkspace. + */ public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_DeleteByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_DeleteByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_DeleteByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionDeleteByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .deleteByWorkspaceWithResponse( - "resourceGroup1", - "workspace1", - "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .deleteByWorkspaceWithResponse("resourceGroup1", "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java index e48da89af70a..557354f0de31 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java @@ -4,24 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateEndpointConnections GetByHostPool. */ +/** + * Samples for PrivateEndpointConnections GetByHostPool. + */ public final class PrivateEndpointConnectionsGetByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_GetByHostPool.json */ /** * Sample code: PrivateEndpointConnection_GetByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionGetByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .getByHostPoolWithResponse( - "resourceGroup1", - "hostPool1", - "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", + manager.privateEndpointConnections() + .getByHostPoolWithResponse("resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java index 8f3e3d4ff540..baaebc67ef7c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java @@ -4,24 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateEndpointConnections GetByWorkspace. */ +/** + * Samples for PrivateEndpointConnections GetByWorkspace. + */ public final class PrivateEndpointConnectionsGetByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_GetByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_GetByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_GetByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionGetByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .getByWorkspaceWithResponse( - "resourceGroup1", - "workspace1", - "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - com.azure.core.util.Context.NONE); + manager.privateEndpointConnections() + .getByWorkspaceWithResponse("resourceGroup1", "workspace1", + "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java index 58ed915c64e5..e2f283be5d71 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateEndpointConnections ListByHostPool. */ +/** + * Samples for PrivateEndpointConnections ListByHostPool. + */ public final class PrivateEndpointConnectionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_ListByHostPool.json */ /** * Sample code: PrivateEndpointConnection_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java index 271e032f9c9a..ed147d0b66c6 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateEndpointConnections ListByWorkspace. */ +/** + * Samples for PrivateEndpointConnections ListByWorkspace. + */ public final class PrivateEndpointConnectionsListByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_ListByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_ListByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_ListByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() + manager.privateEndpointConnections() .listByWorkspace("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java index 309d8ccbcd6a..b30e9412efb5 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 @@ -8,30 +8,27 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -/** Samples for PrivateEndpointConnections UpdateByHostPool. */ +/** + * Samples for PrivateEndpointConnections UpdateByHostPool. + */ public final class PrivateEndpointConnectionsUpdateByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_UpdateByHostPool.json */ /** * Sample code: PrivateEndpointConnection_UpdateByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionUpdateByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .updateByHostPoolWithResponse( - "resourceGroup1", - "hostPool1", + manager.privateEndpointConnections() + .updateByHostPoolWithResponse("resourceGroup1", "hostPool1", "hostPool1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - new PrivateEndpointConnection() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by admin@consoto.com") - .withActionsRequired("None")), + new PrivateEndpointConnection().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java index 7e351104dba2..ecbd5b33be96 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 @@ -8,30 +8,27 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -/** Samples for PrivateEndpointConnections UpdateByWorkspace. */ +/** + * Samples for PrivateEndpointConnections UpdateByWorkspace. + */ public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateEndpointConnection_UpdateByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_UpdateByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateEndpointConnectionUpdateByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateEndpointConnections() - .updateByWorkspaceWithResponse( - "resourceGroup1", - "workspace1", + manager.privateEndpointConnections() + .updateByWorkspaceWithResponse("resourceGroup1", "workspace1", "workspace1.377103f1-5179-4bdf-8556-4cdd3207cc5b", - new PrivateEndpointConnection() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Approved by admin@consoto.com") - .withActionsRequired("None")), + new PrivateEndpointConnection().withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Approved by admin@consoto.com") + .withActionsRequired("None")), com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java index b7d07c4ea030..880db6a22cd1 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateLinkResources ListByHostPool. */ +/** + * Samples for PrivateLinkResources ListByHostPool. + */ public final class PrivateLinkResourcesListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateLinkResources_ListByHostPool.json */ /** * Sample code: PrivateLinkResources_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateLinkResourcesListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateLinkResources() + manager.privateLinkResources() .listByHostPool("resourceGroup1", "hostPool1", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java index 8dc18d338f9c..fc9cad3e0278 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for PrivateLinkResources ListByWorkspace. */ +/** + * Samples for PrivateLinkResources ListByWorkspace. + */ public final class PrivateLinkResourcesListByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateLinkResources_ListByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/PrivateLinkResources_ListByWorkspace.json */ /** * Sample code: PrivateLinkResources_ListByWorkspace. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void privateLinkResourcesListByWorkspace( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .privateLinkResources() + manager.privateLinkResources() .listByWorkspace("resourceGroup1", "workspace1", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java index 237dee12c609..6c51f39d3427 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateSamples.java @@ -11,26 +11,25 @@ import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; -/** Samples for ScalingPlanPersonalSchedules Create. */ +/** + * Samples for ScalingPlanPersonalSchedules Create. + */ public final class ScalingPlanPersonalSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Create.json */ /** * Sample code: ScalingPlanPersonalSchedules_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesCreate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() + manager.scalingPlanPersonalSchedules() .define("scalingPlanScheduleWeekdays1") .withExistingScalingPlan("resourceGroup1", "scalingPlan1") - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .withDaysOfWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, + DayOfWeek.FRIDAY)) .withRampUpStartTime(new Time().withHour(6).withMinute(0)) .withRampUpAutoStartHosts(StartupBehavior.ALL) .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java index 0c88ba2659ba..14969afdd7c2 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlanPersonalSchedules Delete. */ +/** + * Samples for ScalingPlanPersonalSchedules Delete. + */ public final class ScalingPlanPersonalSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Delete.json */ /** * Sample code: ScalingPlanPersonalSchedules_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() - .deleteWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + manager.scalingPlanPersonalSchedules() + .deleteWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java index 1839d2b7d1e1..4b3464f2ec51 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetSamples.java @@ -4,24 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlanPersonalSchedules Get. */ +/** + * Samples for ScalingPlanPersonalSchedules Get. + */ public final class ScalingPlanPersonalSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Get.json */ /** * Sample code: ScalingPlanPersonalSchedules_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() - .getWithResponse( - "resourceGroup1", - "PersonalScalingPlan1", - "PersonalScalingPlanSchedule", + manager.scalingPlanPersonalSchedules() + .getWithResponse("resourceGroup1", "PersonalScalingPlan1", "PersonalScalingPlanSchedule", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java index 3daaa366ec74..ffda0b238acc 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlanPersonalSchedules List. */ +/** + * Samples for ScalingPlanPersonalSchedules List. + */ public final class ScalingPlanPersonalSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_List.json */ /** * Sample code: ScalingPlanPersonalSchedules_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesList( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPersonalSchedules() + manager.scalingPlanPersonalSchedules() .list("resourceGroup1", "scalingPlan", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java index a89a76ee5c55..150b2df79a8b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesUpdateSamples.java @@ -9,26 +9,25 @@ import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; import com.azure.resourcemanager.desktopvirtualization.models.Time; -/** Samples for ScalingPlanPersonalSchedules Update. */ +/** + * Samples for ScalingPlanPersonalSchedules Update. + */ public final class ScalingPlanPersonalSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPersonalSchedule_Update.json */ /** * Sample code: ScalingPlanPersonalSchedules_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPersonalSchedulesUpdate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ScalingPlanPersonalSchedule resource = - manager - .scalingPlanPersonalSchedules() - .getWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + ScalingPlanPersonalSchedule resource = manager.scalingPlanPersonalSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withPeakStartTime(new Time().withHour(8).withMinute(0)) .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) .withPeakMinutesToWaitOnDisconnect(10) diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java index 57ba8cf561ff..bdae5ca1f648 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java @@ -9,26 +9,25 @@ import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; -/** Samples for ScalingPlanPooledSchedules Create. */ +/** + * Samples for ScalingPlanPooledSchedules Create. + */ public final class ScalingPlanPooledSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/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() + manager.scalingPlanPooledSchedules() .define("scalingPlanScheduleWeekdays1") .withExistingScalingPlan("resourceGroup1", "scalingPlan1") - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + .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) diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java index 73c7fe42a09d..c9fccd8cd329 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlanPooledSchedules Delete. */ +/** + * Samples for ScalingPlanPooledSchedules Delete. + */ public final class ScalingPlanPooledSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Delete.json */ /** * Sample code: ScalingPlanPooledSchedules_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPooledSchedulesDelete( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPooledSchedules() - .deleteWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + manager.scalingPlanPooledSchedules() + .deleteWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java index c709d6102088..becc03d10810 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlanPooledSchedules Get. */ +/** + * Samples for ScalingPlanPooledSchedules Get. + */ public final class ScalingPlanPooledSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Get.json */ /** * Sample code: ScalingPlanPooledSchedules_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPooledSchedulesGet( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlanPooledSchedules() - .getWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE); + manager.scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java index 695c3fb9c5bb..37477aa808eb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlanPooledSchedules List. */ +/** + * Samples for ScalingPlanPooledSchedules List. + */ public final class ScalingPlanPooledSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/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() + manager.scalingPlanPooledSchedules() .list("resourceGroup1", "scalingPlan1", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java index f9d99313f570..85358279cd39 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java @@ -10,30 +10,27 @@ import com.azure.resourcemanager.desktopvirtualization.models.Time; import java.util.Arrays; -/** Samples for ScalingPlanPooledSchedules Update. */ +/** + * Samples for ScalingPlanPooledSchedules Update. + */ public final class ScalingPlanPooledSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlanPooledSchedule_Update.json */ /** * Sample code: ScalingPlanPooledSchedules_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanPooledSchedulesUpdate( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ScalingPlanPooledSchedule resource = - manager - .scalingPlanPooledSchedules() - .getWithResponse( - "resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, DayOfWeek.FRIDAY)) + ScalingPlanPooledSchedule resource = manager.scalingPlanPooledSchedules() + .getWithResponse("resourceGroup1", "scalingPlan1", "scalingPlanScheduleWeekdays1", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withDaysOfWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.TUESDAY, DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY, + DayOfWeek.FRIDAY)) .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) .withRampUpCapacityThresholdPct(80) .withPeakStartTime(new Time().withHour(8).withMinute(0)) 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 a6b224a2857f..36b0cf3665ac 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 @@ -14,20 +14,21 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ScalingPlans Create. */ +/** + * Samples for ScalingPlans Create. + */ public final class ScalingPlansCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + public static void + scalingPlansCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.scalingPlans() .define("scalingPlan1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") @@ -37,41 +38,28 @@ public static void scalingPlansCreate( .withFriendlyName("Scaling Plan 1") .withHostPoolType(ScalingHostPoolType.POOLED) .withExclusionTag("value") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("schedule1") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.MONDAY, - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.WEDNESDAY, - ScalingScheduleDaysOfWeekItem.THURSDAY, - ScalingScheduleDaysOfWeekItem.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))) - .withHostPoolReferences( - Arrays - .asList( - new ScalingHostPoolReference() - .withHostPoolArmPath( - "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1") - .withScalingPlanEnabled(true))) + .withSchedules(Arrays.asList(new ScalingSchedule().withName("schedule1") + .withDaysOfWeek(Arrays.asList(ScalingScheduleDaysOfWeekItem.MONDAY, + ScalingScheduleDaysOfWeekItem.TUESDAY, ScalingScheduleDaysOfWeekItem.WEDNESDAY, + ScalingScheduleDaysOfWeekItem.THURSDAY, ScalingScheduleDaysOfWeekItem.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))) + .withHostPoolReferences(Arrays.asList(new ScalingHostPoolReference().withHostPoolArmPath( + "/subscriptions/daefabc0-95b4-48b3-b645-8a753a63c4fa/resourceGroups/resourceGroup1/providers/Microsoft.DesktopVirtualization/hostPools/hostPool1") + .withScalingPlanEnabled(true))) .create(); } 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 a32071be0bac..309980aeb294 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlans Delete. */ +/** + * Samples for ScalingPlans Delete. + */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + public static void + scalingPlansDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.scalingPlans() .deleteByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java index fcb015cb26c0..f488ffcd7a68 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlans GetByResourceGroup. */ +/** + * Samples for ScalingPlans GetByResourceGroup. + */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + public static void + scalingPlansGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.scalingPlans() .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java index 0a6e860ab3b6..0cc9297dc0e8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlans ListByHostPool. */ +/** + * Samples for ScalingPlans ListByHostPool. + */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlanListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .scalingPlans() + manager.scalingPlans() .listByHostPool("resourceGroup1", "hostPool1", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java index c8e8b6ddc8e3..0767f823af3b 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlans ListByResourceGroup. */ +/** + * Samples for ScalingPlans ListByResourceGroup. + */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlansListByResourceGroup( 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 5f37f255b8d4..93fe70b156c3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for ScalingPlans List. */ +/** + * Samples for ScalingPlans List. + */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void scalingPlansListBySubscription( 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 40f559c3dd7a..1b87dcdecc0e 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 @@ -6,23 +6,23 @@ import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlan; -/** Samples for ScalingPlans Update. */ +/** + * Samples for ScalingPlans Update. + */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void scalingPlansUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - ScalingPlan resource = - manager - .scalingPlans() - .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE) - .getValue(); + public static void + scalingPlansUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + ScalingPlan resource = manager.scalingPlans() + .getByResourceGroupWithResponse("resourceGroup1", "scalingPlan1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().apply(); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java index dd743a3e0a72..dc9a48729381 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for SessionHosts Delete. */ +/** + * Samples for SessionHosts Delete. + */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .sessionHosts() - .deleteWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, com.azure.core.util.Context.NONE); + public static void + sessionHostDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.sessionHosts() + .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java index 9357f442e991..6f38aba17e29 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for SessionHosts Get. */ +/** + * Samples for SessionHosts Get. + */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .sessionHosts() - .getWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", com.azure.core.util.Context.NONE); + public static void + sessionHostGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.sessionHosts() + .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java index a173fc7631fb..be746761f1cd 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java @@ -4,18 +4,20 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for SessionHosts List. */ +/** + * Samples for SessionHosts List. + */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + public static void + sessionHostList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { manager.sessionHosts().list("resourceGroup1", "hostPool1", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java index 94607d6a7c12..0af25a0c9055 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 @@ -6,27 +6,23 @@ import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; -/** Samples for SessionHosts Update. */ +/** + * Samples for SessionHosts Update. + */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void sessionHostUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .sessionHosts() - .updateWithResponse( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - true, - new SessionHostPatch() - .withAllowNewSession(true) + public static void + sessionHostUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.sessionHosts() + .updateWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", true, + new SessionHostPatch().withAllowNewSession(true) .withAssignedUser("user1@microsoft.com") .withFriendlyName("friendly"), com.azure.core.util.Context.NONE); diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java index aac9de967e81..531aeb3a04ae 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for StartMenuItems List. */ +/** + * Samples for StartMenuItems List. + */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void startMenuItemList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .startMenuItems() + public static void + startMenuItemList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.startMenuItems() .list("resourceGroup1", "applicationGroup1", null, null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java index b6d8cb96e044..221d556f3c0f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java @@ -4,26 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for UserSessions Delete. */ +/** + * Samples for UserSessions Delete. + */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void userSessionDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .deleteWithResponse( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - "1", - true, + public static void + userSessionDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.userSessions() + .deleteWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", true, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java index d8ca961dd9af..74d9e3fe608c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for UserSessions Disconnect. */ +/** + * Samples for UserSessions Disconnect. + */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void userSessionDisconnectPost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .disconnectWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); + manager.userSessions() + .disconnectWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java index 063dcb23c53c..0e7587a78479 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for UserSessions Get. */ +/** + * Samples for UserSessions Get. + */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void userSessionGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .getWithResponse( - "resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", com.azure.core.util.Context.NONE); + public static void + userSessionGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.userSessions() + .getWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java index 743af2364466..b8ed8e8e0b4c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java @@ -4,27 +4,23 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for UserSessions ListByHostPool. */ +/** + * Samples for UserSessions ListByHostPool. + */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void userSessionListByHostPool( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .listByHostPool( - "resourceGroup1", - "hostPool1", - "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", - 10, - true, - 0, + manager.userSessions() + .listByHostPool("resourceGroup1", "hostPool1", + "userPrincipalName eq 'user1@microsoft.com' and state eq 'active'", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java index b1ad5dc1c671..8341733f9018 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java @@ -4,27 +4,22 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for UserSessions List. */ +/** + * Samples for UserSessions List. + */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_List.json */ /** * Sample code: UserSession_List. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void userSessionList( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .list( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - 10, - true, - 0, + public static void + userSessionList(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.userSessions() + .list("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", 10, true, 0, com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java index 1927a382d8f1..7239b73d0ada 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 @@ -6,26 +6,22 @@ import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; -/** Samples for UserSessions SendMessage. */ +/** + * Samples for UserSessions SendMessage. + */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void userSessionSendMessagePost( com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .userSessions() - .sendMessageWithResponse( - "resourceGroup1", - "hostPool1", - "sessionHost1.microsoft.com", - "1", - new SendMessage().withMessageTitle("title").withMessageBody("body"), - com.azure.core.util.Context.NONE); + manager.userSessions() + .sendMessageWithResponse("resourceGroup1", "hostPool1", "sessionHost1.microsoft.com", "1", + new SendMessage().withMessageTitle("title").withMessageBody("body"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java index d00760de9e64..101c9a5bda99 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 @@ -7,20 +7,21 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces CreateOrUpdate. */ +/** + * Samples for Workspaces CreateOrUpdate. + */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceCreate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .workspaces() + public static void + workspaceCreate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.workspaces() .define("workspace1") .withRegion("centralus") .withExistingResourceGroup("resourceGroup1") 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 6e94a24b977d..0058f376e27c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Workspaces Delete. */ +/** + * Samples for Workspaces Delete. + */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceDelete( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .workspaces() + public static void + workspaceDelete(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.workspaces() .deleteByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java index 0d4bb1ef6d29..f9f4d534c46d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Workspaces GetByResourceGroup. */ +/** + * Samples for Workspaces GetByResourceGroup. + */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceGet( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - manager - .workspaces() + public static void + workspaceGet(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + manager.workspaces() .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java index e19d22123052..c6a74898e19c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Workspaces ListByResourceGroup. */ +/** + * Samples for Workspaces ListByResourceGroup. + */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void workspaceListByResourceGroup( 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 b319baabb4c3..8c1027ff1555 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.desktopvirtualization.generated; -/** Samples for Workspaces List. */ +/** + * Samples for Workspaces List. + */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ public static void workspaceListBySubscription( 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 24be100cd849..3e12817191c6 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 @@ -8,25 +8,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces Update. */ +/** + * Samples for Workspaces Update. + */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. - * + * * @param manager Entry point to DesktopVirtualizationManager. */ - public static void workspaceUpdate( - com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + public static void + workspaceUpdate(com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager manager) { + Workspace resource = manager.workspaces() + .getByResourceGroupWithResponse("resourceGroup1", "workspace1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withDescription("des1") .withFriendlyName("friendly") diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java deleted file mode 100644 index 275cfc87770b..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePatchPropertiesTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdatePatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AgentUpdatePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentUpdatePatchProperties model = - BinaryData - .fromString( - "{\"type\":\"Scheduled\",\"useSessionHostLocalTime\":false,\"maintenanceWindowTimeZone\":\"lzywemhzrncsdtc\",\"maintenanceWindows\":[{\"hour\":2121256273,\"dayOfWeek\":\"Thursday\"},{\"hour\":1674447280,\"dayOfWeek\":\"Thursday\"}]}") - .toObject(AgentUpdatePatchProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); - Assertions.assertEquals(false, model.useSessionHostLocalTime()); - Assertions.assertEquals("lzywemhzrncsdtc", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(2121256273, model.maintenanceWindows().get(0).hour()); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.maintenanceWindows().get(0).dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentUpdatePatchProperties model = - new AgentUpdatePatchProperties() - .withType(SessionHostComponentUpdateType.SCHEDULED) - .withUseSessionHostLocalTime(false) - .withMaintenanceWindowTimeZone("lzywemhzrncsdtc") - .withMaintenanceWindows( - Arrays - .asList( - new MaintenanceWindowPatchProperties() - .withHour(2121256273) - .withDayOfWeek(DayOfWeek.THURSDAY), - new MaintenanceWindowPatchProperties() - .withHour(1674447280) - .withDayOfWeek(DayOfWeek.THURSDAY))); - model = BinaryData.fromObject(model).toObject(AgentUpdatePatchProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); - Assertions.assertEquals(false, model.useSessionHostLocalTime()); - Assertions.assertEquals("lzywemhzrncsdtc", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(2121256273, model.maintenanceWindows().get(0).hour()); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.maintenanceWindows().get(0).dayOfWeek()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java deleted file mode 100644 index bd031a6ba1a4..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/AgentUpdatePropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.AgentUpdateProperties; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowProperties; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostComponentUpdateType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AgentUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AgentUpdateProperties model = - BinaryData - .fromString( - "{\"type\":\"Scheduled\",\"useSessionHostLocalTime\":true,\"maintenanceWindowTimeZone\":\"kopbminrf\",\"maintenanceWindows\":[{\"hour\":1704063633,\"dayOfWeek\":\"Tuesday\"},{\"hour\":1209901082,\"dayOfWeek\":\"Monday\"},{\"hour\":2008385948,\"dayOfWeek\":\"Wednesday\"}]}") - .toObject(AgentUpdateProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); - Assertions.assertEquals(true, model.useSessionHostLocalTime()); - Assertions.assertEquals("kopbminrf", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(1704063633, model.maintenanceWindows().get(0).hour()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.maintenanceWindows().get(0).dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AgentUpdateProperties model = - new AgentUpdateProperties() - .withType(SessionHostComponentUpdateType.SCHEDULED) - .withUseSessionHostLocalTime(true) - .withMaintenanceWindowTimeZone("kopbminrf") - .withMaintenanceWindows( - Arrays - .asList( - new MaintenanceWindowProperties().withHour(1704063633).withDayOfWeek(DayOfWeek.TUESDAY), - new MaintenanceWindowProperties().withHour(1209901082).withDayOfWeek(DayOfWeek.MONDAY), - new MaintenanceWindowProperties().withHour(2008385948).withDayOfWeek(DayOfWeek.WEDNESDAY))); - model = BinaryData.fromObject(model).toObject(AgentUpdateProperties.class); - Assertions.assertEquals(SessionHostComponentUpdateType.SCHEDULED, model.type()); - Assertions.assertEquals(true, model.useSessionHostLocalTime()); - Assertions.assertEquals("kopbminrf", model.maintenanceWindowTimeZone()); - Assertions.assertEquals(1704063633, model.maintenanceWindows().get(0).hour()); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.maintenanceWindows().get(0).dayOfWeek()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java deleted file mode 100644 index 6f22ff4e82f3..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGroupPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationGroupPatchProperties model = - BinaryData - .fromString("{\"description\":\"hjpglkf\",\"friendlyName\":\"hdneuelfph\",\"showInFeed\":true}") - .toObject(ApplicationGroupPatchProperties.class); - Assertions.assertEquals("hjpglkf", model.description()); - Assertions.assertEquals("hdneuelfph", model.friendlyName()); - Assertions.assertEquals(true, model.showInFeed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationGroupPatchProperties model = - new ApplicationGroupPatchProperties() - .withDescription("hjpglkf") - .withFriendlyName("hdneuelfph") - .withShowInFeed(true); - model = BinaryData.fromObject(model).toObject(ApplicationGroupPatchProperties.class); - Assertions.assertEquals("hjpglkf", model.description()); - Assertions.assertEquals("hdneuelfph", model.friendlyName()); - Assertions.assertEquals(true, model.showInFeed()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java deleted file mode 100644 index 6296f5135968..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPatchTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGroupPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationGroupPatch model = - BinaryData - .fromString( - "{\"tags\":{\"wakbogqxndl\":\"obdagxtibqdxb\",\"uriplbpodxunkb\":\"zgx\",\"lrb\":\"bxmubyynt\",\"l\":\"tkoievseotgq\"},\"properties\":{\"description\":\"u\",\"friendlyName\":\"auwzizxbmpgc\",\"showInFeed\":true},\"id\":\"u\",\"name\":\"muvp\",\"type\":\"ttdumorppxebmnzb\"}") - .toObject(ApplicationGroupPatch.class); - Assertions.assertEquals("obdagxtibqdxb", model.tags().get("wakbogqxndl")); - Assertions.assertEquals("u", model.description()); - Assertions.assertEquals("auwzizxbmpgc", model.friendlyName()); - Assertions.assertEquals(true, model.showInFeed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationGroupPatch model = - new ApplicationGroupPatch() - .withTags( - mapOf( - "wakbogqxndl", - "obdagxtibqdxb", - "uriplbpodxunkb", - "zgx", - "lrb", - "bxmubyynt", - "l", - "tkoievseotgq")) - .withDescription("u") - .withFriendlyName("auwzizxbmpgc") - .withShowInFeed(true); - model = BinaryData.fromObject(model).toObject(ApplicationGroupPatch.class); - Assertions.assertEquals("obdagxtibqdxb", model.tags().get("wakbogqxndl")); - Assertions.assertEquals("u", model.description()); - Assertions.assertEquals("auwzizxbmpgc", model.friendlyName()); - Assertions.assertEquals(true, model.showInFeed()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java deleted file mode 100644 index 1abb205efdc2..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupPropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationGroupProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationGroupType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGroupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationGroupProperties model = - BinaryData - .fromString( - "{\"objectId\":\"tppjflcx\",\"description\":\"aokonzmnsik\",\"friendlyName\":\"kqze\",\"hostPoolArmPath\":\"qkdltfz\",\"workspaceArmPath\":\"hhvh\",\"applicationGroupType\":\"RemoteApp\",\"cloudPcResource\":true,\"showInFeed\":true}") - .toObject(ApplicationGroupProperties.class); - Assertions.assertEquals("aokonzmnsik", model.description()); - Assertions.assertEquals("kqze", model.friendlyName()); - Assertions.assertEquals("qkdltfz", model.hostPoolArmPath()); - Assertions.assertEquals(ApplicationGroupType.REMOTE_APP, model.applicationGroupType()); - Assertions.assertEquals(true, model.showInFeed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationGroupProperties model = - new ApplicationGroupProperties() - .withDescription("aokonzmnsik") - .withFriendlyName("kqze") - .withHostPoolArmPath("qkdltfz") - .withApplicationGroupType(ApplicationGroupType.REMOTE_APP) - .withShowInFeed(true); - model = BinaryData.fromObject(model).toObject(ApplicationGroupProperties.class); - Assertions.assertEquals("aokonzmnsik", model.description()); - Assertions.assertEquals("kqze", model.friendlyName()); - Assertions.assertEquals("qkdltfz", model.hostPoolArmPath()); - Assertions.assertEquals(ApplicationGroupType.REMOTE_APP, model.applicationGroupType()); - Assertions.assertEquals(true, model.showInFeed()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 996ef82e2dfe..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationGroupsDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .applicationGroups() - .deleteByResourceGroupWithResponse("kxxpvbrd", "jmzsyzfh", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java deleted file mode 100644 index 302fda66e8f0..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationInner; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectId\":\"uqgbdbutauvfbt\",\"description\":\"whhmhykojo\",\"friendlyName\":\"fnndl\",\"filePath\":\"chkoymkcdyh\",\"msixPackageFamilyName\":\"kkpwdreqnovvq\",\"msixPackageApplicationId\":\"vljxywsu\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"ndsytgadg\",\"showInPortal\":true,\"iconPath\":\"aeneqnzarrwl\",\"iconIndex\":1397845425,\"iconHash\":\"jfqka\"},\"id\":\"wiipfpub\",\"name\":\"ibwwiftohqkv\",\"type\":\"uvksgplsaknynfsy\"}") - .toObject(ApplicationInner.class); - Assertions.assertEquals("whhmhykojo", model.description()); - Assertions.assertEquals("fnndl", model.friendlyName()); - Assertions.assertEquals("chkoymkcdyh", model.filePath()); - Assertions.assertEquals("kkpwdreqnovvq", model.msixPackageFamilyName()); - Assertions.assertEquals("vljxywsu", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("ndsytgadg", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("aeneqnzarrwl", model.iconPath()); - Assertions.assertEquals(1397845425, model.iconIndex()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationInner model = - new ApplicationInner() - .withDescription("whhmhykojo") - .withFriendlyName("fnndl") - .withFilePath("chkoymkcdyh") - .withMsixPackageFamilyName("kkpwdreqnovvq") - .withMsixPackageApplicationId("vljxywsu") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.ALLOW) - .withCommandLineArguments("ndsytgadg") - .withShowInPortal(true) - .withIconPath("aeneqnzarrwl") - .withIconIndex(1397845425); - model = BinaryData.fromObject(model).toObject(ApplicationInner.class); - Assertions.assertEquals("whhmhykojo", model.description()); - Assertions.assertEquals("fnndl", model.friendlyName()); - Assertions.assertEquals("chkoymkcdyh", model.filePath()); - Assertions.assertEquals("kkpwdreqnovvq", model.msixPackageFamilyName()); - Assertions.assertEquals("vljxywsu", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("ndsytgadg", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("aeneqnzarrwl", model.iconPath()); - Assertions.assertEquals(1397845425, model.iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java deleted file mode 100644 index 1f2d5d63af09..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationListTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationInner; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationList; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"hfjx\",\"description\":\"szkkfoqre\",\"friendlyName\":\"kzikfjawneaivxwc\",\"filePath\":\"lpcirelsf\",\"msixPackageFamilyName\":\"enwabfatk\",\"msixPackageApplicationId\":\"dxbjhwuaanozj\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"oulpjrv\",\"showInPortal\":true,\"iconPath\":\"rvimjwosytxitcsk\",\"iconIndex\":212130052,\"iconHash\":\"qumiek\"},\"id\":\"zzikhlyfjhdg\",\"name\":\"gge\",\"type\":\"dunyg\"},{\"properties\":{\"objectId\":\"idb\",\"description\":\"atpxl\",\"friendlyName\":\"xcyjmoadsuvarmy\",\"filePath\":\"mjsjqb\",\"msixPackageFamilyName\":\"hyxxrwlycoduhpk\",\"msixPackageApplicationId\":\"gymare\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"qugjhkycube\",\"showInPortal\":false,\"iconPath\":\"sofwqmzqalkrmnji\",\"iconIndex\":988494266,\"iconHash\":\"cqqudf\"},\"id\":\"yxbaaabjyvayf\",\"name\":\"imrzrtuzqog\",\"type\":\"exn\"},{\"properties\":{\"objectId\":\"dnw\",\"description\":\"mewzsyyc\",\"friendlyName\":\"zsoibjudpfrxtr\",\"filePath\":\"zvaytdwkqbr\",\"msixPackageFamilyName\":\"bpaxhexiilivpdt\",\"msixPackageApplicationId\":\"r\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"axoruzfgsquy\",\"showInPortal\":false,\"iconPath\":\"xleptramx\",\"iconIndex\":726747953,\"iconHash\":\"lwnwxuqlcvydyp\"},\"id\":\"dooaojkniodko\",\"name\":\"ebwnujhe\",\"type\":\"msbvdkcrodtjinf\"},{\"properties\":{\"objectId\":\"fltkacjv\",\"description\":\"kdlfoa\",\"friendlyName\":\"gkfpaga\",\"filePath\":\"pulpqblylsyxk\",\"msixPackageFamilyName\":\"nsj\",\"msixPackageApplicationId\":\"vti\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"sz\",\"showInPortal\":true,\"iconPath\":\"sbzkf\",\"iconIndex\":1389741266,\"iconHash\":\"v\"},\"id\":\"qi\",\"name\":\"vinvkj\",\"type\":\"xdxr\"}],\"nextLink\":\"ukzclewyhmlwpaz\"}") - .toObject(ApplicationList.class); - Assertions.assertEquals("szkkfoqre", model.value().get(0).description()); - Assertions.assertEquals("kzikfjawneaivxwc", model.value().get(0).friendlyName()); - Assertions.assertEquals("lpcirelsf", model.value().get(0).filePath()); - Assertions.assertEquals("enwabfatk", model.value().get(0).msixPackageFamilyName()); - Assertions.assertEquals("dxbjhwuaanozj", model.value().get(0).msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.value().get(0).applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.value().get(0).commandLineSetting()); - Assertions.assertEquals("oulpjrv", model.value().get(0).commandLineArguments()); - Assertions.assertEquals(true, model.value().get(0).showInPortal()); - Assertions.assertEquals("rvimjwosytxitcsk", model.value().get(0).iconPath()); - Assertions.assertEquals(212130052, model.value().get(0).iconIndex()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationList model = - new ApplicationList() - .withValue( - Arrays - .asList( - new ApplicationInner() - .withDescription("szkkfoqre") - .withFriendlyName("kzikfjawneaivxwc") - .withFilePath("lpcirelsf") - .withMsixPackageFamilyName("enwabfatk") - .withMsixPackageApplicationId("dxbjhwuaanozj") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.REQUIRE) - .withCommandLineArguments("oulpjrv") - .withShowInPortal(true) - .withIconPath("rvimjwosytxitcsk") - .withIconIndex(212130052), - new ApplicationInner() - .withDescription("atpxl") - .withFriendlyName("xcyjmoadsuvarmy") - .withFilePath("mjsjqb") - .withMsixPackageFamilyName("hyxxrwlycoduhpk") - .withMsixPackageApplicationId("gymare") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.REQUIRE) - .withCommandLineArguments("qugjhkycube") - .withShowInPortal(false) - .withIconPath("sofwqmzqalkrmnji") - .withIconIndex(988494266), - new ApplicationInner() - .withDescription("mewzsyyc") - .withFriendlyName("zsoibjudpfrxtr") - .withFilePath("zvaytdwkqbr") - .withMsixPackageFamilyName("bpaxhexiilivpdt") - .withMsixPackageApplicationId("r") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) - .withCommandLineArguments("axoruzfgsquy") - .withShowInPortal(false) - .withIconPath("xleptramx") - .withIconIndex(726747953), - new ApplicationInner() - .withDescription("kdlfoa") - .withFriendlyName("gkfpaga") - .withFilePath("pulpqblylsyxk") - .withMsixPackageFamilyName("nsj") - .withMsixPackageApplicationId("vti") - .withApplicationType(RemoteApplicationType.MSIX_APPLICATION) - .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) - .withCommandLineArguments("sz") - .withShowInPortal(true) - .withIconPath("sbzkf") - .withIconIndex(1389741266))); - model = BinaryData.fromObject(model).toObject(ApplicationList.class); - Assertions.assertEquals("szkkfoqre", model.value().get(0).description()); - Assertions.assertEquals("kzikfjawneaivxwc", model.value().get(0).friendlyName()); - Assertions.assertEquals("lpcirelsf", model.value().get(0).filePath()); - Assertions.assertEquals("enwabfatk", model.value().get(0).msixPackageFamilyName()); - Assertions.assertEquals("dxbjhwuaanozj", model.value().get(0).msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.value().get(0).applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.value().get(0).commandLineSetting()); - Assertions.assertEquals("oulpjrv", model.value().get(0).commandLineArguments()); - Assertions.assertEquals(true, model.value().get(0).showInPortal()); - Assertions.assertEquals("rvimjwosytxitcsk", model.value().get(0).iconPath()); - Assertions.assertEquals(212130052, model.value().get(0).iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java deleted file mode 100644 index 384e7e960c59..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchPropertiesTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationPatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationPatchProperties model = - BinaryData - .fromString( - "{\"description\":\"kzivgvvcnayrh\",\"friendlyName\":\"nxxmueedndrdv\",\"filePath\":\"kwqqtchealmf\",\"commandLineSetting\":\"Allow\",\"commandLineArguments\":\"aygdvwvgpioh\",\"showInPortal\":true,\"iconPath\":\"tfudxepx\",\"iconIndex\":1784889493,\"msixPackageFamilyName\":\"gvr\",\"msixPackageApplicationId\":\"npkukghimdblx\",\"applicationType\":\"MsixApplication\"}") - .toObject(ApplicationPatchProperties.class); - Assertions.assertEquals("kzivgvvcnayrh", model.description()); - Assertions.assertEquals("nxxmueedndrdv", model.friendlyName()); - Assertions.assertEquals("kwqqtchealmf", model.filePath()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("aygdvwvgpioh", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("tfudxepx", model.iconPath()); - Assertions.assertEquals(1784889493, model.iconIndex()); - Assertions.assertEquals("gvr", model.msixPackageFamilyName()); - Assertions.assertEquals("npkukghimdblx", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.applicationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationPatchProperties model = - new ApplicationPatchProperties() - .withDescription("kzivgvvcnayrh") - .withFriendlyName("nxxmueedndrdv") - .withFilePath("kwqqtchealmf") - .withCommandLineSetting(CommandLineSetting.ALLOW) - .withCommandLineArguments("aygdvwvgpioh") - .withShowInPortal(true) - .withIconPath("tfudxepx") - .withIconIndex(1784889493) - .withMsixPackageFamilyName("gvr") - .withMsixPackageApplicationId("npkukghimdblx") - .withApplicationType(RemoteApplicationType.MSIX_APPLICATION); - model = BinaryData.fromObject(model).toObject(ApplicationPatchProperties.class); - Assertions.assertEquals("kzivgvvcnayrh", model.description()); - Assertions.assertEquals("nxxmueedndrdv", model.friendlyName()); - Assertions.assertEquals("kwqqtchealmf", model.filePath()); - Assertions.assertEquals(CommandLineSetting.ALLOW, model.commandLineSetting()); - Assertions.assertEquals("aygdvwvgpioh", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("tfudxepx", model.iconPath()); - Assertions.assertEquals(1784889493, model.iconIndex()); - Assertions.assertEquals("gvr", model.msixPackageFamilyName()); - Assertions.assertEquals("npkukghimdblx", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, model.applicationType()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java deleted file mode 100644 index 07383cb3cd4a..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPatchTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationPatch; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationPatch model = - BinaryData - .fromString( - "{\"tags\":{\"kotl\":\"wwrlkdmtncv\",\"gsyocogj\":\"xdy\"},\"properties\":{\"description\":\"tbnnha\",\"friendlyName\":\"ocrkvcikh\",\"filePath\":\"p\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"x\",\"showInPortal\":false,\"iconPath\":\"zikywgg\",\"iconIndex\":1558005484,\"msixPackageFamilyName\":\"la\",\"msixPackageApplicationId\":\"elwuipi\",\"applicationType\":\"InBuilt\"}}") - .toObject(ApplicationPatch.class); - Assertions.assertEquals("wwrlkdmtncv", model.tags().get("kotl")); - Assertions.assertEquals("tbnnha", model.description()); - Assertions.assertEquals("ocrkvcikh", model.friendlyName()); - Assertions.assertEquals("p", model.filePath()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("x", model.commandLineArguments()); - Assertions.assertEquals(false, model.showInPortal()); - Assertions.assertEquals("zikywgg", model.iconPath()); - Assertions.assertEquals(1558005484, model.iconIndex()); - Assertions.assertEquals("la", model.msixPackageFamilyName()); - Assertions.assertEquals("elwuipi", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationPatch model = - new ApplicationPatch() - .withTags(mapOf("kotl", "wwrlkdmtncv", "gsyocogj", "xdy")) - .withDescription("tbnnha") - .withFriendlyName("ocrkvcikh") - .withFilePath("p") - .withCommandLineSetting(CommandLineSetting.REQUIRE) - .withCommandLineArguments("x") - .withShowInPortal(false) - .withIconPath("zikywgg") - .withIconIndex(1558005484) - .withMsixPackageFamilyName("la") - .withMsixPackageApplicationId("elwuipi") - .withApplicationType(RemoteApplicationType.IN_BUILT); - model = BinaryData.fromObject(model).toObject(ApplicationPatch.class); - Assertions.assertEquals("wwrlkdmtncv", model.tags().get("kotl")); - Assertions.assertEquals("tbnnha", model.description()); - Assertions.assertEquals("ocrkvcikh", model.friendlyName()); - Assertions.assertEquals("p", model.filePath()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("x", model.commandLineArguments()); - Assertions.assertEquals(false, model.showInPortal()); - Assertions.assertEquals("zikywgg", model.iconPath()); - Assertions.assertEquals(1558005484, model.iconIndex()); - Assertions.assertEquals("la", model.msixPackageFamilyName()); - Assertions.assertEquals("elwuipi", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java deleted file mode 100644 index b6ca27e72897..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationPropertiesTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ApplicationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationProperties model = - BinaryData - .fromString( - "{\"objectId\":\"jphuopxodlqi\",\"description\":\"torzih\",\"friendlyName\":\"osjswsr\",\"filePath\":\"lyzrpzbchckqqzqi\",\"msixPackageFamilyName\":\"iysui\",\"msixPackageApplicationId\":\"ynkedyatrwyhqmib\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"tsmypyynpcdp\",\"showInPortal\":true,\"iconPath\":\"g\",\"iconIndex\":83591449,\"iconHash\":\"mabiknsorgjhxb\"}") - .toObject(ApplicationProperties.class); - Assertions.assertEquals("torzih", model.description()); - Assertions.assertEquals("osjswsr", model.friendlyName()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.filePath()); - Assertions.assertEquals("iysui", model.msixPackageFamilyName()); - Assertions.assertEquals("ynkedyatrwyhqmib", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("tsmypyynpcdp", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("g", model.iconPath()); - Assertions.assertEquals(83591449, model.iconIndex()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationProperties model = - new ApplicationProperties() - .withDescription("torzih") - .withFriendlyName("osjswsr") - .withFilePath("lyzrpzbchckqqzqi") - .withMsixPackageFamilyName("iysui") - .withMsixPackageApplicationId("ynkedyatrwyhqmib") - .withApplicationType(RemoteApplicationType.IN_BUILT) - .withCommandLineSetting(CommandLineSetting.REQUIRE) - .withCommandLineArguments("tsmypyynpcdp") - .withShowInPortal(true) - .withIconPath("g") - .withIconIndex(83591449); - model = BinaryData.fromObject(model).toObject(ApplicationProperties.class); - Assertions.assertEquals("torzih", model.description()); - Assertions.assertEquals("osjswsr", model.friendlyName()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.filePath()); - Assertions.assertEquals("iysui", model.msixPackageFamilyName()); - Assertions.assertEquals("ynkedyatrwyhqmib", model.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting()); - Assertions.assertEquals("tsmypyynpcdp", model.commandLineArguments()); - Assertions.assertEquals(true, model.showInPortal()); - Assertions.assertEquals("g", model.iconPath()); - Assertions.assertEquals(83591449, model.iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 9a644553df32..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.Application; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectId\":\"qwcabvnui\",\"description\":\"ey\",\"friendlyName\":\"wlpaugmrmfjlrxwt\",\"filePath\":\"ukhfkvc\",\"msixPackageFamilyName\":\"izmoaeds\",\"msixPackageApplicationId\":\"wuived\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"ewxeiqbpsm\",\"showInPortal\":false,\"iconPath\":\"u\",\"iconIndex\":468041184,\"iconHash\":\"dlrgms\"},\"id\":\"zgaufcshhvn\",\"name\":\"wgnxkympqanxrj\",\"type\":\"ixt\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Application response = - manager - .applications() - .define("gygqwah") - .withExistingApplicationGroup("dtguk", "anblwphqlkccu") - .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW) - .withDescription("d") - .withFriendlyName("ypivlsbb") - .withFilePath("mcub") - .withMsixPackageFamilyName("ifoxxkubvphav") - .withMsixPackageApplicationId("h") - .withApplicationType(RemoteApplicationType.MSIX_APPLICATION) - .withCommandLineArguments("vgovpbbttefjokn") - .withShowInPortal(true) - .withIconPath("zqedikdfrdbi") - .withIconIndex(1455317057) - .create(); - - Assertions.assertEquals("ey", response.description()); - Assertions.assertEquals("wlpaugmrmfjlrxwt", response.friendlyName()); - Assertions.assertEquals("ukhfkvc", response.filePath()); - Assertions.assertEquals("izmoaeds", response.msixPackageFamilyName()); - Assertions.assertEquals("wuived", response.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, response.applicationType()); - Assertions.assertEquals(CommandLineSetting.REQUIRE, response.commandLineSetting()); - Assertions.assertEquals("ewxeiqbpsm", response.commandLineArguments()); - Assertions.assertEquals(false, response.showInPortal()); - Assertions.assertEquals("u", response.iconPath()); - Assertions.assertEquals(468041184, response.iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java deleted file mode 100644 index aab6c15bca1c..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .applications() - .deleteWithResponse("csgguxhemlw", "waeeczgfb", "kklelssxblycs", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java deleted file mode 100644 index 763fa29ca168..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.Application; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectId\":\"mdyomkxfbvfbh\",\"description\":\"i\",\"friendlyName\":\"pwpgddei\",\"filePath\":\"wzovgk\",\"msixPackageFamilyName\":\"muikjcjcaztbws\",\"msixPackageApplicationId\":\"qowxwcom\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"wvczcswkacve\",\"showInPortal\":false,\"iconPath\":\"vlvhbwrnfxtgd\",\"iconIndex\":994119130,\"iconHash\":\"hehnmnaoya\"},\"id\":\"coeqswankltytm\",\"name\":\"droznn\",\"type\":\"drlktg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Application response = - manager - .applications() - .getWithResponse("qwjksghudgz", "xog", "ggsvoujkxibdaf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("i", response.description()); - Assertions.assertEquals("pwpgddei", response.friendlyName()); - Assertions.assertEquals("wzovgk", response.filePath()); - Assertions.assertEquals("muikjcjcaztbws", response.msixPackageFamilyName()); - Assertions.assertEquals("qowxwcom", response.msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.IN_BUILT, response.applicationType()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, response.commandLineSetting()); - Assertions.assertEquals("wvczcswkacve", response.commandLineArguments()); - Assertions.assertEquals(false, response.showInPortal()); - Assertions.assertEquals("vlvhbwrnfxtgd", response.iconPath()); - Assertions.assertEquals(994119130, response.iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java deleted file mode 100644 index 6aec93df29f2..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.Application; -import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting; -import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"bidyv\",\"description\":\"owx\",\"friendlyName\":\"piudeugfsxzecpa\",\"filePath\":\"kufykhvu\",\"msixPackageFamilyName\":\"epmrut\",\"msixPackageApplicationId\":\"abaobnslujdjltym\",\"applicationType\":\"MsixApplication\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"ihywartspph\",\"showInPortal\":true,\"iconPath\":\"ykxdssjpemmuc\",\"iconIndex\":115970163,\"iconHash\":\"kkflrmymyincqlhr\"},\"id\":\"wslmiiiovgqcg\",\"name\":\"uugqk\",\"type\":\"totiowlxteqdptjg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .applications() - .list("zujksrlsmdes", "plpvm", 536619974, true, 1460091990, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("owx", response.iterator().next().description()); - Assertions.assertEquals("piudeugfsxzecpa", response.iterator().next().friendlyName()); - Assertions.assertEquals("kufykhvu", response.iterator().next().filePath()); - Assertions.assertEquals("epmrut", response.iterator().next().msixPackageFamilyName()); - Assertions.assertEquals("abaobnslujdjltym", response.iterator().next().msixPackageApplicationId()); - Assertions.assertEquals(RemoteApplicationType.MSIX_APPLICATION, response.iterator().next().applicationType()); - Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, response.iterator().next().commandLineSetting()); - Assertions.assertEquals("ihywartspph", response.iterator().next().commandLineArguments()); - Assertions.assertEquals(true, response.iterator().next().showInPortal()); - Assertions.assertEquals("ykxdssjpemmuc", response.iterator().next().iconPath()); - Assertions.assertEquals(115970163, response.iterator().next().iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java deleted file mode 100644 index 37514c55707f..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopInner; -import org.junit.jupiter.api.Assertions; - -public final class DesktopInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectId\":\"fn\",\"description\":\"kwyfzqwhxxbuyqax\",\"friendlyName\":\"eqz\",\"iconHash\":\"priolx\"},\"id\":\"jaltolmnc\",\"name\":\"sobqw\",\"type\":\"sdbnwdcfhucqdpf\"}") - .toObject(DesktopInner.class); - Assertions.assertEquals("kwyfzqwhxxbuyqax", model.description()); - Assertions.assertEquals("eqz", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopInner model = new DesktopInner().withDescription("kwyfzqwhxxbuyqax").withFriendlyName("eqz"); - model = BinaryData.fromObject(model).toObject(DesktopInner.class); - Assertions.assertEquals("kwyfzqwhxxbuyqax", model.description()); - Assertions.assertEquals("eqz", model.friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java deleted file mode 100644 index 3fab48f41b23..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopListTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopInner; -import com.azure.resourcemanager.desktopvirtualization.models.DesktopList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DesktopListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"frvtpuqu\",\"description\":\"qlgkfbtn\",\"friendlyName\":\"aongbj\",\"iconHash\":\"tujitcjedft\"},\"id\":\"ae\",\"name\":\"kojvd\",\"type\":\"pzfoqoui\"},{\"properties\":{\"objectId\":\"arz\",\"description\":\"zuf\",\"friendlyName\":\"ciqopidoa\",\"iconHash\":\"iodhkhazxkhnz\"},\"id\":\"nlwntoe\",\"name\":\"okdwb\",\"type\":\"hksz\"}],\"nextLink\":\"mrv\"}") - .toObject(DesktopList.class); - Assertions.assertEquals("qlgkfbtn", model.value().get(0).description()); - Assertions.assertEquals("aongbj", model.value().get(0).friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopList model = - new DesktopList() - .withValue( - Arrays - .asList( - new DesktopInner().withDescription("qlgkfbtn").withFriendlyName("aongbj"), - new DesktopInner().withDescription("zuf").withFriendlyName("ciqopidoa"))); - model = BinaryData.fromObject(model).toObject(DesktopList.class); - Assertions.assertEquals("qlgkfbtn", model.value().get(0).description()); - Assertions.assertEquals("aongbj", model.value().get(0).friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java deleted file mode 100644 index d8fec0d48337..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class DesktopPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopPatchProperties model = - BinaryData - .fromString("{\"description\":\"auwjuetaebu\",\"friendlyName\":\"vdmovsmzlxwabm\"}") - .toObject(DesktopPatchProperties.class); - Assertions.assertEquals("auwjuetaebu", model.description()); - Assertions.assertEquals("vdmovsmzlxwabm", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopPatchProperties model = - new DesktopPatchProperties().withDescription("auwjuetaebu").withFriendlyName("vdmovsmzlxwabm"); - model = BinaryData.fromObject(model).toObject(DesktopPatchProperties.class); - Assertions.assertEquals("auwjuetaebu", model.description()); - Assertions.assertEquals("vdmovsmzlxwabm", model.friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.java deleted file mode 100644 index 1e213caa4e75..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPatchTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DesktopPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopPatch model = - BinaryData - .fromString( - "{\"tags\":{\"gdknnqv\":\"u\"},\"properties\":{\"description\":\"nqntorudsgsahm\",\"friendlyName\":\"c\"}}") - .toObject(DesktopPatch.class); - Assertions.assertEquals("u", model.tags().get("gdknnqv")); - Assertions.assertEquals("nqntorudsgsahm", model.description()); - Assertions.assertEquals("c", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopPatch model = - new DesktopPatch().withTags(mapOf("gdknnqv", "u")).withDescription("nqntorudsgsahm").withFriendlyName("c"); - model = BinaryData.fromObject(model).toObject(DesktopPatch.class); - Assertions.assertEquals("u", model.tags().get("gdknnqv")); - Assertions.assertEquals("nqntorudsgsahm", model.description()); - Assertions.assertEquals("c", model.friendlyName()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java deleted file mode 100644 index deff52079e46..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.DesktopProperties; -import org.junit.jupiter.api.Assertions; - -public final class DesktopPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DesktopProperties model = - BinaryData - .fromString( - "{\"objectId\":\"glsbjjc\",\"description\":\"vxb\",\"friendlyName\":\"vudutncor\",\"iconHash\":\"lxqtvcofudfl\"}") - .toObject(DesktopProperties.class); - Assertions.assertEquals("vxb", model.description()); - Assertions.assertEquals("vudutncor", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DesktopProperties model = new DesktopProperties().withDescription("vxb").withFriendlyName("vudutncor"); - model = BinaryData.fromObject(model).toObject(DesktopProperties.class); - Assertions.assertEquals("vxb", model.description()); - Assertions.assertEquals("vudutncor", model.friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java deleted file mode 100644 index 6ac6810bba06..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.Desktop; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DesktopsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectId\":\"hdrwjjkh\",\"description\":\"omacluzvxnqmhr\",\"friendlyName\":\"pd\",\"iconHash\":\"mkoisqcssf\"},\"id\":\"uifmc\",\"name\":\"ypobkdqzr\",\"type\":\"zsylollgt\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Desktop response = - manager - .desktops() - .getWithResponse("bta", "ypnyghshxc", "lhkgmnsghp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("omacluzvxnqmhr", response.description()); - Assertions.assertEquals("pd", response.friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java deleted file mode 100644 index b0e9e640b645..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.Desktop; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DesktopsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"xigdhxiidlope\",\"description\":\"wdpyq\",\"friendlyName\":\"bxubmdna\",\"iconHash\":\"bqwremjela\"},\"id\":\"cigeleohdbvqvw\",\"name\":\"kjopwbeon\",\"type\":\"lkwzdqybxceakxcp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.desktops().list("yrrueqth", "mg", 1745918799, false, 1620223491, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wdpyq", response.iterator().next().description()); - Assertions.assertEquals("bxubmdna", response.iterator().next().friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java deleted file mode 100644 index 46afcc0534d9..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.Desktop; -import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DesktopsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectId\":\"xihspnxwq\",\"description\":\"nepzwakls\",\"friendlyName\":\"bqqqagwwrxa\",\"iconHash\":\"zisglrrczezkhh\"},\"id\":\"njad\",\"name\":\"qoawjqoy\",\"type\":\"eayfbpcmspl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Desktop response = - manager - .desktops() - .updateWithResponse( - "czzydmxzjij", - "vuaurk", - "hci", - new DesktopPatch() - .withTags(mapOf("ja", "efxrdcoxnbk", "qltgrd", "urnnqbnqbpiz")) - .withDescription("pxrxvbfihwu") - .withFriendlyName("ctafsrbxrblm"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("nepzwakls", response.description()); - Assertions.assertEquals("bqqqagwwrxa", response.friendlyName()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java deleted file mode 100644 index 4154411b7b12..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageInnerTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExpandMsixImageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExpandMsixImageInner model = - BinaryData - .fromString( - "{\"properties\":{\"packageAlias\":\"fgiagtcojocqwo\",\"imagePath\":\"nzjvusfzldm\",\"packageName\":\"uxylfsbtkadpy\",\"packageFamilyName\":\"wn\",\"packageFullName\":\"gkbugrjqct\",\"displayName\":\"cmisofie\",\"packageRelativePath\":\"efojyqdhcupl\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"hihlhzdsqtzbs\",\"publisher\":\"nowc\",\"minVersion\":\"fgmvecactxmwo\"},{\"dependencyName\":\"yowc\",\"publisher\":\"qovekqvgqou\",\"minVersion\":\"fzmpjwyivq\"},{\"dependencyName\":\"f\",\"publisher\":\"vhrfsphuagrt\",\"minVersion\":\"kteusqczk\"},{\"dependencyName\":\"klxubyja\",\"publisher\":\"mmfblcqcuubgqib\",\"minVersion\":\"a\"}],\"version\":\"etttwgdslqxihhr\",\"lastUpdated\":\"2021-07-10T01:42:44Z\",\"packageApplications\":[{\"appId\":\"seypxiutcxapz\",\"description\":\"rpetogebjoxsl\",\"appUserModelID\":\"nhl\",\"friendlyName\":\"rqnkkzjcjbtr\",\"iconImageName\":\"ehvvib\"}]},\"id\":\"jsto\",\"name\":\"beitpkx\",\"type\":\"tmo\"}") - .toObject(ExpandMsixImageInner.class); - Assertions.assertEquals("fgiagtcojocqwo", model.packageAlias()); - Assertions.assertEquals("nzjvusfzldm", model.imagePath()); - Assertions.assertEquals("uxylfsbtkadpy", model.packageName()); - Assertions.assertEquals("wn", model.packageFamilyName()); - Assertions.assertEquals("gkbugrjqct", model.packageFullName()); - Assertions.assertEquals("cmisofie", model.displayName()); - Assertions.assertEquals("efojyqdhcupl", model.packageRelativePath()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("hihlhzdsqtzbs", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("nowc", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("fgmvecactxmwo", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("etttwgdslqxihhr", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T01:42:44Z"), model.lastUpdated()); - Assertions.assertEquals("seypxiutcxapz", model.packageApplications().get(0).appId()); - Assertions.assertEquals("rpetogebjoxsl", model.packageApplications().get(0).description()); - Assertions.assertEquals("nhl", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("rqnkkzjcjbtr", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("ehvvib", model.packageApplications().get(0).iconImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExpandMsixImageInner model = - new ExpandMsixImageInner() - .withPackageAlias("fgiagtcojocqwo") - .withImagePath("nzjvusfzldm") - .withPackageName("uxylfsbtkadpy") - .withPackageFamilyName("wn") - .withPackageFullName("gkbugrjqct") - .withDisplayName("cmisofie") - .withPackageRelativePath("efojyqdhcupl") - .withIsRegularRegistration(true) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("hihlhzdsqtzbs") - .withPublisher("nowc") - .withMinVersion("fgmvecactxmwo"), - new MsixPackageDependencies() - .withDependencyName("yowc") - .withPublisher("qovekqvgqou") - .withMinVersion("fzmpjwyivq"), - new MsixPackageDependencies() - .withDependencyName("f") - .withPublisher("vhrfsphuagrt") - .withMinVersion("kteusqczk"), - new MsixPackageDependencies() - .withDependencyName("klxubyja") - .withPublisher("mmfblcqcuubgqib") - .withMinVersion("a"))) - .withVersion("etttwgdslqxihhr") - .withLastUpdated(OffsetDateTime.parse("2021-07-10T01:42:44Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("seypxiutcxapz") - .withDescription("rpetogebjoxsl") - .withAppUserModelId("nhl") - .withFriendlyName("rqnkkzjcjbtr") - .withIconImageName("ehvvib"))); - model = BinaryData.fromObject(model).toObject(ExpandMsixImageInner.class); - Assertions.assertEquals("fgiagtcojocqwo", model.packageAlias()); - Assertions.assertEquals("nzjvusfzldm", model.imagePath()); - Assertions.assertEquals("uxylfsbtkadpy", model.packageName()); - Assertions.assertEquals("wn", model.packageFamilyName()); - Assertions.assertEquals("gkbugrjqct", model.packageFullName()); - Assertions.assertEquals("cmisofie", model.displayName()); - Assertions.assertEquals("efojyqdhcupl", model.packageRelativePath()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("hihlhzdsqtzbs", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("nowc", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("fgmvecactxmwo", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("etttwgdslqxihhr", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-10T01:42:44Z"), model.lastUpdated()); - Assertions.assertEquals("seypxiutcxapz", model.packageApplications().get(0).appId()); - Assertions.assertEquals("rpetogebjoxsl", model.packageApplications().get(0).description()); - Assertions.assertEquals("nhl", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("rqnkkzjcjbtr", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("ehvvib", model.packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java deleted file mode 100644 index 7bc66860f835..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImageListTests.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageInner; -import com.azure.resourcemanager.desktopvirtualization.models.ExpandMsixImageList; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExpandMsixImageListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExpandMsixImageList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"packageAlias\":\"ivsiy\",\"imagePath\":\"kdncj\",\"packageName\":\"onbzoggculapzwy\",\"packageFamilyName\":\"gogtqxepnylbf\",\"packageFullName\":\"jlyjtlvofq\",\"displayName\":\"vfcibyfmowux\",\"packageRelativePath\":\"jpvd\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"wzjbh\",\"publisher\":\"sxjrk\",\"minVersion\":\"btrnegvm\"},{\"dependencyName\":\"uqeqv\",\"publisher\":\"spastjbkkdmf\",\"minVersion\":\"est\"},{\"dependencyName\":\"lx\",\"publisher\":\"ilozapeewchpxlk\",\"minVersion\":\"kuziycsle\"}],\"version\":\"f\",\"lastUpdated\":\"2021-03-03T22:41:41Z\",\"packageApplications\":[{\"appId\":\"yhjtqedcgzu\",\"description\":\"mmrqz\",\"appUserModelID\":\"rjvpglydzgkrvqee\",\"friendlyName\":\"oepry\",\"iconImageName\":\"nwy\"},{\"appId\":\"mov\",\"description\":\"fvaawzqa\",\"appUserModelID\":\"lgzurig\",\"friendlyName\":\"ecxn\",\"iconImageName\":\"icokpv\"}]},\"id\":\"qtmldgxo\",\"name\":\"firclnpkciayz\",\"type\":\"iykhy\"},{\"properties\":{\"packageAlias\":\"vjlboxqvk\",\"imagePath\":\"mxho\",\"packageName\":\"ynhdwdigum\",\"packageFamilyName\":\"raauzzpt\",\"packageFullName\":\"zysdzh\",\"displayName\":\"wwvaiqyuvvfonk\",\"packageRelativePath\":\"hqyikvy\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"wmn\",\"publisher\":\"ttijfybvpoekrs\",\"minVersion\":\"gbdhuzqgnjdg\"},{\"dependencyName\":\"nscliqhzvhxnk\",\"publisher\":\"tkubotppn\",\"minVersion\":\"xz\"}],\"version\":\"ihfrbbcevqa\",\"lastUpdated\":\"2021-01-25T14:16:29Z\",\"packageApplications\":[{\"appId\":\"lfkqojpy\",\"description\":\"gtrd\",\"appUserModelID\":\"ifmzzsd\",\"friendlyName\":\"brn\",\"iconImageName\":\"u\"},{\"appId\":\"a\",\"description\":\"g\",\"appUserModelID\":\"hocxvdfffwafqrou\",\"friendlyName\":\"spave\",\"iconImageName\":\"r\"},{\"appId\":\"n\",\"description\":\"zudhcxg\",\"appUserModelID\":\"oyxcdyuib\",\"friendlyName\":\"fdn\",\"iconImageName\":\"ydvfvfcjnae\"},{\"appId\":\"vhmgorffukis\",\"description\":\"w\",\"appUserModelID\":\"hwplefaxvx\",\"friendlyName\":\"cbtgnhnz\",\"iconImageName\":\"qxtjjfzqlqhyca\"}]},\"id\":\"ggxdb\",\"name\":\"esmi\",\"type\":\"knlrariaawiuagy\"}],\"nextLink\":\"qfby\"}") - .toObject(ExpandMsixImageList.class); - Assertions.assertEquals("ivsiy", model.value().get(0).packageAlias()); - Assertions.assertEquals("kdncj", model.value().get(0).imagePath()); - Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).packageName()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("jlyjtlvofq", model.value().get(0).packageFullName()); - Assertions.assertEquals("vfcibyfmowux", model.value().get(0).displayName()); - Assertions.assertEquals("jpvd", model.value().get(0).packageRelativePath()); - Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); - Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("wzjbh", model.value().get(0).packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("sxjrk", model.value().get(0).packageDependencies().get(0).publisher()); - Assertions.assertEquals("btrnegvm", model.value().get(0).packageDependencies().get(0).minVersion()); - Assertions.assertEquals("f", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T22:41:41Z"), model.value().get(0).lastUpdated()); - Assertions.assertEquals("yhjtqedcgzu", model.value().get(0).packageApplications().get(0).appId()); - Assertions.assertEquals("mmrqz", model.value().get(0).packageApplications().get(0).description()); - Assertions.assertEquals("rjvpglydzgkrvqee", model.value().get(0).packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("oepry", model.value().get(0).packageApplications().get(0).friendlyName()); - Assertions.assertEquals("nwy", model.value().get(0).packageApplications().get(0).iconImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExpandMsixImageList model = - new ExpandMsixImageList() - .withValue( - Arrays - .asList( - new ExpandMsixImageInner() - .withPackageAlias("ivsiy") - .withImagePath("kdncj") - .withPackageName("onbzoggculapzwy") - .withPackageFamilyName("gogtqxepnylbf") - .withPackageFullName("jlyjtlvofq") - .withDisplayName("vfcibyfmowux") - .withPackageRelativePath("jpvd") - .withIsRegularRegistration(true) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("wzjbh") - .withPublisher("sxjrk") - .withMinVersion("btrnegvm"), - new MsixPackageDependencies() - .withDependencyName("uqeqv") - .withPublisher("spastjbkkdmf") - .withMinVersion("est"), - new MsixPackageDependencies() - .withDependencyName("lx") - .withPublisher("ilozapeewchpxlk") - .withMinVersion("kuziycsle"))) - .withVersion("f") - .withLastUpdated(OffsetDateTime.parse("2021-03-03T22:41:41Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("yhjtqedcgzu") - .withDescription("mmrqz") - .withAppUserModelId("rjvpglydzgkrvqee") - .withFriendlyName("oepry") - .withIconImageName("nwy"), - new MsixPackageApplications() - .withAppId("mov") - .withDescription("fvaawzqa") - .withAppUserModelId("lgzurig") - .withFriendlyName("ecxn") - .withIconImageName("icokpv"))), - new ExpandMsixImageInner() - .withPackageAlias("vjlboxqvk") - .withImagePath("mxho") - .withPackageName("ynhdwdigum") - .withPackageFamilyName("raauzzpt") - .withPackageFullName("zysdzh") - .withDisplayName("wwvaiqyuvvfonk") - .withPackageRelativePath("hqyikvy") - .withIsRegularRegistration(false) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("wmn") - .withPublisher("ttijfybvpoekrs") - .withMinVersion("gbdhuzqgnjdg"), - new MsixPackageDependencies() - .withDependencyName("nscliqhzvhxnk") - .withPublisher("tkubotppn") - .withMinVersion("xz"))) - .withVersion("ihfrbbcevqa") - .withLastUpdated(OffsetDateTime.parse("2021-01-25T14:16:29Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("lfkqojpy") - .withDescription("gtrd") - .withAppUserModelId("ifmzzsd") - .withFriendlyName("brn") - .withIconImageName("u"), - new MsixPackageApplications() - .withAppId("a") - .withDescription("g") - .withAppUserModelId("hocxvdfffwafqrou") - .withFriendlyName("spave") - .withIconImageName("r"), - new MsixPackageApplications() - .withAppId("n") - .withDescription("zudhcxg") - .withAppUserModelId("oyxcdyuib") - .withFriendlyName("fdn") - .withIconImageName("ydvfvfcjnae"), - new MsixPackageApplications() - .withAppId("vhmgorffukis") - .withDescription("w") - .withAppUserModelId("hwplefaxvx") - .withFriendlyName("cbtgnhnz") - .withIconImageName("qxtjjfzqlqhyca"))))); - model = BinaryData.fromObject(model).toObject(ExpandMsixImageList.class); - Assertions.assertEquals("ivsiy", model.value().get(0).packageAlias()); - Assertions.assertEquals("kdncj", model.value().get(0).imagePath()); - Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).packageName()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("jlyjtlvofq", model.value().get(0).packageFullName()); - Assertions.assertEquals("vfcibyfmowux", model.value().get(0).displayName()); - Assertions.assertEquals("jpvd", model.value().get(0).packageRelativePath()); - Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); - Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("wzjbh", model.value().get(0).packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("sxjrk", model.value().get(0).packageDependencies().get(0).publisher()); - Assertions.assertEquals("btrnegvm", model.value().get(0).packageDependencies().get(0).minVersion()); - Assertions.assertEquals("f", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-03T22:41:41Z"), model.value().get(0).lastUpdated()); - Assertions.assertEquals("yhjtqedcgzu", model.value().get(0).packageApplications().get(0).appId()); - Assertions.assertEquals("mmrqz", model.value().get(0).packageApplications().get(0).description()); - Assertions.assertEquals("rjvpglydzgkrvqee", model.value().get(0).packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("oepry", model.value().get(0).packageApplications().get(0).friendlyName()); - Assertions.assertEquals("nwy", model.value().get(0).packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java deleted file mode 100644 index 46cc8bb97e89..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ExpandMsixImagePropertiesTests.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ExpandMsixImageProperties; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExpandMsixImagePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExpandMsixImageProperties model = - BinaryData - .fromString( - "{\"packageAlias\":\"klf\",\"imagePath\":\"dgfcwqmp\",\"packageName\":\"aqxzhemjyho\",\"packageFamilyName\":\"jswtwkozzwc\",\"packageFullName\":\"kb\",\"displayName\":\"pfajnjwltlwtjj\",\"packageRelativePath\":\"ktalhsnvkcdmxz\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"wiaaomylweaz\",\"publisher\":\"cse\",\"minVersion\":\"wwnpj\"},{\"dependencyName\":\"fz\",\"publisher\":\"pchwa\",\"minVersion\":\"bousn\"},{\"dependencyName\":\"pgfewetwlyx\",\"publisher\":\"cxy\",\"minVersion\":\"hdjhlimmbcx\"}],\"version\":\"bcporxvxcjzhqizx\",\"lastUpdated\":\"2021-11-25T06:23:01Z\",\"packageApplications\":[{\"appId\":\"scjavftju\",\"description\":\"qaz\",\"appUserModelID\":\"tgguwpijrajcivmm\",\"friendlyName\":\"f\",\"iconImageName\":\"iwrxgkn\"},{\"appId\":\"inzqodfvpgs\",\"description\":\"xgsg\",\"appUserModelID\":\"fgzdjtxvz\",\"friendlyName\":\"bqvgaqv\",\"iconImageName\":\"a\"}]}") - .toObject(ExpandMsixImageProperties.class); - Assertions.assertEquals("klf", model.packageAlias()); - Assertions.assertEquals("dgfcwqmp", model.imagePath()); - Assertions.assertEquals("aqxzhemjyho", model.packageName()); - Assertions.assertEquals("jswtwkozzwc", model.packageFamilyName()); - Assertions.assertEquals("kb", model.packageFullName()); - Assertions.assertEquals("pfajnjwltlwtjj", model.displayName()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("wiaaomylweaz", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("cse", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("wwnpj", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-25T06:23:01Z"), model.lastUpdated()); - Assertions.assertEquals("scjavftju", model.packageApplications().get(0).appId()); - Assertions.assertEquals("qaz", model.packageApplications().get(0).description()); - Assertions.assertEquals("tgguwpijrajcivmm", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("f", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("iwrxgkn", model.packageApplications().get(0).iconImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExpandMsixImageProperties model = - new ExpandMsixImageProperties() - .withPackageAlias("klf") - .withImagePath("dgfcwqmp") - .withPackageName("aqxzhemjyho") - .withPackageFamilyName("jswtwkozzwc") - .withPackageFullName("kb") - .withDisplayName("pfajnjwltlwtjj") - .withPackageRelativePath("ktalhsnvkcdmxz") - .withIsRegularRegistration(false) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("wiaaomylweaz") - .withPublisher("cse") - .withMinVersion("wwnpj"), - new MsixPackageDependencies() - .withDependencyName("fz") - .withPublisher("pchwa") - .withMinVersion("bousn"), - new MsixPackageDependencies() - .withDependencyName("pgfewetwlyx") - .withPublisher("cxy") - .withMinVersion("hdjhlimmbcx"))) - .withVersion("bcporxvxcjzhqizx") - .withLastUpdated(OffsetDateTime.parse("2021-11-25T06:23:01Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("scjavftju") - .withDescription("qaz") - .withAppUserModelId("tgguwpijrajcivmm") - .withFriendlyName("f") - .withIconImageName("iwrxgkn"), - new MsixPackageApplications() - .withAppId("inzqodfvpgs") - .withDescription("xgsg") - .withAppUserModelId("fgzdjtxvz") - .withFriendlyName("bqvgaqv") - .withIconImageName("a"))); - model = BinaryData.fromObject(model).toObject(ExpandMsixImageProperties.class); - Assertions.assertEquals("klf", model.packageAlias()); - Assertions.assertEquals("dgfcwqmp", model.imagePath()); - Assertions.assertEquals("aqxzhemjyho", model.packageName()); - Assertions.assertEquals("jswtwkozzwc", model.packageFamilyName()); - Assertions.assertEquals("kb", model.packageFullName()); - Assertions.assertEquals("pfajnjwltlwtjj", model.displayName()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("wiaaomylweaz", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("cse", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("wwnpj", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-25T06:23:01Z"), model.lastUpdated()); - Assertions.assertEquals("scjavftju", model.packageApplications().get(0).appId()); - Assertions.assertEquals("qaz", model.packageApplications().get(0).description()); - Assertions.assertEquals("tgguwpijrajcivmm", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("f", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("iwrxgkn", model.packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java deleted file mode 100644 index 6177b05dd095..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class HostPoolsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.hostPools().deleteWithResponse("houcqpqojxc", "zrzdcgd", true, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java deleted file mode 100644 index 1f1a86b7b845..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/IdentityTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.Identity; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class IdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Identity model = - BinaryData - .fromString("{\"principalId\":\"zdn\",\"tenantId\":\"jq\",\"type\":\"SystemAssigned\"}") - .toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Identity model = new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java deleted file mode 100644 index 4265503fd082..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/LogSpecificationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class LogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogSpecification model = - BinaryData - .fromString("{\"name\":\"ryhtnapczwlokjy\",\"displayName\":\"kkvnipjox\",\"blobDuration\":\"nchgej\"}") - .toObject(LogSpecification.class); - Assertions.assertEquals("ryhtnapczwlokjy", model.name()); - Assertions.assertEquals("kkvnipjox", model.displayName()); - Assertions.assertEquals("nchgej", model.blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogSpecification model = - new LogSpecification().withName("ryhtnapczwlokjy").withDisplayName("kkvnipjox").withBlobDuration("nchgej"); - model = BinaryData.fromObject(model).toObject(LogSpecification.class); - Assertions.assertEquals("ryhtnapczwlokjy", model.name()); - Assertions.assertEquals("kkvnipjox", model.displayName()); - Assertions.assertEquals("nchgej", model.blobDuration()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java deleted file mode 100644 index c4347feabd38..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPatchPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowPatchProperties model = - BinaryData - .fromString("{\"hour\":831606659,\"dayOfWeek\":\"Wednesday\"}") - .toObject(MaintenanceWindowPatchProperties.class); - Assertions.assertEquals(831606659, model.hour()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowPatchProperties model = - new MaintenanceWindowPatchProperties().withHour(831606659).withDayOfWeek(DayOfWeek.WEDNESDAY); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowPatchProperties.class); - Assertions.assertEquals(831606659, model.hour()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java deleted file mode 100644 index 6b6eafe167ac..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MaintenanceWindowPropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.MaintenanceWindowProperties; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowProperties model = - BinaryData - .fromString("{\"hour\":1689863270,\"dayOfWeek\":\"Wednesday\"}") - .toObject(MaintenanceWindowProperties.class); - Assertions.assertEquals(1689863270, model.hour()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowProperties model = - new MaintenanceWindowProperties().withHour(1689863270).withDayOfWeek(DayOfWeek.WEDNESDAY); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowProperties.class); - Assertions.assertEquals(1689863270, model.hour()); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.dayOfWeek()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java deleted file mode 100644 index 00ac600b0706..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImageUriTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; -import org.junit.jupiter.api.Assertions; - -public final class MsixImageUriTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixImageUri model = BinaryData.fromString("{\"uri\":\"zb\"}").toObject(MsixImageUri.class); - Assertions.assertEquals("zb", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixImageUri model = new MsixImageUri().withUri("zb"); - model = BinaryData.fromObject(model).toObject(MsixImageUri.class); - Assertions.assertEquals("zb", model.uri()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java deleted file mode 100644 index 6ce8e89a96ce..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.ExpandMsixImage; -import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MsixImagesExpandMockTests { - @Test - public void testExpand() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"packageAlias\":\"hmpejtlkexaonw\",\"imagePath\":\"kcq\",\"packageName\":\"xhxknlc\",\"packageFamilyName\":\"mmkyu\",\"packageFullName\":\"jubyqjfkakfq\",\"displayName\":\"kemyil\",\"packageRelativePath\":\"dxjascowvfdj\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"ksnmgzv\",\"publisher\":\"ij\",\"minVersion\":\"zuqnwsithuqo\"},{\"dependencyName\":\"ah\",\"publisher\":\"qwqul\",\"minVersion\":\"trjbhxykfhyq\"},{\"dependencyName\":\"vqqugdrftbcv\",\"publisher\":\"reuquowtljvf\",\"minVersion\":\"reagkhyxvrqt\"}],\"version\":\"czsulmdggl\",\"lastUpdated\":\"2021-11-17T19:55:24Z\",\"packageApplications\":[{\"appId\":\"s\",\"description\":\"kgsangpszng\",\"appUserModelID\":\"p\",\"friendlyName\":\"lkvec\",\"iconImageName\":\"jcngoadyed\"},{\"appId\":\"jfoknubnoitpkp\",\"description\":\"rgdg\",\"appUserModelID\":\"coqra\",\"friendlyName\":\"ugyxpqit\",\"iconImageName\":\"ialwv\"}]},\"id\":\"uhz\",\"name\":\"caqt\",\"type\":\"ltcoqc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .msixImages() - .expand("oaiknaqlnuwig", "yxl", new MsixImageUri().withUri("wphvxz"), com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hmpejtlkexaonw", response.iterator().next().packageAlias()); - Assertions.assertEquals("kcq", response.iterator().next().imagePath()); - Assertions.assertEquals("xhxknlc", response.iterator().next().packageName()); - Assertions.assertEquals("mmkyu", response.iterator().next().packageFamilyName()); - Assertions.assertEquals("jubyqjfkakfq", response.iterator().next().packageFullName()); - Assertions.assertEquals("kemyil", response.iterator().next().displayName()); - Assertions.assertEquals("dxjascowvfdj", response.iterator().next().packageRelativePath()); - Assertions.assertEquals(false, response.iterator().next().isRegularRegistration()); - Assertions.assertEquals(false, response.iterator().next().isActive()); - Assertions.assertEquals("ksnmgzv", response.iterator().next().packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("ij", response.iterator().next().packageDependencies().get(0).publisher()); - Assertions.assertEquals("zuqnwsithuqo", response.iterator().next().packageDependencies().get(0).minVersion()); - Assertions.assertEquals("czsulmdggl", response.iterator().next().version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-17T19:55:24Z"), response.iterator().next().lastUpdated()); - Assertions.assertEquals("s", response.iterator().next().packageApplications().get(0).appId()); - Assertions.assertEquals("kgsangpszng", response.iterator().next().packageApplications().get(0).description()); - Assertions.assertEquals("p", response.iterator().next().packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("lkvec", response.iterator().next().packageApplications().get(0).friendlyName()); - Assertions.assertEquals("jcngoadyed", response.iterator().next().packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java deleted file mode 100644 index 831d8daa2fda..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageApplicationsTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackageApplicationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackageApplications model = - BinaryData - .fromString( - "{\"appId\":\"xeclzedqbcvhzlhp\",\"description\":\"dqkdlwwqfbu\",\"appUserModelID\":\"kxtrq\",\"friendlyName\":\"smlmbtxhwgfwsrta\",\"iconImageName\":\"oezbrhubsk\"}") - .toObject(MsixPackageApplications.class); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.appId()); - Assertions.assertEquals("dqkdlwwqfbu", model.description()); - Assertions.assertEquals("kxtrq", model.appUserModelId()); - Assertions.assertEquals("smlmbtxhwgfwsrta", model.friendlyName()); - Assertions.assertEquals("oezbrhubsk", model.iconImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageApplications model = - new MsixPackageApplications() - .withAppId("xeclzedqbcvhzlhp") - .withDescription("dqkdlwwqfbu") - .withAppUserModelId("kxtrq") - .withFriendlyName("smlmbtxhwgfwsrta") - .withIconImageName("oezbrhubsk"); - model = BinaryData.fromObject(model).toObject(MsixPackageApplications.class); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.appId()); - Assertions.assertEquals("dqkdlwwqfbu", model.description()); - Assertions.assertEquals("kxtrq", model.appUserModelId()); - Assertions.assertEquals("smlmbtxhwgfwsrta", model.friendlyName()); - Assertions.assertEquals("oezbrhubsk", model.iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java deleted file mode 100644 index 98cb9643dce8..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageDependenciesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackageDependenciesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackageDependencies model = - BinaryData - .fromString( - "{\"dependencyName\":\"yklyhpluodpvruud\",\"publisher\":\"zibt\",\"minVersion\":\"stgktst\"}") - .toObject(MsixPackageDependencies.class); - Assertions.assertEquals("yklyhpluodpvruud", model.dependencyName()); - Assertions.assertEquals("zibt", model.publisher()); - Assertions.assertEquals("stgktst", model.minVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageDependencies model = - new MsixPackageDependencies() - .withDependencyName("yklyhpluodpvruud") - .withPublisher("zibt") - .withMinVersion("stgktst"); - model = BinaryData.fromObject(model).toObject(MsixPackageDependencies.class); - Assertions.assertEquals("yklyhpluodpvruud", model.dependencyName()); - Assertions.assertEquals("zibt", model.publisher()); - Assertions.assertEquals("stgktst", model.minVersion()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java deleted file mode 100644 index 1e2017bef96f..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageInnerTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackageInner; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackageInner model = - BinaryData - .fromString( - "{\"properties\":{\"imagePath\":\"swdvzyybycnun\",\"packageName\":\"srtkfa\",\"packageFamilyName\":\"opqgikyzirtxdyux\",\"displayName\":\"jntpsewgioilqu\",\"packageRelativePath\":\"ydxtqm\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"ufhyaomtbgh\",\"publisher\":\"vgrvkffo\",\"minVersion\":\"zh\"},{\"dependencyName\":\"bibgjmfxumv\",\"publisher\":\"luyovwxnbkfezzx\",\"minVersion\":\"yhwzdgiruj\"},{\"dependencyName\":\"bomvzzbtdcqv\",\"publisher\":\"iyujviylwdshfs\",\"minVersion\":\"rbgyefry\"}],\"version\":\"gaojf\",\"lastUpdated\":\"2021-04-10T10:30:40Z\",\"packageApplications\":[{\"appId\":\"mrfhirctymox\",\"description\":\"tpipiwyczuhx\",\"appUserModelID\":\"pqjlihhyusps\",\"friendlyName\":\"sdvlmfwdgzxulucv\",\"iconImageName\":\"mrsreuzvxurisjnh\"},{\"appId\":\"ifqjz\",\"description\":\"mrhublwpc\",\"appUserModelID\":\"utr\",\"friendlyName\":\"upauut\",\"iconImageName\":\"oqh\"}]},\"id\":\"jqgwzp\",\"name\":\"fqntcyp\",\"type\":\"xjvfoimwksl\"}") - .toObject(MsixPackageInner.class); - Assertions.assertEquals("swdvzyybycnun", model.imagePath()); - Assertions.assertEquals("srtkfa", model.packageName()); - Assertions.assertEquals("opqgikyzirtxdyux", model.packageFamilyName()); - Assertions.assertEquals("jntpsewgioilqu", model.displayName()); - Assertions.assertEquals("ydxtqm", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals("ufhyaomtbgh", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("vgrvkffo", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("zh", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("gaojf", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T10:30:40Z"), model.lastUpdated()); - Assertions.assertEquals("mrfhirctymox", model.packageApplications().get(0).appId()); - Assertions.assertEquals("tpipiwyczuhx", model.packageApplications().get(0).description()); - Assertions.assertEquals("pqjlihhyusps", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.packageApplications().get(0).iconImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageInner model = - new MsixPackageInner() - .withImagePath("swdvzyybycnun") - .withPackageName("srtkfa") - .withPackageFamilyName("opqgikyzirtxdyux") - .withDisplayName("jntpsewgioilqu") - .withPackageRelativePath("ydxtqm") - .withIsRegularRegistration(false) - .withIsActive(false) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("ufhyaomtbgh") - .withPublisher("vgrvkffo") - .withMinVersion("zh"), - new MsixPackageDependencies() - .withDependencyName("bibgjmfxumv") - .withPublisher("luyovwxnbkfezzx") - .withMinVersion("yhwzdgiruj"), - new MsixPackageDependencies() - .withDependencyName("bomvzzbtdcqv") - .withPublisher("iyujviylwdshfs") - .withMinVersion("rbgyefry"))) - .withVersion("gaojf") - .withLastUpdated(OffsetDateTime.parse("2021-04-10T10:30:40Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("mrfhirctymox") - .withDescription("tpipiwyczuhx") - .withAppUserModelId("pqjlihhyusps") - .withFriendlyName("sdvlmfwdgzxulucv") - .withIconImageName("mrsreuzvxurisjnh"), - new MsixPackageApplications() - .withAppId("ifqjz") - .withDescription("mrhublwpc") - .withAppUserModelId("utr") - .withFriendlyName("upauut") - .withIconImageName("oqh"))); - model = BinaryData.fromObject(model).toObject(MsixPackageInner.class); - Assertions.assertEquals("swdvzyybycnun", model.imagePath()); - Assertions.assertEquals("srtkfa", model.packageName()); - Assertions.assertEquals("opqgikyzirtxdyux", model.packageFamilyName()); - Assertions.assertEquals("jntpsewgioilqu", model.displayName()); - Assertions.assertEquals("ydxtqm", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals("ufhyaomtbgh", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("vgrvkffo", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("zh", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("gaojf", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-10T10:30:40Z"), model.lastUpdated()); - Assertions.assertEquals("mrfhirctymox", model.packageApplications().get(0).appId()); - Assertions.assertEquals("tpipiwyczuhx", model.packageApplications().get(0).description()); - Assertions.assertEquals("pqjlihhyusps", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java deleted file mode 100644 index 06dc1945824a..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackageListTests.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackageInner; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageList; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackageListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackageList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"imagePath\":\"tiewdj\",\"packageName\":\"bquwrbehw\",\"packageFamilyName\":\"o\",\"displayName\":\"uffkmrqemvvh\",\"packageRelativePath\":\"tdrjfutacoebj\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"m\",\"publisher\":\"pmguaadraufac\",\"minVersion\":\"ahzovajjziuxxp\"},{\"dependencyName\":\"neekulfg\",\"publisher\":\"qubkw\",\"minVersion\":\"enr\"}],\"version\":\"utujba\",\"lastUpdated\":\"2021-06-27T02:39:57Z\",\"packageApplications\":[{\"appId\":\"minyflnorwm\",\"description\":\"vwpklvxwmygdxp\",\"appUserModelID\":\"qchiszep\",\"friendlyName\":\"bjcrxgibbdaxco\",\"iconImageName\":\"ozauorsukokwb\"}]},\"id\":\"hlvnuuepzlr\",\"name\":\"hw\",\"type\":\"soldweyuqdunv\"},{\"properties\":{\"imagePath\":\"rwrbi\",\"packageName\":\"ktalywjhhgdnhxms\",\"packageFamilyName\":\"fomiloxgg\",\"displayName\":\"fi\",\"packageRelativePath\":\"dieuzaofj\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"fgdo\",\"publisher\":\"ubiipuipwoqonma\",\"minVersion\":\"ekni\"}],\"version\":\"hqvcimpevfgmblr\",\"lastUpdated\":\"2021-02-01T14:17Z\",\"packageApplications\":[{\"appId\":\"dxsm\",\"description\":\"cwrwfs\",\"appUserModelID\":\"fnynszqujizdvoqy\",\"friendlyName\":\"byowbblgyavutp\",\"iconImageName\":\"joxoism\"},{\"appId\":\"pi\",\"description\":\"qolj\",\"appUserModelID\":\"cgxxlxs\",\"friendlyName\":\"gcvizqzdwlvwlyou\",\"iconImageName\":\"gfbkjubdyh\"}]},\"id\":\"minsgowzf\",\"name\":\"tsttktlahbq\",\"type\":\"ctxtgzukxi\"},{\"properties\":{\"imagePath\":\"qtgqqqxhrnxr\",\"packageName\":\"pjui\",\"packageFamilyName\":\"vokqdzfv\",\"displayName\":\"ivjlfrqttbajlka\",\"packageRelativePath\":\"wxyiopidkqq\",\"isRegularRegistration\":true,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"dmligovibrxk\",\"publisher\":\"loazuruocbgoo\",\"minVersion\":\"te\"},{\"dependencyName\":\"bfhjxakvvjgsl\",\"publisher\":\"dilmyww\",\"minVersion\":\"gkxnyedabg\"}],\"version\":\"udtjuewbc\",\"lastUpdated\":\"2021-05-21T16:55:19Z\",\"packageApplications\":[{\"appId\":\"hcjyxc\",\"description\":\"bvpa\",\"appUserModelID\":\"kkudzp\",\"friendlyName\":\"wjplma\",\"iconImageName\":\"tcyohpfkyrk\"},{\"appId\":\"iogsjkmnwq\",\"description\":\"obaiyhddviaceg\",\"appUserModelID\":\"m\",\"friendlyName\":\"fpmvmemfnczd\",\"iconImageName\":\"vbalxlllc\"},{\"appId\":\"bzevwrd\",\"description\":\"fukuvsjcswsmystu\",\"appUserModelID\":\"qypfcv\",\"friendlyName\":\"rchpqbmfpjbabwid\",\"iconImageName\":\"xsspuunnoxyhk\"}]},\"id\":\"ddrihpf\",\"name\":\"oqcaaewdaomdj\",\"type\":\"l\"}],\"nextLink\":\"x\"}") - .toObject(MsixPackageList.class); - Assertions.assertEquals("tiewdj", model.value().get(0).imagePath()); - Assertions.assertEquals("bquwrbehw", model.value().get(0).packageName()); - Assertions.assertEquals("o", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("uffkmrqemvvh", model.value().get(0).displayName()); - Assertions.assertEquals("tdrjfutacoebj", model.value().get(0).packageRelativePath()); - Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); - Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("m", model.value().get(0).packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("pmguaadraufac", model.value().get(0).packageDependencies().get(0).publisher()); - Assertions.assertEquals("ahzovajjziuxxp", model.value().get(0).packageDependencies().get(0).minVersion()); - Assertions.assertEquals("utujba", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T02:39:57Z"), model.value().get(0).lastUpdated()); - Assertions.assertEquals("minyflnorwm", model.value().get(0).packageApplications().get(0).appId()); - Assertions.assertEquals("vwpklvxwmygdxp", model.value().get(0).packageApplications().get(0).description()); - Assertions.assertEquals("qchiszep", model.value().get(0).packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("bjcrxgibbdaxco", model.value().get(0).packageApplications().get(0).friendlyName()); - Assertions.assertEquals("ozauorsukokwb", model.value().get(0).packageApplications().get(0).iconImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageList model = - new MsixPackageList() - .withValue( - Arrays - .asList( - new MsixPackageInner() - .withImagePath("tiewdj") - .withPackageName("bquwrbehw") - .withPackageFamilyName("o") - .withDisplayName("uffkmrqemvvh") - .withPackageRelativePath("tdrjfutacoebj") - .withIsRegularRegistration(true) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("m") - .withPublisher("pmguaadraufac") - .withMinVersion("ahzovajjziuxxp"), - new MsixPackageDependencies() - .withDependencyName("neekulfg") - .withPublisher("qubkw") - .withMinVersion("enr"))) - .withVersion("utujba") - .withLastUpdated(OffsetDateTime.parse("2021-06-27T02:39:57Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("minyflnorwm") - .withDescription("vwpklvxwmygdxp") - .withAppUserModelId("qchiszep") - .withFriendlyName("bjcrxgibbdaxco") - .withIconImageName("ozauorsukokwb"))), - new MsixPackageInner() - .withImagePath("rwrbi") - .withPackageName("ktalywjhhgdnhxms") - .withPackageFamilyName("fomiloxgg") - .withDisplayName("fi") - .withPackageRelativePath("dieuzaofj") - .withIsRegularRegistration(false) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("fgdo") - .withPublisher("ubiipuipwoqonma") - .withMinVersion("ekni"))) - .withVersion("hqvcimpevfgmblr") - .withLastUpdated(OffsetDateTime.parse("2021-02-01T14:17Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("dxsm") - .withDescription("cwrwfs") - .withAppUserModelId("fnynszqujizdvoqy") - .withFriendlyName("byowbblgyavutp") - .withIconImageName("joxoism"), - new MsixPackageApplications() - .withAppId("pi") - .withDescription("qolj") - .withAppUserModelId("cgxxlxs") - .withFriendlyName("gcvizqzdwlvwlyou") - .withIconImageName("gfbkjubdyh"))), - new MsixPackageInner() - .withImagePath("qtgqqqxhrnxr") - .withPackageName("pjui") - .withPackageFamilyName("vokqdzfv") - .withDisplayName("ivjlfrqttbajlka") - .withPackageRelativePath("wxyiopidkqq") - .withIsRegularRegistration(true) - .withIsActive(false) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("dmligovibrxk") - .withPublisher("loazuruocbgoo") - .withMinVersion("te"), - new MsixPackageDependencies() - .withDependencyName("bfhjxakvvjgsl") - .withPublisher("dilmyww") - .withMinVersion("gkxnyedabg"))) - .withVersion("udtjuewbc") - .withLastUpdated(OffsetDateTime.parse("2021-05-21T16:55:19Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("hcjyxc") - .withDescription("bvpa") - .withAppUserModelId("kkudzp") - .withFriendlyName("wjplma") - .withIconImageName("tcyohpfkyrk"), - new MsixPackageApplications() - .withAppId("iogsjkmnwq") - .withDescription("obaiyhddviaceg") - .withAppUserModelId("m") - .withFriendlyName("fpmvmemfnczd") - .withIconImageName("vbalxlllc"), - new MsixPackageApplications() - .withAppId("bzevwrd") - .withDescription("fukuvsjcswsmystu") - .withAppUserModelId("qypfcv") - .withFriendlyName("rchpqbmfpjbabwid") - .withIconImageName("xsspuunnoxyhk"))))); - model = BinaryData.fromObject(model).toObject(MsixPackageList.class); - Assertions.assertEquals("tiewdj", model.value().get(0).imagePath()); - Assertions.assertEquals("bquwrbehw", model.value().get(0).packageName()); - Assertions.assertEquals("o", model.value().get(0).packageFamilyName()); - Assertions.assertEquals("uffkmrqemvvh", model.value().get(0).displayName()); - Assertions.assertEquals("tdrjfutacoebj", model.value().get(0).packageRelativePath()); - Assertions.assertEquals(true, model.value().get(0).isRegularRegistration()); - Assertions.assertEquals(true, model.value().get(0).isActive()); - Assertions.assertEquals("m", model.value().get(0).packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("pmguaadraufac", model.value().get(0).packageDependencies().get(0).publisher()); - Assertions.assertEquals("ahzovajjziuxxp", model.value().get(0).packageDependencies().get(0).minVersion()); - Assertions.assertEquals("utujba", model.value().get(0).version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-27T02:39:57Z"), model.value().get(0).lastUpdated()); - Assertions.assertEquals("minyflnorwm", model.value().get(0).packageApplications().get(0).appId()); - Assertions.assertEquals("vwpklvxwmygdxp", model.value().get(0).packageApplications().get(0).description()); - Assertions.assertEquals("qchiszep", model.value().get(0).packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("bjcrxgibbdaxco", model.value().get(0).packageApplications().get(0).friendlyName()); - Assertions.assertEquals("ozauorsukokwb", model.value().get(0).packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java deleted file mode 100644 index 7d4970753b26..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackagePatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackagePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackagePatchProperties model = - BinaryData - .fromString("{\"isActive\":false,\"isRegularRegistration\":false,\"displayName\":\"yjkqabqgzslesjcb\"}") - .toObject(MsixPackagePatchProperties.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals("yjkqabqgzslesjcb", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackagePatchProperties model = - new MsixPackagePatchProperties() - .withIsActive(false) - .withIsRegularRegistration(false) - .withDisplayName("yjkqabqgzslesjcb"); - model = BinaryData.fromObject(model).toObject(MsixPackagePatchProperties.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals("yjkqabqgzslesjcb", model.displayName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java deleted file mode 100644 index 778ed043741c..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePatchTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackagePatch; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackagePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackagePatch model = - BinaryData - .fromString( - "{\"properties\":{\"isActive\":false,\"isRegularRegistration\":true,\"displayName\":\"kqfqjbvl\"},\"id\":\"orfmluiqt\",\"name\":\"zf\",\"type\":\"vyvnqqyb\"}") - .toObject(MsixPackagePatch.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("kqfqjbvl", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackagePatch model = - new MsixPackagePatch().withIsActive(false).withIsRegularRegistration(true).withDisplayName("kqfqjbvl"); - model = BinaryData.fromObject(model).toObject(MsixPackagePatch.class); - Assertions.assertEquals(false, model.isActive()); - Assertions.assertEquals(true, model.isRegularRegistration()); - Assertions.assertEquals("kqfqjbvl", model.displayName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java deleted file mode 100644 index c0e5cf0edd28..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagePropertiesTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.MsixPackageProperties; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MsixPackagePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MsixPackageProperties model = - BinaryData - .fromString( - "{\"imagePath\":\"cizjxvydfceacvl\",\"packageName\":\"ygdyftumrtw\",\"packageFamilyName\":\"wjslbiwkojgcyzt\",\"displayName\":\"mznbaeqphch\",\"packageRelativePath\":\"rn\",\"isRegularRegistration\":false,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"ykqgaifmvik\",\"publisher\":\"ydv\",\"minVersion\":\"bejdznxcv\"},{\"dependencyName\":\"rhnj\",\"publisher\":\"olvtnovqfzge\",\"minVersion\":\"dftuljltduce\"}],\"version\":\"tmczuomejwcwwqi\",\"lastUpdated\":\"2021-07-23T13:28:16Z\",\"packageApplications\":[{\"appId\":\"mojmsvpkjprvkw\",\"description\":\"zqljyxgtczh\",\"appUserModelID\":\"dbsdshm\",\"friendlyName\":\"maehvbbxurip\",\"iconImageName\":\"fnhtbaxkgxyw\"}]}") - .toObject(MsixPackageProperties.class); - Assertions.assertEquals("cizjxvydfceacvl", model.imagePath()); - Assertions.assertEquals("ygdyftumrtw", model.packageName()); - Assertions.assertEquals("wjslbiwkojgcyzt", model.packageFamilyName()); - Assertions.assertEquals("mznbaeqphch", model.displayName()); - Assertions.assertEquals("rn", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("ykqgaifmvik", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("ydv", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("bejdznxcv", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("tmczuomejwcwwqi", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T13:28:16Z"), model.lastUpdated()); - Assertions.assertEquals("mojmsvpkjprvkw", model.packageApplications().get(0).appId()); - Assertions.assertEquals("zqljyxgtczh", model.packageApplications().get(0).description()); - Assertions.assertEquals("dbsdshm", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("maehvbbxurip", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("fnhtbaxkgxyw", model.packageApplications().get(0).iconImageName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MsixPackageProperties model = - new MsixPackageProperties() - .withImagePath("cizjxvydfceacvl") - .withPackageName("ygdyftumrtw") - .withPackageFamilyName("wjslbiwkojgcyzt") - .withDisplayName("mznbaeqphch") - .withPackageRelativePath("rn") - .withIsRegularRegistration(false) - .withIsActive(true) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("ykqgaifmvik") - .withPublisher("ydv") - .withMinVersion("bejdznxcv"), - new MsixPackageDependencies() - .withDependencyName("rhnj") - .withPublisher("olvtnovqfzge") - .withMinVersion("dftuljltduce"))) - .withVersion("tmczuomejwcwwqi") - .withLastUpdated(OffsetDateTime.parse("2021-07-23T13:28:16Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("mojmsvpkjprvkw") - .withDescription("zqljyxgtczh") - .withAppUserModelId("dbsdshm") - .withFriendlyName("maehvbbxurip") - .withIconImageName("fnhtbaxkgxyw"))); - model = BinaryData.fromObject(model).toObject(MsixPackageProperties.class); - Assertions.assertEquals("cizjxvydfceacvl", model.imagePath()); - Assertions.assertEquals("ygdyftumrtw", model.packageName()); - Assertions.assertEquals("wjslbiwkojgcyzt", model.packageFamilyName()); - Assertions.assertEquals("mznbaeqphch", model.displayName()); - Assertions.assertEquals("rn", model.packageRelativePath()); - Assertions.assertEquals(false, model.isRegularRegistration()); - Assertions.assertEquals(true, model.isActive()); - Assertions.assertEquals("ykqgaifmvik", model.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("ydv", model.packageDependencies().get(0).publisher()); - Assertions.assertEquals("bejdznxcv", model.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("tmczuomejwcwwqi", model.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-23T13:28:16Z"), model.lastUpdated()); - Assertions.assertEquals("mojmsvpkjprvkw", model.packageApplications().get(0).appId()); - Assertions.assertEquals("zqljyxgtczh", model.packageApplications().get(0).description()); - Assertions.assertEquals("dbsdshm", model.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("maehvbbxurip", model.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("fnhtbaxkgxyw", model.packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 73cf6d07fd67..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageApplications; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackageDependencies; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MsixPackagesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"imagePath\":\"fz\",\"packageName\":\"fwxrzxmdew\",\"packageFamilyName\":\"sxkrpl\",\"displayName\":\"aze\",\"packageRelativePath\":\"w\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"hbrnnhjx\",\"publisher\":\"wjh\",\"minVersion\":\"biwetpo\"},{\"dependencyName\":\"c\",\"publisher\":\"iqyhgfse\",\"minVersion\":\"lexbsf\"}],\"version\":\"dynojpziuwfb\",\"lastUpdated\":\"2021-04-01T20:47:50Z\",\"packageApplications\":[{\"appId\":\"hqsycljselp\",\"description\":\"bafvafhlbylcc\",\"appUserModelID\":\"vxrh\",\"friendlyName\":\"d\",\"iconImageName\":\"rsofpltdbmairrh\"},{\"appId\":\"ra\",\"description\":\"npq\",\"appUserModelID\":\"tuujwouh\",\"friendlyName\":\"wsigrbjbxsj\",\"iconImageName\":\"vitvqkjyaz\"}]},\"id\":\"tggmuwdchozfnkfe\",\"name\":\"lv\",\"type\":\"noakiz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MsixPackage response = - manager - .msixPackages() - .define("hhkuuip") - .withExistingHostPool("wqapfgsdp", "vessm") - .withImagePath("qctekvalb") - .withPackageName("tjqvqyvweht") - .withPackageFamilyName("mxhzzysevus") - .withDisplayName("vzrrryveimi") - .withPackageRelativePath("kdyzatvfuzk") - .withIsRegularRegistration(false) - .withIsActive(false) - .withPackageDependencies( - Arrays - .asList( - new MsixPackageDependencies() - .withDependencyName("xwigsye") - .withPublisher("qdsmjtg") - .withMinVersion("gdgkki"))) - .withVersion("plkcsm") - .withLastUpdated(OffsetDateTime.parse("2021-05-26T00:44:03Z")) - .withPackageApplications( - Arrays - .asList( - new MsixPackageApplications() - .withAppId("baedorvvmqfl") - .withDescription("gbdg") - .withAppUserModelId("mgxdgdhpabgd") - .withFriendlyName("jddvjsaqw") - .withIconImageName("mmwllc"), - new MsixPackageApplications() - .withAppId("sxap") - .withDescription("f") - .withAppUserModelId("xcgjokjljnhvlq") - .withFriendlyName("ek") - .withIconImageName("eksnbksdqhjvyk"), - new MsixPackageApplications() - .withAppId("lkhhu") - .withDescription("cpoq") - .withAppUserModelId("vnwqjwgo") - .withFriendlyName("lejjjkxy") - .withIconImageName("fdb"), - new MsixPackageApplications() - .withAppId("tensvkzykj") - .withDescription("kns") - .withAppUserModelId("wushcdp") - .withFriendlyName("pn") - .withIconImageName("mgjfbpkuwxeoio"))) - .create(); - - Assertions.assertEquals("fz", response.imagePath()); - Assertions.assertEquals("fwxrzxmdew", response.packageName()); - Assertions.assertEquals("sxkrpl", response.packageFamilyName()); - Assertions.assertEquals("aze", response.displayName()); - Assertions.assertEquals("w", response.packageRelativePath()); - Assertions.assertEquals(false, response.isRegularRegistration()); - Assertions.assertEquals(false, response.isActive()); - Assertions.assertEquals("hbrnnhjx", response.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("wjh", response.packageDependencies().get(0).publisher()); - Assertions.assertEquals("biwetpo", response.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("dynojpziuwfb", response.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-01T20:47:50Z"), response.lastUpdated()); - Assertions.assertEquals("hqsycljselp", response.packageApplications().get(0).appId()); - Assertions.assertEquals("bafvafhlbylcc", response.packageApplications().get(0).description()); - Assertions.assertEquals("vxrh", response.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("d", response.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("rsofpltdbmairrh", response.packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java deleted file mode 100644 index 49543a692853..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MsixPackagesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.msixPackages().deleteWithResponse("taf", "bzf", "ovwmbjlzqsczpgvd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java deleted file mode 100644 index 822722ac9e80..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetWithResponseMockTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MsixPackagesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"imagePath\":\"vsqxfxjelgcmpzqj\",\"packageName\":\"hqxu\",\"packageFamilyName\":\"vcacoyv\",\"displayName\":\"bsizus\",\"packageRelativePath\":\"zlbscmnlziji\",\"isRegularRegistration\":true,\"isActive\":true,\"packageDependencies\":[{\"dependencyName\":\"lnwyvqkxr\",\"publisher\":\"lniylylyfwxz\",\"minVersion\":\"gqztwhghmupgx\"},{\"dependencyName\":\"tcdxabbujftaben\",\"publisher\":\"klqpx\",\"minVersion\":\"cafeddw\"},{\"dependencyName\":\"lzafwxu\",\"publisher\":\"nhgookrtalvnbw\",\"minVersion\":\"bemeluclvd\"},{\"dependencyName\":\"ukyrdnqodxahh\",\"publisher\":\"qfaqnvzoqg\",\"minVersion\":\"pem\"}],\"version\":\"gavsczuejd\",\"lastUpdated\":\"2021-07-06T15:50:57Z\",\"packageApplications\":[{\"appId\":\"h\",\"description\":\"homewjjstliu\",\"appUserModelID\":\"awmo\",\"friendlyName\":\"ancz\",\"iconImageName\":\"odrrslblxyd\"},{\"appId\":\"vvbxiwkgfbqljnq\",\"description\":\"ychocokulehu\",\"appUserModelID\":\"lrqff\",\"friendlyName\":\"eyu\",\"iconImageName\":\"phyjdxravj\"},{\"appId\":\"rxmrgchbapx\",\"description\":\"y\",\"appUserModelID\":\"j\",\"friendlyName\":\"ajb\",\"iconImageName\":\"cgduusio\"}]},\"id\":\"lev\",\"name\":\"mclujyxkyxlzgs\",\"type\":\"gkzz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MsixPackage response = - manager - .msixPackages() - .getWithResponse("xpjb", "ypsjoq", "jenkyh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vsqxfxjelgcmpzqj", response.imagePath()); - Assertions.assertEquals("hqxu", response.packageName()); - Assertions.assertEquals("vcacoyv", response.packageFamilyName()); - Assertions.assertEquals("bsizus", response.displayName()); - Assertions.assertEquals("zlbscmnlziji", response.packageRelativePath()); - Assertions.assertEquals(true, response.isRegularRegistration()); - Assertions.assertEquals(true, response.isActive()); - Assertions.assertEquals("lnwyvqkxr", response.packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("lniylylyfwxz", response.packageDependencies().get(0).publisher()); - Assertions.assertEquals("gqztwhghmupgx", response.packageDependencies().get(0).minVersion()); - Assertions.assertEquals("gavsczuejd", response.version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-06T15:50:57Z"), response.lastUpdated()); - Assertions.assertEquals("h", response.packageApplications().get(0).appId()); - Assertions.assertEquals("homewjjstliu", response.packageApplications().get(0).description()); - Assertions.assertEquals("awmo", response.packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("ancz", response.packageApplications().get(0).friendlyName()); - Assertions.assertEquals("odrrslblxyd", response.packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java deleted file mode 100644 index ba2f906f4c40..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListMockTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class MsixPackagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"imagePath\":\"y\",\"packageName\":\"eseyqr\",\"packageFamilyName\":\"y\",\"displayName\":\"dotjvdk\",\"packageRelativePath\":\"swskuk\",\"isRegularRegistration\":false,\"isActive\":false,\"packageDependencies\":[{\"dependencyName\":\"spkxkdt\",\"publisher\":\"kndlqvtwknvg\",\"minVersion\":\"bugtywatmqa\"},{\"dependencyName\":\"ueatgroe\",\"publisher\":\"oygzcbyfqxkfao\",\"minVersion\":\"ehqpuvjmvqmt\"}],\"version\":\"ckygroejnndljdju\",\"lastUpdated\":\"2021-01-30T20:23Z\",\"packageApplications\":[{\"appId\":\"qyn\",\"description\":\"eysfaqegplw\",\"appUserModelID\":\"shwddkvbxgk\",\"friendlyName\":\"sybwptdaca\",\"iconImageName\":\"vlf\"}]},\"id\":\"mt\",\"name\":\"oiwenazerohzrsq\",\"type\":\"lsxkd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .msixPackages() - .list("napfdqwowftpt", "uwjtks", 162312753, true, 585871352, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("y", response.iterator().next().imagePath()); - Assertions.assertEquals("eseyqr", response.iterator().next().packageName()); - Assertions.assertEquals("y", response.iterator().next().packageFamilyName()); - Assertions.assertEquals("dotjvdk", response.iterator().next().displayName()); - Assertions.assertEquals("swskuk", response.iterator().next().packageRelativePath()); - Assertions.assertEquals(false, response.iterator().next().isRegularRegistration()); - Assertions.assertEquals(false, response.iterator().next().isActive()); - Assertions.assertEquals("spkxkdt", response.iterator().next().packageDependencies().get(0).dependencyName()); - Assertions.assertEquals("kndlqvtwknvg", response.iterator().next().packageDependencies().get(0).publisher()); - Assertions.assertEquals("bugtywatmqa", response.iterator().next().packageDependencies().get(0).minVersion()); - Assertions.assertEquals("ckygroejnndljdju", response.iterator().next().version()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T20:23Z"), response.iterator().next().lastUpdated()); - Assertions.assertEquals("qyn", response.iterator().next().packageApplications().get(0).appId()); - Assertions.assertEquals("eysfaqegplw", response.iterator().next().packageApplications().get(0).description()); - Assertions - .assertEquals("shwddkvbxgk", response.iterator().next().packageApplications().get(0).appUserModelId()); - Assertions.assertEquals("sybwptdaca", response.iterator().next().packageApplications().get(0).friendlyName()); - Assertions.assertEquals("vlf", response.iterator().next().packageApplications().get(0).iconImageName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.java deleted file mode 100644 index 4a64716223f2..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification; -import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"th\",\"displayName\":\"hab\",\"blobDuration\":\"pikxwczbyscnpqxu\"}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("th", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("hab", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals("pikxwczbyscnpqxu", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("th") - .withDisplayName("hab") - .withBlobDuration("pikxwczbyscnpqxu")))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("th", model.serviceSpecification().logSpecifications().get(0).name()); - Assertions.assertEquals("hab", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals("pikxwczbyscnpqxu", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java deleted file mode 100644 index 6a1374e24e74..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListMockTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"vuzhyr\",\"display\":{\"provider\":\"ipmve\",\"resource\":\"xukuqgsj\",\"operation\":\"undxgketw\",\"description\":\"hzjhf\"},\"isDataAction\":true,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"gpmuneqsxvmhfbuz\",\"displayName\":\"ihsasb\",\"blobDuration\":\"dyp\"}]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vuzhyr", response.iterator().next().name()); - Assertions.assertEquals("ipmve", response.iterator().next().display().provider()); - Assertions.assertEquals("xukuqgsj", response.iterator().next().display().resource()); - Assertions.assertEquals("undxgketw", response.iterator().next().display().operation()); - Assertions.assertEquals("hzjhf", response.iterator().next().display().description()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions - .assertEquals( - "gpmuneqsxvmhfbuz", - response.iterator().next().properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "ihsasb", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "dyp", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .logSpecifications() - .get(0) - .blobDuration()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionListResultWithSystemDataTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionListResultWithSystemDataTests.java deleted file mode 100644 index 90da69e1ea07..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionListResultWithSystemDataTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionListResultWithSystemData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultWithSystemDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResultWithSystemData model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"epgzgqexz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"scpai\",\"actionsRequired\":\"hhbcsglummajtjao\"},\"provisioningState\":\"Failed\"},\"id\":\"bnbdxkqpxokajion\",\"name\":\"imexgstxgcpodgma\",\"type\":\"jrmvdjwzrlo\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"hijco\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"bzaqsqsycbkbfk\",\"actionsRequired\":\"kdkexxp\"},\"provisioningState\":\"Succeeded\"},\"id\":\"mxaxc\",\"name\":\"jpgd\",\"type\":\"toc\"}],\"nextLink\":\"xhvpmoue\"}") - .toObject(PrivateEndpointConnectionListResultWithSystemData.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("scpai", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions - .assertEquals( - "hhbcsglummajtjao", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResultWithSystemData model = - new PrivateEndpointConnectionListResultWithSystemData() - .withValue( - Arrays - .asList( - new PrivateEndpointConnectionWithSystemDataInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("scpai") - .withActionsRequired("hhbcsglummajtjao")), - new PrivateEndpointConnectionWithSystemDataInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("bzaqsqsycbkbfk") - .withActionsRequired("kdkexxp")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResultWithSystemData.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("scpai", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions - .assertEquals( - "hhbcsglummajtjao", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index b5f23de2d3ac..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"xklrypl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"asy\",\"actionsRequired\":\"nddhsgcbacph\"},\"provisioningState\":\"Succeeded\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("asy", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("nddhsgcbacph", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("asy") - .withActionsRequired("nddhsgcbacph")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("asy", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("nddhsgcbacph", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionTests.java deleted file mode 100644 index 9eeb10d0eda4..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnection model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"tqxhocdgeab\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"uticndvkaozwyif\",\"actionsRequired\":\"hxh\"},\"provisioningState\":\"Failed\"},\"id\":\"k\",\"name\":\"tyxolniwpwc\",\"type\":\"kjfkg\"}") - .toObject(PrivateEndpointConnection.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("uticndvkaozwyif", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hxh", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnection model = - new PrivateEndpointConnection() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("uticndvkaozwyif") - .withActionsRequired("hxh")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnection.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("uticndvkaozwyif", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hxh", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionWithSystemDataInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionWithSystemDataInnerTests.java deleted file mode 100644 index 4cec92a7ec25..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionWithSystemDataInnerTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateEndpointConnectionWithSystemDataInner; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionWithSystemDataInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionWithSystemDataInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"i\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"jnxqbzvddntwn\",\"actionsRequired\":\"icbtwnpzao\"},\"provisioningState\":\"Failed\"},\"id\":\"hrhcffcyddglmjth\",\"name\":\"qkwpyeicxmqc\",\"type\":\"wqvhkhixuigdt\"}") - .toObject(PrivateEndpointConnectionWithSystemDataInner.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jnxqbzvddntwn", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("icbtwnpzao", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionWithSystemDataInner model = - new PrivateEndpointConnectionWithSystemDataInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("jnxqbzvddntwn") - .withActionsRequired("icbtwnpzao")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionWithSystemDataInner.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jnxqbzvddntwn", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("icbtwnpzao", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests.java deleted file mode 100644 index 8b9e90820ea8..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteByHostPoolWithResponseMockTests { - @Test - public void testDeleteByHostPoolWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .privateEndpointConnections() - .deleteByHostPoolWithResponse("z", "owxeqocljmy", "vkzqk", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests.java deleted file mode 100644 index acd3ab29585c..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteByWorkspaceWithResponseMockTests { - @Test - public void testDeleteByWorkspaceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .privateEndpointConnections() - .deleteByWorkspaceWithResponse( - "fnmdxotn", "fdgugeyzi", "grkyuizabsnmfpph", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests.java deleted file mode 100644 index 3549829ed2a9..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetByHostPoolWithResponseMockTests { - @Test - public void testGetByHostPoolWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"ihsgq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ohsdtmcd\",\"actionsRequired\":\"ufcohdxbz\"},\"provisioningState\":\"Deleting\"},\"id\":\"muapcvhdbevw\",\"name\":\"qxeysko\",\"type\":\"qzinkfkbg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionWithSystemData response = - manager - .privateEndpointConnections() - .getByHostPoolWithResponse( - "jltfvnzcyjtotpv", "pvpbdbzqgqqiheds", "qwthmky", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ohsdtmcd", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ufcohdxbz", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests.java deleted file mode 100644 index 4819c76babb5..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetByWorkspaceWithResponseMockTests { - @Test - public void testGetByWorkspaceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"brjtloqxfuoj\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"flrzpas\",\"actionsRequired\":\"biuimzdlyjdfq\"},\"provisioningState\":\"Creating\"},\"id\":\"yoqufdvruz\",\"name\":\"lzo\",\"type\":\"hpc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionWithSystemData response = - manager - .privateEndpointConnections() - .getByWorkspaceWithResponse("jjrcgegydc", "boxjumvq", "olihrra", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("flrzpas", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("biuimzdlyjdfq", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolMockTests.java deleted file mode 100644 index 1abdeb56e325..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListByHostPoolMockTests { - @Test - public void testListByHostPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"prot\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ndm\",\"actionsRequired\":\"hu\"},\"provisioningState\":\"Failed\"},\"id\":\"jkavl\",\"name\":\"or\",\"type\":\"mftpmdtz\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .privateEndpointConnections() - .listByHostPool( - "nustgnljh", "mgixhcmavmqfou", 308634203, false, 1053565042, com.azure.core.util.Context.NONE); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ndm", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("hu", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceMockTests.java deleted file mode 100644 index 411f06b2986f..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByWorkspaceMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"kjibnxmysuxswqrn\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ijpstte\",\"actionsRequired\":\"qqpwcyyuf\"},\"provisioningState\":\"Failed\"},\"id\":\"uncuw\",\"name\":\"qspkcdqzhlctd\",\"type\":\"unqndyfpchrqb\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .privateEndpointConnections() - .listByWorkspace("yb", "wwpgdakchzyvlixq", com.azure.core.util.Context.NONE); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("ijpstte", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals( - "qqpwcyyuf", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests.java deleted file mode 100644 index e17fdb8c0f00..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsUpdateByHostPoolWithResponseMockTests { - @Test - public void testUpdateByHostPoolWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"okayzejnhlbkp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"piljhahzvech\",\"actionsRequired\":\"bnwieholew\"},\"provisioningState\":\"Deleting\"},\"id\":\"uubw\",\"name\":\"fqsfa\",\"type\":\"aqtferr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionWithSystemData response = - manager - .privateEndpointConnections() - .updateByHostPoolWithResponse( - "jeokbzefezrxccz", - "rtle", - "pqxbkwvzgnzvdf", - new PrivateEndpointConnection() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("jptmcgsbost") - .withActionsRequired("lnd")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("piljhahzvech", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("bnwieholew", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests.java deleted file mode 100644 index 950c3c717499..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnection; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointConnectionWithSystemData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsUpdateByWorkspaceWithResponseMockTests { - @Test - public void testUpdateByWorkspaceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"faey\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"fgvxirpghriypoqe\",\"actionsRequired\":\"lqhykprlpyz\"},\"provisioningState\":\"Creating\"},\"id\":\"iq\",\"name\":\"smexiitdf\",\"type\":\"xtyasiibmiyb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionWithSystemData response = - manager - .privateEndpointConnections() - .updateByWorkspaceWithResponse( - "jee", - "yhyhsgzfczb", - "omfgbeglqgleohib", - new PrivateEndpointConnection() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("acvbmqz") - .withActionsRequired("q")), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("fgvxirpghriypoqe", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("lqhykprlpyz", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointTests.java deleted file mode 100644 index 28988233d3a7..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"tynqgoul\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index ff4fefa3ff73..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"m\",\"requiredMembers\":[\"ofsx\"],\"requiredZoneNames\":[\"v\",\"bmqj\"]},\"id\":\"abcypmivk\",\"name\":\"lzu\",\"type\":\"ccfwnfnbacfion\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("v", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = - new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("v", "bmqj")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("v", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceListResultTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index 384007368c65..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourceListResultTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResourceListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"joghmewuama\",\"requiredMembers\":[\"z\",\"yvvtpgvdfgio\"],\"requiredZoneNames\":[\"tutqxlngxlefgug\",\"xkrxdqmi\",\"tthzrvqd\",\"abhjybi\"]},\"id\":\"ehoqfbowskan\",\"name\":\"ktzlcuiywg\",\"type\":\"ywgndrv\"}],\"nextLink\":\"hzgpphrcgyncocpe\"}") - .toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("tutqxlngxlefgug", model.value().get(0).requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResult model = - new PrivateLinkResourceListResult() - .withValue( - Arrays - .asList( - new PrivateLinkResourceInner() - .withRequiredZoneNames( - Arrays.asList("tutqxlngxlefgug", "xkrxdqmi", "tthzrvqd", "abhjybi")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); - Assertions.assertEquals("tutqxlngxlefgug", model.value().get(0).requiredZoneNames().get(0)); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 8d54c2c6485d..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"bxetqgtzxdpn\",\"requiredMembers\":[\"qwxrjfeallnw\"],\"requiredZoneNames\":[\"isnjampmngnz\",\"c\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("isnjampmngnz", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("isnjampmngnz", "c")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("isnjampmngnz", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolMockTests.java deleted file mode 100644 index 310cc730aebd..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListByHostPoolMockTests { - @Test - public void testListByHostPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"sovwxznptgoeiyb\",\"requiredMembers\":[\"pfhvfslk\"],\"requiredZoneNames\":[\"jlrigjkskyrioovz\",\"dsxwaab\",\"mifrygznmma\"]},\"id\":\"ri\",\"name\":\"kzobgopxlhsln\",\"type\":\"lxieixynllxecwcr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .privateLinkResources() - .listByHostPool("l", "qryxyn", 620085605, true, 356071455, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jlrigjkskyrioovz", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceMockTests.java deleted file mode 100644 index 73f81c17a520..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByWorkspaceMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"sqbuc\",\"requiredMembers\":[\"kyexaoguyaipi\",\"sdaultxij\",\"um\"],\"requiredZoneNames\":[\"azlnqnmcjngzqdqx\"]},\"id\":\"bjwgnyfus\",\"name\":\"zsvtuikzhajqgl\",\"type\":\"fh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .privateLinkResources() - .listByWorkspace( - "wexjkmfxapjwogq", - "nobpudcdabtqwpw", - 2010443445, - true, - 1935612973, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("azlnqnmcjngzqdqx", response.iterator().next().requiredZoneNames().get(0)); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 19b55b77a5a3..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString("{\"status\":\"Approved\",\"description\":\"i\",\"actionsRequired\":\"yqkgfg\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("i", model.description()); - Assertions.assertEquals("yqkgfg", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("i") - .withActionsRequired("yqkgfg"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("i", model.description()); - Assertions.assertEquals("yqkgfg", model.actionsRequired()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java deleted file mode 100644 index a0dff4b8f7ec..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetIdentityTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceIdentityType; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; -import org.junit.jupiter.api.Assertions; - -public final class ResourceModelWithAllowedPropertySetIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceModelWithAllowedPropertySetIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"uvfqawrlyxwj\",\"tenantId\":\"prbnwbxgjvtbv\",\"type\":\"SystemAssigned\"}") - .toObject(ResourceModelWithAllowedPropertySetIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceModelWithAllowedPropertySetIdentity model = - new ResourceModelWithAllowedPropertySetIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); - model = BinaryData.fromObject(model).toObject(ResourceModelWithAllowedPropertySetIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java deleted file mode 100644 index a49af105d066..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceModelWithAllowedPropertySetSkuTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku; -import com.azure.resourcemanager.desktopvirtualization.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class ResourceModelWithAllowedPropertySetSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceModelWithAllowedPropertySetSku model = - BinaryData - .fromString( - "{\"name\":\"muouqfp\",\"tier\":\"Free\",\"size\":\"bngui\",\"family\":\"wu\",\"capacity\":1403075438}") - .toObject(ResourceModelWithAllowedPropertySetSku.class); - Assertions.assertEquals("muouqfp", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("bngui", model.size()); - Assertions.assertEquals("wu", model.family()); - Assertions.assertEquals(1403075438, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceModelWithAllowedPropertySetSku model = - new ResourceModelWithAllowedPropertySetSku() - .withName("muouqfp") - .withTier(SkuTier.FREE) - .withSize("bngui") - .withFamily("wu") - .withCapacity(1403075438); - model = BinaryData.fromObject(model).toObject(ResourceModelWithAllowedPropertySetSku.class); - Assertions.assertEquals("muouqfp", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("bngui", model.size()); - Assertions.assertEquals("wu", model.family()); - Assertions.assertEquals(1403075438, model.capacity()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java deleted file mode 100644 index eecce71c09a8..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderOperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderOperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"ryrtihfxtijbpzv\",\"resource\":\"wzsymglzufcy\",\"operation\":\"ohdbihanufh\",\"description\":\"bj\"}") - .toObject(ResourceProviderOperationDisplay.class); - Assertions.assertEquals("ryrtihfxtijbpzv", model.provider()); - Assertions.assertEquals("wzsymglzufcy", model.resource()); - Assertions.assertEquals("ohdbihanufh", model.operation()); - Assertions.assertEquals("bj", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderOperationDisplay model = - new ResourceProviderOperationDisplay() - .withProvider("ryrtihfxtijbpzv") - .withResource("wzsymglzufcy") - .withOperation("ohdbihanufh") - .withDescription("bj"); - model = BinaryData.fromObject(model).toObject(ResourceProviderOperationDisplay.class); - Assertions.assertEquals("ryrtihfxtijbpzv", model.provider()); - Assertions.assertEquals("wzsymglzufcy", model.resource()); - Assertions.assertEquals("ohdbihanufh", model.operation()); - Assertions.assertEquals("bj", model.description()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java deleted file mode 100644 index 50d45216eaf7..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner; -import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification; -import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; -import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderOperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderOperationInner model = - BinaryData - .fromString( - "{\"name\":\"jddeqsrdeupewnw\",\"display\":{\"provider\":\"tjzyflus\",\"resource\":\"hmofc\",\"operation\":\"smy\",\"description\":\"kdtmlxhekuk\"},\"isDataAction\":false,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{\"name\":\"mparcryuanzw\",\"displayName\":\"zdxtayrlhmwhf\",\"blobDuration\":\"rqobmtuk\"}]}}}") - .toObject(ResourceProviderOperationInner.class); - Assertions.assertEquals("jddeqsrdeupewnw", model.name()); - Assertions.assertEquals("tjzyflus", model.display().provider()); - Assertions.assertEquals("hmofc", model.display().resource()); - Assertions.assertEquals("smy", model.display().operation()); - Assertions.assertEquals("kdtmlxhekuk", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions - .assertEquals("mparcryuanzw", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "zdxtayrlhmwhf", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "rqobmtuk", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderOperationInner model = - new ResourceProviderOperationInner() - .withName("jddeqsrdeupewnw") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("tjzyflus") - .withResource("hmofc") - .withOperation("smy") - .withDescription("kdtmlxhekuk")) - .withIsDataAction(false) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("mparcryuanzw") - .withDisplayName("zdxtayrlhmwhf") - .withBlobDuration("rqobmtuk"))))); - model = BinaryData.fromObject(model).toObject(ResourceProviderOperationInner.class); - Assertions.assertEquals("jddeqsrdeupewnw", model.name()); - Assertions.assertEquals("tjzyflus", model.display().provider()); - Assertions.assertEquals("hmofc", model.display().resource()); - Assertions.assertEquals("smy", model.display().operation()); - Assertions.assertEquals("kdtmlxhekuk", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions - .assertEquals("mparcryuanzw", model.properties().serviceSpecification().logSpecifications().get(0).name()); - Assertions - .assertEquals( - "zdxtayrlhmwhf", model.properties().serviceSpecification().logSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "rqobmtuk", model.properties().serviceSpecification().logSpecifications().get(0).blobDuration()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java deleted file mode 100644 index e4131c6ffa54..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ResourceProviderOperationListTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ResourceProviderOperationInner; -import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification; -import com.azure.resourcemanager.desktopvirtualization.models.OperationProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationDisplay; -import com.azure.resourcemanager.desktopvirtualization.models.ResourceProviderOperationList; -import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ResourceProviderOperationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceProviderOperationList model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"isDataAction\":false,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"name\":\"hwlrx\",\"display\":{\"provider\":\"soqijg\",\"resource\":\"mbpazlobcufpdzn\",\"operation\":\"t\",\"description\":\"qjnqglhqgnufoooj\"},\"isDataAction\":true,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{}]}}},{\"name\":\"aagdfmg\",\"display\":{\"provider\":\"hjxri\",\"resource\":\"wmrvktsizntocipa\",\"operation\":\"ajpsquc\",\"description\":\"o\"},\"isDataAction\":false,\"properties\":{\"serviceSpecification\":{\"logSpecifications\":[{},{},{},{}]}}}],\"nextLink\":\"nygj\"}") - .toObject(ResourceProviderOperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceProviderOperationList model = - new ResourceProviderOperationList() - .withValue( - Arrays - .asList( - new ResourceProviderOperationInner() - .withName("quvgjxpybczme") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("zopbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withIsDataAction(false) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays.asList(new LogSpecification(), new LogSpecification())))), - new ResourceProviderOperationInner() - .withName("hwlrx") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("soqijg") - .withResource("mbpazlobcufpdzn") - .withOperation("t") - .withDescription("qjnqglhqgnufoooj")) - .withIsDataAction(true) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays.asList(new LogSpecification(), new LogSpecification())))), - new ResourceProviderOperationInner() - .withName("aagdfmg") - .withDisplay( - new ResourceProviderOperationDisplay() - .withProvider("hjxri") - .withResource("wmrvktsizntocipa") - .withOperation("ajpsquc") - .withDescription("o")) - .withIsDataAction(false) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification(), - new LogSpecification(), - new LogSpecification(), - new LogSpecification())))))); - model = BinaryData.fromObject(model).toObject(ResourceProviderOperationList.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java deleted file mode 100644 index f416874c518d..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingHostPoolReferenceTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; -import org.junit.jupiter.api.Assertions; - -public final class ScalingHostPoolReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingHostPoolReference model = - BinaryData - .fromString("{\"hostPoolArmPath\":\"yav\",\"scalingPlanEnabled\":false}") - .toObject(ScalingHostPoolReference.class); - Assertions.assertEquals("yav", model.hostPoolArmPath()); - Assertions.assertEquals(false, model.scalingPlanEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingHostPoolReference model = - new ScalingHostPoolReference().withHostPoolArmPath("yav").withScalingPlanEnabled(false); - model = BinaryData.fromObject(model).toObject(ScalingHostPoolReference.class); - Assertions.assertEquals("yav", model.hostPoolArmPath()); - Assertions.assertEquals(false, model.scalingPlanEnabled()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java deleted file mode 100644 index 95fff0227cac..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchPropertiesTests.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingScheduleDaysOfWeekItem; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPatchProperties model = - BinaryData - .fromString( - "{\"description\":\"axdbabph\",\"friendlyName\":\"rqlfktsthsucocmn\",\"timeZone\":\"azt\",\"exclusionTag\":\"twwrqp\",\"schedules\":[{\"name\":\"kzywbiex\",\"daysOfWeek\":[\"Monday\",\"Saturday\",\"Tuesday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":537783371,\"minute\":712970145},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1757218598,\"rampUpCapacityThresholdPct\":954772002,\"peakStartTime\":{\"hour\":913520848,\"minute\":2089644825},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":1122495677,\"minute\":978941807},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1637273093,\"rampDownCapacityThresholdPct\":556709719,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":539118010,\"rampDownNotificationMessage\":\"xrhdwbavxbniwdjs\",\"offPeakStartTime\":{\"hour\":1721819579,\"minute\":44682703},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"gnxytxhpzxbz\",\"daysOfWeek\":[\"Tuesday\",\"Saturday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":687811406,\"minute\":2112719993},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1070511980,\"rampUpCapacityThresholdPct\":767485321,\"peakStartTime\":{\"hour\":683096645,\"minute\":228169976},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1091212098,\"minute\":1229662931},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":507562638,\"rampDownCapacityThresholdPct\":1271650742,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":338198941,\"rampDownNotificationMessage\":\"osvmk\",\"offPeakStartTime\":{\"hour\":979826416,\"minute\":941863244},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"kfplgmgsxnk\",\"daysOfWeek\":[\"Friday\"],\"rampUpStartTime\":{\"hour\":1802573976,\"minute\":1649575445},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":909915522,\"rampUpCapacityThresholdPct\":566835679,\"peakStartTime\":{\"hour\":1665401728,\"minute\":1601345404},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":2017228559,\"minute\":1973154307},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1060544654,\"rampDownCapacityThresholdPct\":413325201,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1370468424,\"rampDownNotificationMessage\":\"nyqupedeojnabck\",\"offPeakStartTime\":{\"hour\":598884844,\"minute\":611656940},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"btfhvpesaps\",\"scalingPlanEnabled\":false}]}") - .toObject(ScalingPlanPatchProperties.class); - Assertions.assertEquals("axdbabph", model.description()); - Assertions.assertEquals("rqlfktsthsucocmn", model.friendlyName()); - Assertions.assertEquals("azt", model.timeZone()); - Assertions.assertEquals("twwrqp", model.exclusionTag()); - Assertions.assertEquals("kzywbiex", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.MONDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(537783371, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(712970145, model.schedules().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1757218598, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(954772002, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(913520848, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(2089644825, model.schedules().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1122495677, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(978941807, model.schedules().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1637273093, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(556709719, model.schedules().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(539118010, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("xrhdwbavxbniwdjs", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1721819579, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(44682703, model.schedules().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("btfhvpesaps", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPatchProperties model = - new ScalingPlanPatchProperties() - .withDescription("axdbabph") - .withFriendlyName("rqlfktsthsucocmn") - .withTimeZone("azt") - .withExclusionTag("twwrqp") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("kzywbiex") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.MONDAY, - ScalingScheduleDaysOfWeekItem.SATURDAY, - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.THURSDAY)) - .withRampUpStartTime(new Time().withHour(537783371).withMinute(712970145)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1757218598) - .withRampUpCapacityThresholdPct(954772002) - .withPeakStartTime(new Time().withHour(913520848).withMinute(2089644825)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(1122495677).withMinute(978941807)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1637273093) - .withRampDownCapacityThresholdPct(556709719) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(539118010) - .withRampDownNotificationMessage("xrhdwbavxbniwdjs") - .withOffPeakStartTime(new Time().withHour(1721819579).withMinute(44682703)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingSchedule() - .withName("gnxytxhpzxbz") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.SATURDAY, - ScalingScheduleDaysOfWeekItem.SUNDAY)) - .withRampUpStartTime(new Time().withHour(687811406).withMinute(2112719993)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1070511980) - .withRampUpCapacityThresholdPct(767485321) - .withPeakStartTime(new Time().withHour(683096645).withMinute(228169976)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(1091212098).withMinute(1229662931)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(507562638) - .withRampDownCapacityThresholdPct(1271650742) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(338198941) - .withRampDownNotificationMessage("osvmk") - .withOffPeakStartTime(new Time().withHour(979826416).withMinute(941863244)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), - new ScalingSchedule() - .withName("kfplgmgsxnk") - .withDaysOfWeek(Arrays.asList(ScalingScheduleDaysOfWeekItem.FRIDAY)) - .withRampUpStartTime(new Time().withHour(1802573976).withMinute(1649575445)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(909915522) - .withRampUpCapacityThresholdPct(566835679) - .withPeakStartTime(new Time().withHour(1665401728).withMinute(1601345404)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(2017228559).withMinute(1973154307)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(1060544654) - .withRampDownCapacityThresholdPct(413325201) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1370468424) - .withRampDownNotificationMessage("nyqupedeojnabck") - .withOffPeakStartTime(new Time().withHour(598884844).withMinute(611656940)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST))) - .withHostPoolReferences( - Arrays - .asList( - new ScalingHostPoolReference() - .withHostPoolArmPath("btfhvpesaps") - .withScalingPlanEnabled(false))); - model = BinaryData.fromObject(model).toObject(ScalingPlanPatchProperties.class); - Assertions.assertEquals("axdbabph", model.description()); - Assertions.assertEquals("rqlfktsthsucocmn", model.friendlyName()); - Assertions.assertEquals("azt", model.timeZone()); - Assertions.assertEquals("twwrqp", model.exclusionTag()); - Assertions.assertEquals("kzywbiex", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.MONDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(537783371, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(712970145, model.schedules().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1757218598, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(954772002, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(913520848, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(2089644825, model.schedules().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1122495677, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(978941807, model.schedules().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1637273093, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(556709719, model.schedules().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(539118010, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("xrhdwbavxbniwdjs", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1721819579, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(44682703, model.schedules().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("btfhvpesaps", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java deleted file mode 100644 index fa499c36509c..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPatchTests.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPatch; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingScheduleDaysOfWeekItem; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPatch model = - BinaryData - .fromString( - "{\"tags\":{\"cukoklyaxuconu\":\"nmmqhgyxzkon\",\"pewr\":\"szfkbe\"},\"properties\":{\"description\":\"wv\",\"friendlyName\":\"ektcxsen\",\"timeZone\":\"lrsf\",\"exclusionTag\":\"zpwv\",\"schedules\":[{\"name\":\"gbiqylihkaet\",\"daysOfWeek\":[\"Thursday\",\"Thursday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":493965696,\"minute\":533172139},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1486569340,\"rampUpCapacityThresholdPct\":5394429,\"peakStartTime\":{\"hour\":1059821653,\"minute\":2064900799},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1887113058,\"minute\":1657324555},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1278137451,\"rampDownCapacityThresholdPct\":156873727,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":112236140,\"rampDownNotificationMessage\":\"txfvjrbirph\",\"offPeakStartTime\":{\"hour\":1482882841,\"minute\":99482426},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"hfnljkyq\",\"daysOfWeek\":[\"Saturday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":1054022835,\"minute\":1970519416},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":552165564,\"rampUpCapacityThresholdPct\":2084359484,\"peakStartTime\":{\"hour\":10143119,\"minute\":1108075171},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":649555961,\"minute\":1685542215},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1059812914,\"rampDownCapacityThresholdPct\":1745548413,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":630804167,\"rampDownNotificationMessage\":\"zz\",\"offPeakStartTime\":{\"hour\":1537141479,\"minute\":1755265349},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"fvgxbfsmxneh\",\"daysOfWeek\":[\"Wednesday\",\"Wednesday\",\"Sunday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":1976417253,\"minute\":68854326},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":398257944,\"rampUpCapacityThresholdPct\":156663672,\"peakStartTime\":{\"hour\":1961052031,\"minute\":1123544345},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":175699877,\"minute\":481409327},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1920273783,\"rampDownCapacityThresholdPct\":905507147,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1728715445,\"rampDownNotificationMessage\":\"cispnqzahmgkbr\",\"offPeakStartTime\":{\"hour\":188498280,\"minute\":1687540865},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"nuqqkpikadrgvt\",\"daysOfWeek\":[\"Tuesday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":122504841,\"minute\":855671205},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":508085674,\"rampUpCapacityThresholdPct\":834922568,\"peakStartTime\":{\"hour\":698240356,\"minute\":23060626},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":600405260,\"minute\":1045715770},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":2136509867,\"rampDownCapacityThresholdPct\":1477198207,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":282629437,\"rampDownNotificationMessage\":\"runmp\",\"offPeakStartTime\":{\"hour\":18555434,\"minute\":808779778},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"l\",\"scalingPlanEnabled\":false},{\"hostPoolArmPath\":\"myskpbhenbtkcxy\",\"scalingPlanEnabled\":false},{\"hostPoolArmPath\":\"nrs\",\"scalingPlanEnabled\":false},{\"hostPoolArmPath\":\"idybyxczf\",\"scalingPlanEnabled\":true}]}}") - .toObject(ScalingPlanPatch.class); - Assertions.assertEquals("nmmqhgyxzkon", model.tags().get("cukoklyaxuconu")); - Assertions.assertEquals("wv", model.description()); - Assertions.assertEquals("ektcxsen", model.friendlyName()); - Assertions.assertEquals("lrsf", model.timeZone()); - Assertions.assertEquals("zpwv", model.exclusionTag()); - Assertions.assertEquals("gbiqylihkaet", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.THURSDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(493965696, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(533172139, model.schedules().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1486569340, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(5394429, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1059821653, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(2064900799, model.schedules().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1887113058, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(1657324555, model.schedules().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1278137451, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(156873727, model.schedules().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(112236140, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("txfvjrbirph", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1482882841, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(99482426, model.schedules().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("l", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPatch model = - new ScalingPlanPatch() - .withTags(mapOf("cukoklyaxuconu", "nmmqhgyxzkon", "pewr", "szfkbe")) - .withDescription("wv") - .withFriendlyName("ektcxsen") - .withTimeZone("lrsf") - .withExclusionTag("zpwv") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("gbiqylihkaet") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.THURSDAY, - ScalingScheduleDaysOfWeekItem.THURSDAY, - ScalingScheduleDaysOfWeekItem.SUNDAY)) - .withRampUpStartTime(new Time().withHour(493965696).withMinute(533172139)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1486569340) - .withRampUpCapacityThresholdPct(5394429) - .withPeakStartTime(new Time().withHour(1059821653).withMinute(2064900799)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(1887113058).withMinute(1657324555)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1278137451) - .withRampDownCapacityThresholdPct(156873727) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(112236140) - .withRampDownNotificationMessage("txfvjrbirph") - .withOffPeakStartTime(new Time().withHour(1482882841).withMinute(99482426)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingSchedule() - .withName("hfnljkyq") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.SATURDAY, - ScalingScheduleDaysOfWeekItem.THURSDAY)) - .withRampUpStartTime(new Time().withHour(1054022835).withMinute(1970519416)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(552165564) - .withRampUpCapacityThresholdPct(2084359484) - .withPeakStartTime(new Time().withHour(10143119).withMinute(1108075171)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(649555961).withMinute(1685542215)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1059812914) - .withRampDownCapacityThresholdPct(1745548413) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(630804167) - .withRampDownNotificationMessage("zz") - .withOffPeakStartTime(new Time().withHour(1537141479).withMinute(1755265349)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingSchedule() - .withName("fvgxbfsmxneh") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.WEDNESDAY, - ScalingScheduleDaysOfWeekItem.WEDNESDAY, - ScalingScheduleDaysOfWeekItem.SUNDAY, - ScalingScheduleDaysOfWeekItem.SUNDAY)) - .withRampUpStartTime(new Time().withHour(1976417253).withMinute(68854326)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(398257944) - .withRampUpCapacityThresholdPct(156663672) - .withPeakStartTime(new Time().withHour(1961052031).withMinute(1123544345)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(175699877).withMinute(481409327)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(1920273783) - .withRampDownCapacityThresholdPct(905507147) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(1728715445) - .withRampDownNotificationMessage("cispnqzahmgkbr") - .withOffPeakStartTime(new Time().withHour(188498280).withMinute(1687540865)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), - new ScalingSchedule() - .withName("nuqqkpikadrgvt") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.SATURDAY)) - .withRampUpStartTime(new Time().withHour(122504841).withMinute(855671205)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(508085674) - .withRampUpCapacityThresholdPct(834922568) - .withPeakStartTime(new Time().withHour(698240356).withMinute(23060626)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(600405260).withMinute(1045715770)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(2136509867) - .withRampDownCapacityThresholdPct(1477198207) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(282629437) - .withRampDownNotificationMessage("runmp") - .withOffPeakStartTime(new Time().withHour(18555434).withMinute(808779778)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST))) - .withHostPoolReferences( - Arrays - .asList( - new ScalingHostPoolReference().withHostPoolArmPath("l").withScalingPlanEnabled(false), - new ScalingHostPoolReference() - .withHostPoolArmPath("myskpbhenbtkcxy") - .withScalingPlanEnabled(false), - new ScalingHostPoolReference().withHostPoolArmPath("nrs").withScalingPlanEnabled(false), - new ScalingHostPoolReference() - .withHostPoolArmPath("idybyxczf") - .withScalingPlanEnabled(true))); - model = BinaryData.fromObject(model).toObject(ScalingPlanPatch.class); - Assertions.assertEquals("nmmqhgyxzkon", model.tags().get("cukoklyaxuconu")); - Assertions.assertEquals("wv", model.description()); - Assertions.assertEquals("ektcxsen", model.friendlyName()); - Assertions.assertEquals("lrsf", model.timeZone()); - Assertions.assertEquals("zpwv", model.exclusionTag()); - Assertions.assertEquals("gbiqylihkaet", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.THURSDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(493965696, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(533172139, model.schedules().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1486569340, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(5394429, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1059821653, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(2064900799, model.schedules().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1887113058, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(1657324555, model.schedules().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1278137451, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(156873727, model.schedules().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(112236140, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("txfvjrbirph", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1482882841, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(99482426, model.schedules().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("l", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleInnerTests.java deleted file mode 100644 index 3c3849a056fe..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleInnerTests.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; -import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; -import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPersonalScheduleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPersonalScheduleInner model = - BinaryData - .fromString( - "{\"properties\":{\"daysOfWeek\":[\"Monday\",\"Friday\",\"Wednesday\"],\"rampUpStartTime\":{\"hour\":1500766151,\"minute\":1796159221},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":1230471233,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":2000011197,\"peakStartTime\":{\"hour\":1573909011,\"minute\":2050375248},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":613009021,\"peakActionOnLogoff\":\"Hibernate\",\"peakMinutesToWaitOnLogoff\":119641642,\"rampDownStartTime\":{\"hour\":939730908,\"minute\":1520557842},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"Deallocate\",\"rampDownMinutesToWaitOnDisconnect\":282783230,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":538641166,\"offPeakStartTime\":{\"hour\":1437797215,\"minute\":953152084},\"offPeakStartVMOnConnect\":\"Enable\",\"offPeakActionOnDisconnect\":\"None\",\"offPeakMinutesToWaitOnDisconnect\":591532413,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":994320059},\"id\":\"t\",\"name\":\"oellwp\",\"type\":\"fdygpfqbuaceopz\"}") - .toObject(ScalingPlanPersonalScheduleInner.class); - Assertions.assertEquals(DayOfWeek.MONDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(1500766151, model.rampUpStartTime().hour()); - Assertions.assertEquals(1796159221, model.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); - Assertions.assertEquals(1230471233, model.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampUpActionOnLogoff()); - Assertions.assertEquals(2000011197, model.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(1573909011, model.peakStartTime().hour()); - Assertions.assertEquals(2050375248, model.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnDisconnect()); - Assertions.assertEquals(613009021, model.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); - Assertions.assertEquals(119641642, model.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(939730908, model.rampDownStartTime().hour()); - Assertions.assertEquals(1520557842, model.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnDisconnect()); - Assertions.assertEquals(282783230, model.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnLogoff()); - Assertions.assertEquals(538641166, model.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(1437797215, model.offPeakStartTime().hour()); - Assertions.assertEquals(953152084, model.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnDisconnect()); - Assertions.assertEquals(591532413, model.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); - Assertions.assertEquals(994320059, model.offPeakMinutesToWaitOnLogoff()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPersonalScheduleInner model = - new ScalingPlanPersonalScheduleInner() - .withDaysOfWeek(Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.FRIDAY, DayOfWeek.WEDNESDAY)) - .withRampUpStartTime(new Time().withHour(1500766151).withMinute(1796159221)) - .withRampUpAutoStartHosts(StartupBehavior.ALL) - .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampUpMinutesToWaitOnDisconnect(1230471233) - .withRampUpActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withRampUpMinutesToWaitOnLogoff(2000011197) - .withPeakStartTime(new Time().withHour(1573909011).withMinute(2050375248)) - .withPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) - .withPeakMinutesToWaitOnDisconnect(613009021) - .withPeakActionOnLogoff(SessionHandlingOperation.HIBERNATE) - .withPeakMinutesToWaitOnLogoff(119641642) - .withRampDownStartTime(new Time().withHour(939730908).withMinute(1520557842)) - .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withRampDownActionOnDisconnect(SessionHandlingOperation.DEALLOCATE) - .withRampDownMinutesToWaitOnDisconnect(282783230) - .withRampDownActionOnLogoff(SessionHandlingOperation.NONE) - .withRampDownMinutesToWaitOnLogoff(538641166) - .withOffPeakStartTime(new Time().withHour(1437797215).withMinute(953152084)) - .withOffPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) - .withOffPeakMinutesToWaitOnDisconnect(591532413) - .withOffPeakActionOnLogoff(SessionHandlingOperation.NONE) - .withOffPeakMinutesToWaitOnLogoff(994320059); - model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalScheduleInner.class); - Assertions.assertEquals(DayOfWeek.MONDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(1500766151, model.rampUpStartTime().hour()); - Assertions.assertEquals(1796159221, model.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); - Assertions.assertEquals(1230471233, model.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampUpActionOnLogoff()); - Assertions.assertEquals(2000011197, model.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(1573909011, model.peakStartTime().hour()); - Assertions.assertEquals(2050375248, model.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnDisconnect()); - Assertions.assertEquals(613009021, model.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); - Assertions.assertEquals(119641642, model.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(939730908, model.rampDownStartTime().hour()); - Assertions.assertEquals(1520557842, model.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnDisconnect()); - Assertions.assertEquals(282783230, model.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnLogoff()); - Assertions.assertEquals(538641166, model.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(1437797215, model.offPeakStartTime().hour()); - Assertions.assertEquals(953152084, model.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnDisconnect()); - Assertions.assertEquals(591532413, model.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); - Assertions.assertEquals(994320059, model.offPeakMinutesToWaitOnLogoff()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleListTests.java deleted file mode 100644 index 9da203c65086..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalScheduleListTests.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleInner; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalScheduleList; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; -import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; -import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPersonalScheduleListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPersonalScheduleList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Tuesday\",\"Tuesday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":1296787469,\"minute\":693295515},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":1336387683,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":520113589,\"peakStartTime\":{\"hour\":1577221415,\"minute\":1359376561},\"peakStartVMOnConnect\":\"Enable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":932797807,\"peakActionOnLogoff\":\"None\",\"peakMinutesToWaitOnLogoff\":567516658,\"rampDownStartTime\":{\"hour\":475216783,\"minute\":392993819},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":249445305,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":1060545026,\"offPeakStartTime\":{\"hour\":181665784,\"minute\":94266347},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Deallocate\",\"offPeakMinutesToWaitOnDisconnect\":655886827,\"offPeakActionOnLogoff\":\"Hibernate\",\"offPeakMinutesToWaitOnLogoff\":794984845},\"id\":\"jbi\",\"name\":\"xb\",\"type\":\"ybsrfbjfdtwss\"},{\"properties\":{\"daysOfWeek\":[\"Friday\",\"Tuesday\",\"Monday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":1933405011,\"minute\":1814798864},\"rampUpAutoStartHosts\":\"WithAssignedUser\",\"rampUpStartVMOnConnect\":\"Disable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":267122524,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":1827654965,\"peakStartTime\":{\"hour\":1651928304,\"minute\":600094153},\"peakStartVMOnConnect\":\"Enable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":623539244,\"peakActionOnLogoff\":\"Deallocate\",\"peakMinutesToWaitOnLogoff\":994022828,\"rampDownStartTime\":{\"hour\":2112344615,\"minute\":1589023977},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":778428037,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":524895743,\"offPeakStartTime\":{\"hour\":1598094804,\"minute\":2026519653},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"None\",\"offPeakMinutesToWaitOnDisconnect\":1059734695,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":432099850},\"id\":\"pehindoygm\",\"name\":\"fthnzdn\",\"type\":\"sl\"}],\"nextLink\":\"ayqigynduhav\"}") - .toObject(ScalingPlanPersonalScheduleList.class); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.value().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(1296787469, model.value().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(693295515, model.value().get(0).rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.value().get(0).rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampUpActionOnDisconnect()); - Assertions.assertEquals(1336387683, model.value().get(0).rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).rampUpActionOnLogoff()); - Assertions.assertEquals(520113589, model.value().get(0).rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(1577221415, model.value().get(0).peakStartTime().hour()); - Assertions.assertEquals(1359376561, model.value().get(0).peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).peakActionOnDisconnect()); - Assertions.assertEquals(932797807, model.value().get(0).peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).peakActionOnLogoff()); - Assertions.assertEquals(567516658, model.value().get(0).peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(475216783, model.value().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(392993819, model.value().get(0).rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnDisconnect()); - Assertions.assertEquals(249445305, model.value().get(0).rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnLogoff()); - Assertions.assertEquals(1060545026, model.value().get(0).rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(181665784, model.value().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(94266347, model.value().get(0).offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.value().get(0).offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).offPeakActionOnDisconnect()); - Assertions.assertEquals(655886827, model.value().get(0).offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).offPeakActionOnLogoff()); - Assertions.assertEquals(794984845, model.value().get(0).offPeakMinutesToWaitOnLogoff()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPersonalScheduleList model = - new ScalingPlanPersonalScheduleList() - .withValue( - Arrays - .asList( - new ScalingPlanPersonalScheduleInner() - .withDaysOfWeek(Arrays.asList(DayOfWeek.TUESDAY, DayOfWeek.TUESDAY, DayOfWeek.THURSDAY)) - .withRampUpStartTime(new Time().withHour(1296787469).withMinute(693295515)) - .withRampUpAutoStartHosts(StartupBehavior.ALL) - .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampUpMinutesToWaitOnDisconnect(1336387683) - .withRampUpActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withRampUpMinutesToWaitOnLogoff(520113589) - .withPeakStartTime(new Time().withHour(1577221415).withMinute(1359376561)) - .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) - .withPeakMinutesToWaitOnDisconnect(932797807) - .withPeakActionOnLogoff(SessionHandlingOperation.NONE) - .withPeakMinutesToWaitOnLogoff(567516658) - .withRampDownStartTime(new Time().withHour(475216783).withMinute(392993819)) - .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampDownMinutesToWaitOnDisconnect(249445305) - .withRampDownActionOnLogoff(SessionHandlingOperation.NONE) - .withRampDownMinutesToWaitOnLogoff(1060545026) - .withOffPeakStartTime(new Time().withHour(181665784).withMinute(94266347)) - .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withOffPeakActionOnDisconnect(SessionHandlingOperation.DEALLOCATE) - .withOffPeakMinutesToWaitOnDisconnect(655886827) - .withOffPeakActionOnLogoff(SessionHandlingOperation.HIBERNATE) - .withOffPeakMinutesToWaitOnLogoff(794984845), - new ScalingPlanPersonalScheduleInner() - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.FRIDAY, DayOfWeek.TUESDAY, DayOfWeek.MONDAY, DayOfWeek.SUNDAY)) - .withRampUpStartTime(new Time().withHour(1933405011).withMinute(1814798864)) - .withRampUpAutoStartHosts(StartupBehavior.WITH_ASSIGNED_USER) - .withRampUpStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampUpMinutesToWaitOnDisconnect(267122524) - .withRampUpActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withRampUpMinutesToWaitOnLogoff(1827654965) - .withPeakStartTime(new Time().withHour(1651928304).withMinute(600094153)) - .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) - .withPeakMinutesToWaitOnDisconnect(623539244) - .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withPeakMinutesToWaitOnLogoff(994022828) - .withRampDownStartTime(new Time().withHour(2112344615).withMinute(1589023977)) - .withRampDownStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampDownMinutesToWaitOnDisconnect(778428037) - .withRampDownActionOnLogoff(SessionHandlingOperation.NONE) - .withRampDownMinutesToWaitOnLogoff(524895743) - .withOffPeakStartTime(new Time().withHour(1598094804).withMinute(2026519653)) - .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) - .withOffPeakMinutesToWaitOnDisconnect(1059734695) - .withOffPeakActionOnLogoff(SessionHandlingOperation.NONE) - .withOffPeakMinutesToWaitOnLogoff(432099850))); - model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalScheduleList.class); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.value().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(1296787469, model.value().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(693295515, model.value().get(0).rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.value().get(0).rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampUpActionOnDisconnect()); - Assertions.assertEquals(1336387683, model.value().get(0).rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).rampUpActionOnLogoff()); - Assertions.assertEquals(520113589, model.value().get(0).rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(1577221415, model.value().get(0).peakStartTime().hour()); - Assertions.assertEquals(1359376561, model.value().get(0).peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).peakActionOnDisconnect()); - Assertions.assertEquals(932797807, model.value().get(0).peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).peakActionOnLogoff()); - Assertions.assertEquals(567516658, model.value().get(0).peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(475216783, model.value().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(392993819, model.value().get(0).rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.value().get(0).rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnDisconnect()); - Assertions.assertEquals(249445305, model.value().get(0).rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.value().get(0).rampDownActionOnLogoff()); - Assertions.assertEquals(1060545026, model.value().get(0).rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(181665784, model.value().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(94266347, model.value().get(0).offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.value().get(0).offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.value().get(0).offPeakActionOnDisconnect()); - Assertions.assertEquals(655886827, model.value().get(0).offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.value().get(0).offPeakActionOnLogoff()); - Assertions.assertEquals(794984845, model.value().get(0).offPeakMinutesToWaitOnLogoff()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePatchTests.java deleted file mode 100644 index 8660dc9d93da..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePatchTests.java +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedulePatch; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; -import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; -import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPersonalSchedulePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPersonalSchedulePatch model = - BinaryData - .fromString( - "{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":256415791,\"minute\":1905459835},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"Hibernate\",\"rampUpMinutesToWaitOnDisconnect\":258725864,\"rampUpActionOnLogoff\":\"Hibernate\",\"rampUpMinutesToWaitOnLogoff\":1042702068,\"peakStartTime\":{\"hour\":1688847935,\"minute\":1314959549},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":928593835,\"peakActionOnLogoff\":\"Hibernate\",\"peakMinutesToWaitOnLogoff\":2022160914,\"rampDownStartTime\":{\"hour\":1631327314,\"minute\":1757404890},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":43385515,\"rampDownActionOnLogoff\":\"Hibernate\",\"rampDownMinutesToWaitOnLogoff\":928990245,\"offPeakStartTime\":{\"hour\":1261594790,\"minute\":1493412527},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Deallocate\",\"offPeakMinutesToWaitOnDisconnect\":1076611714,\"offPeakActionOnLogoff\":\"Deallocate\",\"offPeakMinutesToWaitOnLogoff\":76309450}}") - .toObject(ScalingPlanPersonalSchedulePatch.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(256415791, model.rampUpStartTime().hour()); - Assertions.assertEquals(1905459835, model.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnDisconnect()); - Assertions.assertEquals(258725864, model.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnLogoff()); - Assertions.assertEquals(1042702068, model.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(1688847935, model.peakStartTime().hour()); - Assertions.assertEquals(1314959549, model.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); - Assertions.assertEquals(928593835, model.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); - Assertions.assertEquals(2022160914, model.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(1631327314, model.rampDownStartTime().hour()); - Assertions.assertEquals(1757404890, model.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnDisconnect()); - Assertions.assertEquals(43385515, model.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnLogoff()); - Assertions.assertEquals(928990245, model.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(1261594790, model.offPeakStartTime().hour()); - Assertions.assertEquals(1493412527, model.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnDisconnect()); - Assertions.assertEquals(1076611714, model.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnLogoff()); - Assertions.assertEquals(76309450, model.offPeakMinutesToWaitOnLogoff()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPersonalSchedulePatch model = - new ScalingPlanPersonalSchedulePatch() - .withDaysOfWeek(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.TUESDAY)) - .withRampUpStartTime(new Time().withHour(256415791).withMinute(1905459835)) - .withRampUpAutoStartHosts(StartupBehavior.ALL) - .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withRampUpActionOnDisconnect(SessionHandlingOperation.HIBERNATE) - .withRampUpMinutesToWaitOnDisconnect(258725864) - .withRampUpActionOnLogoff(SessionHandlingOperation.HIBERNATE) - .withRampUpMinutesToWaitOnLogoff(1042702068) - .withPeakStartTime(new Time().withHour(1688847935).withMinute(1314959549)) - .withPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) - .withPeakMinutesToWaitOnDisconnect(928593835) - .withPeakActionOnLogoff(SessionHandlingOperation.HIBERNATE) - .withPeakMinutesToWaitOnLogoff(2022160914) - .withRampDownStartTime(new Time().withHour(1631327314).withMinute(1757404890)) - .withRampDownStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampDownMinutesToWaitOnDisconnect(43385515) - .withRampDownActionOnLogoff(SessionHandlingOperation.HIBERNATE) - .withRampDownMinutesToWaitOnLogoff(928990245) - .withOffPeakStartTime(new Time().withHour(1261594790).withMinute(1493412527)) - .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withOffPeakActionOnDisconnect(SessionHandlingOperation.DEALLOCATE) - .withOffPeakMinutesToWaitOnDisconnect(1076611714) - .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withOffPeakMinutesToWaitOnLogoff(76309450); - model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalSchedulePatch.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(256415791, model.rampUpStartTime().hour()); - Assertions.assertEquals(1905459835, model.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnDisconnect()); - Assertions.assertEquals(258725864, model.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampUpActionOnLogoff()); - Assertions.assertEquals(1042702068, model.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(1688847935, model.peakStartTime().hour()); - Assertions.assertEquals(1314959549, model.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); - Assertions.assertEquals(928593835, model.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnLogoff()); - Assertions.assertEquals(2022160914, model.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(1631327314, model.rampDownStartTime().hour()); - Assertions.assertEquals(1757404890, model.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampDownActionOnDisconnect()); - Assertions.assertEquals(43385515, model.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnLogoff()); - Assertions.assertEquals(928990245, model.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(1261594790, model.offPeakStartTime().hour()); - Assertions.assertEquals(1493412527, model.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnDisconnect()); - Assertions.assertEquals(1076611714, model.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.offPeakActionOnLogoff()); - Assertions.assertEquals(76309450, model.offPeakMinutesToWaitOnLogoff()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePropertiesTests.java deleted file mode 100644 index 325afcc7611b..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulePropertiesTests.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPersonalScheduleProperties; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; -import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; -import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPersonalSchedulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPersonalScheduleProperties model = - BinaryData - .fromString( - "{\"daysOfWeek\":[\"Thursday\",\"Monday\",\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":90973381,\"minute\":284689658},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":1990032205,\"rampUpActionOnLogoff\":\"None\",\"rampUpMinutesToWaitOnLogoff\":1114534772,\"peakStartTime\":{\"hour\":883110642,\"minute\":1247520399},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":1114721091,\"peakActionOnLogoff\":\"None\",\"peakMinutesToWaitOnLogoff\":1356840761,\"rampDownStartTime\":{\"hour\":1358257343,\"minute\":2138169830},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"Hibernate\",\"rampDownMinutesToWaitOnDisconnect\":919813735,\"rampDownActionOnLogoff\":\"Deallocate\",\"rampDownMinutesToWaitOnLogoff\":159831897,\"offPeakStartTime\":{\"hour\":527212463,\"minute\":1504791861},\"offPeakStartVMOnConnect\":\"Enable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":529783276,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":478088407}") - .toObject(ScalingPlanPersonalScheduleProperties.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(90973381, model.rampUpStartTime().hour()); - Assertions.assertEquals(284689658, model.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); - Assertions.assertEquals(1990032205, model.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnLogoff()); - Assertions.assertEquals(1114534772, model.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(883110642, model.peakStartTime().hour()); - Assertions.assertEquals(1247520399, model.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); - Assertions.assertEquals(1114721091, model.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnLogoff()); - Assertions.assertEquals(1356840761, model.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(1358257343, model.rampDownStartTime().hour()); - Assertions.assertEquals(2138169830, model.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnDisconnect()); - Assertions.assertEquals(919813735, model.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnLogoff()); - Assertions.assertEquals(159831897, model.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(527212463, model.offPeakStartTime().hour()); - Assertions.assertEquals(1504791861, model.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.offPeakActionOnDisconnect()); - Assertions.assertEquals(529783276, model.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); - Assertions.assertEquals(478088407, model.offPeakMinutesToWaitOnLogoff()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPersonalScheduleProperties model = - new ScalingPlanPersonalScheduleProperties() - .withDaysOfWeek( - Arrays.asList(DayOfWeek.THURSDAY, DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.TUESDAY)) - .withRampUpStartTime(new Time().withHour(90973381).withMinute(284689658)) - .withRampUpAutoStartHosts(StartupBehavior.ALL) - .withRampUpStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withRampUpActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampUpMinutesToWaitOnDisconnect(1990032205) - .withRampUpActionOnLogoff(SessionHandlingOperation.NONE) - .withRampUpMinutesToWaitOnLogoff(1114534772) - .withPeakStartTime(new Time().withHour(883110642).withMinute(1247520399)) - .withPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) - .withPeakMinutesToWaitOnDisconnect(1114721091) - .withPeakActionOnLogoff(SessionHandlingOperation.NONE) - .withPeakMinutesToWaitOnLogoff(1356840761) - .withRampDownStartTime(new Time().withHour(1358257343).withMinute(2138169830)) - .withRampDownStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withRampDownActionOnDisconnect(SessionHandlingOperation.HIBERNATE) - .withRampDownMinutesToWaitOnDisconnect(919813735) - .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withRampDownMinutesToWaitOnLogoff(159831897) - .withOffPeakStartTime(new Time().withHour(527212463).withMinute(1504791861)) - .withOffPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withOffPeakActionOnDisconnect(SessionHandlingOperation.HIBERNATE) - .withOffPeakMinutesToWaitOnDisconnect(529783276) - .withOffPeakActionOnLogoff(SessionHandlingOperation.NONE) - .withOffPeakMinutesToWaitOnLogoff(478088407); - model = BinaryData.fromObject(model).toObject(ScalingPlanPersonalScheduleProperties.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(90973381, model.rampUpStartTime().hour()); - Assertions.assertEquals(284689658, model.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, model.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnDisconnect()); - Assertions.assertEquals(1990032205, model.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.rampUpActionOnLogoff()); - Assertions.assertEquals(1114534772, model.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(883110642, model.peakStartTime().hour()); - Assertions.assertEquals(1247520399, model.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.peakActionOnDisconnect()); - Assertions.assertEquals(1114721091, model.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.peakActionOnLogoff()); - Assertions.assertEquals(1356840761, model.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(1358257343, model.rampDownStartTime().hour()); - Assertions.assertEquals(2138169830, model.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, model.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.rampDownActionOnDisconnect()); - Assertions.assertEquals(919813735, model.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, model.rampDownActionOnLogoff()); - Assertions.assertEquals(159831897, model.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(527212463, model.offPeakStartTime().hour()); - Assertions.assertEquals(1504791861, model.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, model.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, model.offPeakActionOnDisconnect()); - Assertions.assertEquals(529783276, model.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, model.offPeakActionOnLogoff()); - Assertions.assertEquals(478088407, model.offPeakMinutesToWaitOnLogoff()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateWithResponseMockTests.java deleted file mode 100644 index e2540474a270..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesCreateWithResponseMockTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; -import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; -import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPersonalSchedulesCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"daysOfWeek\":[\"Thursday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":474729802,\"minute\":513283107},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"None\",\"rampUpMinutesToWaitOnDisconnect\":120570270,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":1801029414,\"peakStartTime\":{\"hour\":2013893290,\"minute\":728731016},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":956531866,\"peakActionOnLogoff\":\"Deallocate\",\"peakMinutesToWaitOnLogoff\":1159295504,\"rampDownStartTime\":{\"hour\":881600617,\"minute\":323271862},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"Hibernate\",\"rampDownMinutesToWaitOnDisconnect\":643996998,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":1995436037,\"offPeakStartTime\":{\"hour\":429676827,\"minute\":550582192},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":420064622,\"offPeakActionOnLogoff\":\"Hibernate\",\"offPeakMinutesToWaitOnLogoff\":617111065},\"id\":\"iroqbosh\",\"name\":\"ragapyyrmfsvbp\",\"type\":\"vbopfppdbwnu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScalingPlanPersonalSchedule response = - manager - .scalingPlanPersonalSchedules() - .define("tlyo") - .withExistingScalingPlan("xbannovvoxc", "ytprwnwvroev") - .withDaysOfWeek( - Arrays.asList(DayOfWeek.FRIDAY, DayOfWeek.MONDAY, DayOfWeek.WEDNESDAY, DayOfWeek.MONDAY)) - .withRampUpStartTime(new Time().withHour(725083050).withMinute(1442660338)) - .withRampUpAutoStartHosts(StartupBehavior.NONE) - .withRampUpStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withRampUpActionOnDisconnect(SessionHandlingOperation.HIBERNATE) - .withRampUpMinutesToWaitOnDisconnect(251649293) - .withRampUpActionOnLogoff(SessionHandlingOperation.HIBERNATE) - .withRampUpMinutesToWaitOnLogoff(1458275962) - .withPeakStartTime(new Time().withHour(952405971).withMinute(1835764964)) - .withPeakStartVMOnConnect(SetStartVMOnConnect.ENABLE) - .withPeakActionOnDisconnect(SessionHandlingOperation.NONE) - .withPeakMinutesToWaitOnDisconnect(61809023) - .withPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withPeakMinutesToWaitOnLogoff(552291505) - .withRampDownStartTime(new Time().withHour(796000684).withMinute(312997434)) - .withRampDownStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withRampDownActionOnDisconnect(SessionHandlingOperation.NONE) - .withRampDownMinutesToWaitOnDisconnect(1195443779) - .withRampDownActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withRampDownMinutesToWaitOnLogoff(1597074926) - .withOffPeakStartTime(new Time().withHour(1352836682).withMinute(315314299)) - .withOffPeakStartVMOnConnect(SetStartVMOnConnect.DISABLE) - .withOffPeakActionOnDisconnect(SessionHandlingOperation.NONE) - .withOffPeakMinutesToWaitOnDisconnect(265709427) - .withOffPeakActionOnLogoff(SessionHandlingOperation.DEALLOCATE) - .withOffPeakMinutesToWaitOnLogoff(347000614) - .create(); - - Assertions.assertEquals(DayOfWeek.THURSDAY, response.daysOfWeek().get(0)); - Assertions.assertEquals(474729802, response.rampUpStartTime().hour()); - Assertions.assertEquals(513283107, response.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, response.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, response.rampUpActionOnDisconnect()); - Assertions.assertEquals(120570270, response.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.rampUpActionOnLogoff()); - Assertions.assertEquals(1801029414, response.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(2013893290, response.peakStartTime().hour()); - Assertions.assertEquals(728731016, response.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, response.peakActionOnDisconnect()); - Assertions.assertEquals(956531866, response.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.peakActionOnLogoff()); - Assertions.assertEquals(1159295504, response.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(881600617, response.rampDownStartTime().hour()); - Assertions.assertEquals(323271862, response.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampDownActionOnDisconnect()); - Assertions.assertEquals(643996998, response.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, response.rampDownActionOnLogoff()); - Assertions.assertEquals(1995436037, response.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(429676827, response.offPeakStartTime().hour()); - Assertions.assertEquals(550582192, response.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnDisconnect()); - Assertions.assertEquals(420064622, response.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnLogoff()); - Assertions.assertEquals(617111065, response.offPeakMinutesToWaitOnLogoff()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteWithResponseMockTests.java deleted file mode 100644 index b29aa469df05..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPersonalSchedulesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .scalingPlanPersonalSchedules() - .deleteWithResponse("qwtehtuevr", "rljyoogwxhnsdu", "gwbsreurf", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetWithResponseMockTests.java deleted file mode 100644 index e9d386b188d2..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; -import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; -import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPersonalSchedulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"daysOfWeek\":[\"Wednesday\"],\"rampUpStartTime\":{\"hour\":504276200,\"minute\":273714552},\"rampUpAutoStartHosts\":\"All\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"Hibernate\",\"rampUpMinutesToWaitOnDisconnect\":837661803,\"rampUpActionOnLogoff\":\"Hibernate\",\"rampUpMinutesToWaitOnLogoff\":1248753250,\"peakStartTime\":{\"hour\":442073665,\"minute\":2020150927},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"None\",\"peakMinutesToWaitOnDisconnect\":792139303,\"peakActionOnLogoff\":\"Deallocate\",\"peakMinutesToWaitOnLogoff\":381107449,\"rampDownStartTime\":{\"hour\":639293987,\"minute\":685959660},\"rampDownStartVMOnConnect\":\"Disable\",\"rampDownActionOnDisconnect\":\"Deallocate\",\"rampDownMinutesToWaitOnDisconnect\":1539061935,\"rampDownActionOnLogoff\":\"Hibernate\",\"rampDownMinutesToWaitOnLogoff\":1692137412,\"offPeakStartTime\":{\"hour\":45100221,\"minute\":758863003},\"offPeakStartVMOnConnect\":\"Disable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":2055999585,\"offPeakActionOnLogoff\":\"Hibernate\",\"offPeakMinutesToWaitOnLogoff\":1093469503},\"id\":\"hfhpfp\",\"name\":\"zjzoywjxhpdul\",\"type\":\"ntacn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScalingPlanPersonalSchedule response = - manager - .scalingPlanPersonalSchedules() - .getWithResponse("byrplrohkpig", "fusuckzmkwklsno", "axmqeqal", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.daysOfWeek().get(0)); - Assertions.assertEquals(504276200, response.rampUpStartTime().hour()); - Assertions.assertEquals(273714552, response.rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.ALL, response.rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.rampUpStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampUpActionOnDisconnect()); - Assertions.assertEquals(837661803, response.rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampUpActionOnLogoff()); - Assertions.assertEquals(1248753250, response.rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(442073665, response.peakStartTime().hour()); - Assertions.assertEquals(2020150927, response.peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.peakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, response.peakActionOnDisconnect()); - Assertions.assertEquals(792139303, response.peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.peakActionOnLogoff()); - Assertions.assertEquals(381107449, response.peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(639293987, response.rampDownStartTime().hour()); - Assertions.assertEquals(685959660, response.rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.rampDownActionOnDisconnect()); - Assertions.assertEquals(1539061935, response.rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.rampDownActionOnLogoff()); - Assertions.assertEquals(1692137412, response.rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(45100221, response.offPeakStartTime().hour()); - Assertions.assertEquals(758863003, response.offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.offPeakStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnDisconnect()); - Assertions.assertEquals(2055999585, response.offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.offPeakActionOnLogoff()); - Assertions.assertEquals(1093469503, response.offPeakMinutesToWaitOnLogoff()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListMockTests.java deleted file mode 100644 index 2d5671df4cc3..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesListMockTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPersonalSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHandlingOperation; -import com.azure.resourcemanager.desktopvirtualization.models.SetStartVMOnConnect; -import com.azure.resourcemanager.desktopvirtualization.models.StartupBehavior; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPersonalSchedulesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Saturday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":1124530948,\"minute\":499319607},\"rampUpAutoStartHosts\":\"None\",\"rampUpStartVMOnConnect\":\"Enable\",\"rampUpActionOnDisconnect\":\"Deallocate\",\"rampUpMinutesToWaitOnDisconnect\":1014248956,\"rampUpActionOnLogoff\":\"Deallocate\",\"rampUpMinutesToWaitOnLogoff\":1964077679,\"peakStartTime\":{\"hour\":325210544,\"minute\":2124129380},\"peakStartVMOnConnect\":\"Disable\",\"peakActionOnDisconnect\":\"Hibernate\",\"peakMinutesToWaitOnDisconnect\":543218524,\"peakActionOnLogoff\":\"Hibernate\",\"peakMinutesToWaitOnLogoff\":150528067,\"rampDownStartTime\":{\"hour\":20952661,\"minute\":1138832682},\"rampDownStartVMOnConnect\":\"Enable\",\"rampDownActionOnDisconnect\":\"None\",\"rampDownMinutesToWaitOnDisconnect\":996292120,\"rampDownActionOnLogoff\":\"None\",\"rampDownMinutesToWaitOnLogoff\":988577798,\"offPeakStartTime\":{\"hour\":290904524,\"minute\":1604128038},\"offPeakStartVMOnConnect\":\"Enable\",\"offPeakActionOnDisconnect\":\"Hibernate\",\"offPeakMinutesToWaitOnDisconnect\":709462942,\"offPeakActionOnLogoff\":\"None\",\"offPeakMinutesToWaitOnLogoff\":1900039321},\"id\":\"rqctmxxdtdd\",\"name\":\"flhuytxzv\",\"type\":\"zna\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .scalingPlanPersonalSchedules() - .list("kfuarenlv", "htkln", 1009916095, false, 672713653, com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DayOfWeek.SATURDAY, response.iterator().next().daysOfWeek().get(0)); - Assertions.assertEquals(1124530948, response.iterator().next().rampUpStartTime().hour()); - Assertions.assertEquals(499319607, response.iterator().next().rampUpStartTime().minute()); - Assertions.assertEquals(StartupBehavior.NONE, response.iterator().next().rampUpAutoStartHosts()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.iterator().next().rampUpStartVMOnConnect()); - Assertions - .assertEquals(SessionHandlingOperation.DEALLOCATE, response.iterator().next().rampUpActionOnDisconnect()); - Assertions.assertEquals(1014248956, response.iterator().next().rampUpMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.DEALLOCATE, response.iterator().next().rampUpActionOnLogoff()); - Assertions.assertEquals(1964077679, response.iterator().next().rampUpMinutesToWaitOnLogoff()); - Assertions.assertEquals(325210544, response.iterator().next().peakStartTime().hour()); - Assertions.assertEquals(2124129380, response.iterator().next().peakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.DISABLE, response.iterator().next().peakStartVMOnConnect()); - Assertions - .assertEquals(SessionHandlingOperation.HIBERNATE, response.iterator().next().peakActionOnDisconnect()); - Assertions.assertEquals(543218524, response.iterator().next().peakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.HIBERNATE, response.iterator().next().peakActionOnLogoff()); - Assertions.assertEquals(150528067, response.iterator().next().peakMinutesToWaitOnLogoff()); - Assertions.assertEquals(20952661, response.iterator().next().rampDownStartTime().hour()); - Assertions.assertEquals(1138832682, response.iterator().next().rampDownStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.iterator().next().rampDownStartVMOnConnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, response.iterator().next().rampDownActionOnDisconnect()); - Assertions.assertEquals(996292120, response.iterator().next().rampDownMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, response.iterator().next().rampDownActionOnLogoff()); - Assertions.assertEquals(988577798, response.iterator().next().rampDownMinutesToWaitOnLogoff()); - Assertions.assertEquals(290904524, response.iterator().next().offPeakStartTime().hour()); - Assertions.assertEquals(1604128038, response.iterator().next().offPeakStartTime().minute()); - Assertions.assertEquals(SetStartVMOnConnect.ENABLE, response.iterator().next().offPeakStartVMOnConnect()); - Assertions - .assertEquals(SessionHandlingOperation.HIBERNATE, response.iterator().next().offPeakActionOnDisconnect()); - Assertions.assertEquals(709462942, response.iterator().next().offPeakMinutesToWaitOnDisconnect()); - Assertions.assertEquals(SessionHandlingOperation.NONE, response.iterator().next().offPeakActionOnLogoff()); - Assertions.assertEquals(1900039321, response.iterator().next().offPeakMinutesToWaitOnLogoff()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java deleted file mode 100644 index b6faeacb1666..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleInnerTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPooledScheduleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPooledScheduleInner model = - BinaryData - .fromString( - "{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":1990735678,\"minute\":876126569},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":138354171,\"rampUpCapacityThresholdPct\":1131914831,\"peakStartTime\":{\"hour\":1267034334,\"minute\":872540735},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":284483918,\"minute\":31023932},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1662245915,\"rampDownCapacityThresholdPct\":1149825898,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":990417532,\"rampDownNotificationMessage\":\"pjmkhfxobbc\",\"offPeakStartTime\":{\"hour\":198742016,\"minute\":1117876876},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"riplrbpbewtg\",\"name\":\"fgb\",\"type\":\"c\"}") - .toObject(ScalingPlanPooledScheduleInner.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(1990735678, model.rampUpStartTime().hour()); - Assertions.assertEquals(876126569, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(138354171, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(1131914831, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1267034334, model.peakStartTime().hour()); - Assertions.assertEquals(872540735, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(284483918, model.rampDownStartTime().hour()); - Assertions.assertEquals(31023932, model.rampDownStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1662245915, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1149825898, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(990417532, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("pjmkhfxobbc", model.rampDownNotificationMessage()); - Assertions.assertEquals(198742016, model.offPeakStartTime().hour()); - Assertions.assertEquals(1117876876, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPooledScheduleInner model = - new ScalingPlanPooledScheduleInner() - .withDaysOfWeek(Arrays.asList(DayOfWeek.WEDNESDAY, DayOfWeek.TUESDAY)) - .withRampUpStartTime(new Time().withHour(1990735678).withMinute(876126569)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(138354171) - .withRampUpCapacityThresholdPct(1131914831) - .withPeakStartTime(new Time().withHour(1267034334).withMinute(872540735)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(284483918).withMinute(31023932)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(1662245915) - .withRampDownCapacityThresholdPct(1149825898) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(990417532) - .withRampDownNotificationMessage("pjmkhfxobbc") - .withOffPeakStartTime(new Time().withHour(198742016).withMinute(1117876876)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST); - model = BinaryData.fromObject(model).toObject(ScalingPlanPooledScheduleInner.class); - Assertions.assertEquals(DayOfWeek.WEDNESDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(1990735678, model.rampUpStartTime().hour()); - Assertions.assertEquals(876126569, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(138354171, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(1131914831, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1267034334, model.peakStartTime().hour()); - Assertions.assertEquals(872540735, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(284483918, model.rampDownStartTime().hour()); - Assertions.assertEquals(31023932, model.rampDownStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1662245915, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1149825898, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(990417532, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("pjmkhfxobbc", model.rampDownNotificationMessage()); - Assertions.assertEquals(198742016, model.offPeakStartTime().hour()); - Assertions.assertEquals(1117876876, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java deleted file mode 100644 index d748fc4e1ed8..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledScheduleListTests.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleInner; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledScheduleList; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPooledScheduleListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPooledScheduleList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Saturday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":141640204,\"minute\":256612038},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1243580735,\"rampUpCapacityThresholdPct\":1207917179,\"peakStartTime\":{\"hour\":1413734297,\"minute\":1151827085},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":413444138,\"minute\":1967682720},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":693329650,\"rampDownCapacityThresholdPct\":1596436522,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":2073757128,\"rampDownNotificationMessage\":\"uthnnprnxipeilpj\",\"offPeakStartTime\":{\"hour\":1074564233,\"minute\":115468496},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"dultskz\",\"name\":\"btdzumveekg\",\"type\":\"wozuhkf\"},{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\",\"Wednesday\",\"Tuesday\"],\"rampUpStartTime\":{\"hour\":568244971,\"minute\":519560547},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1856979158,\"rampUpCapacityThresholdPct\":1422945070,\"peakStartTime\":{\"hour\":1252528512,\"minute\":1713449860},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":2116291824,\"minute\":2085364549},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":628545796,\"rampDownCapacityThresholdPct\":643648278,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1393240700,\"rampDownNotificationMessage\":\"sflhhca\",\"offPeakStartTime\":{\"hour\":131354519,\"minute\":2013755278},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"isxyawjoyaqcslyj\",\"name\":\"kiidzyex\",\"type\":\"nelixhnrztfo\"}],\"nextLink\":\"bnxknalaulppg\"}") - .toObject(ScalingPlanPooledScheduleList.class); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.value().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(141640204, model.value().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(256612038, model.value().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1243580735, model.value().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1207917179, model.value().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1413734297, model.value().get(0).peakStartTime().hour()); - Assertions.assertEquals(1151827085, model.value().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(413444138, model.value().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(1967682720, model.value().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(693329650, model.value().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1596436522, model.value().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.value().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.value().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(2073757128, model.value().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("uthnnprnxipeilpj", model.value().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1074564233, model.value().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(115468496, model.value().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).offPeakLoadBalancingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPooledScheduleList model = - new ScalingPlanPooledScheduleList() - .withValue( - Arrays - .asList( - new ScalingPlanPooledScheduleInner() - .withDaysOfWeek(Arrays.asList(DayOfWeek.SATURDAY, DayOfWeek.THURSDAY)) - .withRampUpStartTime(new Time().withHour(141640204).withMinute(256612038)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1243580735) - .withRampUpCapacityThresholdPct(1207917179) - .withPeakStartTime(new Time().withHour(1413734297).withMinute(1151827085)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(413444138).withMinute(1967682720)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(693329650) - .withRampDownCapacityThresholdPct(1596436522) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(2073757128) - .withRampDownNotificationMessage("uthnnprnxipeilpj") - .withOffPeakStartTime(new Time().withHour(1074564233).withMinute(115468496)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingPlanPooledScheduleInner() - .withDaysOfWeek( - Arrays - .asList( - DayOfWeek.WEDNESDAY, - DayOfWeek.TUESDAY, - DayOfWeek.WEDNESDAY, - DayOfWeek.TUESDAY)) - .withRampUpStartTime(new Time().withHour(568244971).withMinute(519560547)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(1856979158) - .withRampUpCapacityThresholdPct(1422945070) - .withPeakStartTime(new Time().withHour(1252528512).withMinute(1713449860)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(2116291824).withMinute(2085364549)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(628545796) - .withRampDownCapacityThresholdPct(643648278) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1393240700) - .withRampDownNotificationMessage("sflhhca") - .withOffPeakStartTime(new Time().withHour(131354519).withMinute(2013755278)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST))); - model = BinaryData.fromObject(model).toObject(ScalingPlanPooledScheduleList.class); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.value().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(141640204, model.value().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(256612038, model.value().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1243580735, model.value().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(1207917179, model.value().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1413734297, model.value().get(0).peakStartTime().hour()); - Assertions.assertEquals(1151827085, model.value().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(413444138, model.value().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(1967682720, model.value().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.value().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(693329650, model.value().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1596436522, model.value().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.value().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.value().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(2073757128, model.value().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("uthnnprnxipeilpj", model.value().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(1074564233, model.value().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(115468496, model.value().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.value().get(0).offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java deleted file mode 100644 index b57bbe5f73b8..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePatchTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedulePatch; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPooledSchedulePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPooledSchedulePatch model = - BinaryData - .fromString( - "{\"properties\":{\"daysOfWeek\":[\"Saturday\"],\"rampUpStartTime\":{\"hour\":391776168,\"minute\":2086388671},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":2051758056,\"rampUpCapacityThresholdPct\":1378087535,\"peakStartTime\":{\"hour\":439169956,\"minute\":1264115895},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":92762624,\"minute\":63686383},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1220568259,\"rampDownCapacityThresholdPct\":810124654,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":2067966148,\"rampDownNotificationMessage\":\"rwmdyvxqtay\",\"offPeakStartTime\":{\"hour\":357638492,\"minute\":1013122573},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"yqbexrmcqibycno\",\"name\":\"v\",\"type\":\"nmefqsgzvahapj\"}") - .toObject(ScalingPlanPooledSchedulePatch.class); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(391776168, model.rampUpStartTime().hour()); - Assertions.assertEquals(2086388671, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(2051758056, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(1378087535, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(439169956, model.peakStartTime().hour()); - Assertions.assertEquals(1264115895, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(92762624, model.rampDownStartTime().hour()); - Assertions.assertEquals(63686383, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1220568259, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(810124654, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(2067966148, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("rwmdyvxqtay", model.rampDownNotificationMessage()); - Assertions.assertEquals(357638492, model.offPeakStartTime().hour()); - Assertions.assertEquals(1013122573, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPooledSchedulePatch model = - new ScalingPlanPooledSchedulePatch() - .withDaysOfWeek(Arrays.asList(DayOfWeek.SATURDAY)) - .withRampUpStartTime(new Time().withHour(391776168).withMinute(2086388671)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(2051758056) - .withRampUpCapacityThresholdPct(1378087535) - .withPeakStartTime(new Time().withHour(439169956).withMinute(1264115895)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(92762624).withMinute(63686383)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1220568259) - .withRampDownCapacityThresholdPct(810124654) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(2067966148) - .withRampDownNotificationMessage("rwmdyvxqtay") - .withOffPeakStartTime(new Time().withHour(357638492).withMinute(1013122573)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST); - model = BinaryData.fromObject(model).toObject(ScalingPlanPooledSchedulePatch.class); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(391776168, model.rampUpStartTime().hour()); - Assertions.assertEquals(2086388671, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(2051758056, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(1378087535, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(439169956, model.peakStartTime().hour()); - Assertions.assertEquals(1264115895, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(92762624, model.rampDownStartTime().hour()); - Assertions.assertEquals(63686383, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1220568259, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(810124654, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(2067966148, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("rwmdyvxqtay", model.rampDownNotificationMessage()); - Assertions.assertEquals(357638492, model.offPeakStartTime().hour()); - Assertions.assertEquals(1013122573, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java deleted file mode 100644 index 351569ba4904..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulePropertiesTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanPooledScheduleProperties; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPooledSchedulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanPooledScheduleProperties model = - BinaryData - .fromString( - "{\"daysOfWeek\":[\"Sunday\",\"Sunday\",\"Wednesday\",\"Friday\"],\"rampUpStartTime\":{\"hour\":1837116433,\"minute\":2103137599},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1432172672,\"rampUpCapacityThresholdPct\":795071177,\"peakStartTime\":{\"hour\":1806292295,\"minute\":1451066007},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":1742737473,\"minute\":1258750458},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1232796575,\"rampDownCapacityThresholdPct\":1519275761,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1428727987,\"rampDownNotificationMessage\":\"j\",\"offPeakStartTime\":{\"hour\":1115460475,\"minute\":47396428},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}") - .toObject(ScalingPlanPooledScheduleProperties.class); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(1837116433, model.rampUpStartTime().hour()); - Assertions.assertEquals(2103137599, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1432172672, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(795071177, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1806292295, model.peakStartTime().hour()); - Assertions.assertEquals(1451066007, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1742737473, model.rampDownStartTime().hour()); - Assertions.assertEquals(1258750458, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1232796575, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1519275761, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(1428727987, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("j", model.rampDownNotificationMessage()); - Assertions.assertEquals(1115460475, model.offPeakStartTime().hour()); - Assertions.assertEquals(47396428, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanPooledScheduleProperties model = - new ScalingPlanPooledScheduleProperties() - .withDaysOfWeek( - Arrays.asList(DayOfWeek.SUNDAY, DayOfWeek.SUNDAY, DayOfWeek.WEDNESDAY, DayOfWeek.FRIDAY)) - .withRampUpStartTime(new Time().withHour(1837116433).withMinute(2103137599)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1432172672) - .withRampUpCapacityThresholdPct(795071177) - .withPeakStartTime(new Time().withHour(1806292295).withMinute(1451066007)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(1742737473).withMinute(1258750458)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1232796575) - .withRampDownCapacityThresholdPct(1519275761) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(1428727987) - .withRampDownNotificationMessage("j") - .withOffPeakStartTime(new Time().withHour(1115460475).withMinute(47396428)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST); - model = BinaryData.fromObject(model).toObject(ScalingPlanPooledScheduleProperties.class); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(1837116433, model.rampUpStartTime().hour()); - Assertions.assertEquals(2103137599, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1432172672, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(795071177, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1806292295, model.peakStartTime().hour()); - Assertions.assertEquals(1451066007, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1742737473, model.rampDownStartTime().hour()); - Assertions.assertEquals(1258750458, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1232796575, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(1519275761, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(1428727987, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("j", model.rampDownNotificationMessage()); - Assertions.assertEquals(1115460475, model.offPeakStartTime().hour()); - Assertions.assertEquals(47396428, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java deleted file mode 100644 index 6bbca30e8f37..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateWithResponseMockTests.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPooledSchedulesCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"daysOfWeek\":[\"Monday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":1533653283,\"minute\":1984178161},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":830964876,\"rampUpCapacityThresholdPct\":1152619521,\"peakStartTime\":{\"hour\":1614916869,\"minute\":1479987429},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":915914475,\"minute\":875433562},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":817459269,\"rampDownCapacityThresholdPct\":449882255,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":689120218,\"rampDownNotificationMessage\":\"rsxypruuu\",\"offPeakStartTime\":{\"hour\":694984034,\"minute\":1409089319},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},\"id\":\"szizoyuelyetndnb\",\"name\":\"qyggagfl\",\"type\":\"lgmtrwahzjmucf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScalingPlanPooledSchedule response = - manager - .scalingPlanPooledSchedules() - .define("n") - .withExistingScalingPlan("wkffdjkt", "ysidfvclgl") - .withDaysOfWeek( - Arrays.asList(DayOfWeek.MONDAY, DayOfWeek.SATURDAY, DayOfWeek.THURSDAY, DayOfWeek.TUESDAY)) - .withRampUpStartTime(new Time().withHour(1043687593).withMinute(939102144)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(1112160542) - .withRampUpCapacityThresholdPct(1510144840) - .withPeakStartTime(new Time().withHour(869245621).withMinute(1717573357)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(1168191195).withMinute(1139641337)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownMinimumHostsPct(312700114) - .withRampDownCapacityThresholdPct(972711473) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(846546082) - .withRampDownNotificationMessage("tvwkpqhjpenu") - .withOffPeakStartTime(new Time().withHour(1710915481).withMinute(1781943414)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .create(); - - Assertions.assertEquals(DayOfWeek.MONDAY, response.daysOfWeek().get(0)); - Assertions.assertEquals(1533653283, response.rampUpStartTime().hour()); - Assertions.assertEquals(1984178161, response.rampUpStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(830964876, response.rampUpMinimumHostsPct()); - Assertions.assertEquals(1152619521, response.rampUpCapacityThresholdPct()); - Assertions.assertEquals(1614916869, response.peakStartTime().hour()); - Assertions.assertEquals(1479987429, response.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(915914475, response.rampDownStartTime().hour()); - Assertions.assertEquals(875433562, response.rampDownStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(817459269, response.rampDownMinimumHostsPct()); - Assertions.assertEquals(449882255, response.rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, response.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, response.rampDownStopHostsWhen()); - Assertions.assertEquals(689120218, response.rampDownWaitTimeMinutes()); - Assertions.assertEquals("rsxypruuu", response.rampDownNotificationMessage()); - Assertions.assertEquals(694984034, response.offPeakStartTime().hour()); - Assertions.assertEquals(1409089319, response.offPeakStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java deleted file mode 100644 index 5f6819bded3a..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPooledSchedulesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .scalingPlanPooledSchedules() - .deleteWithResponse("qzeqyjleziunjxdf", "antkwcegyamlbns", "qa", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java deleted file mode 100644 index 7b7cf668e24b..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPooledSchedulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"daysOfWeek\":[\"Wednesday\",\"Tuesday\",\"Tuesday\",\"Sunday\"],\"rampUpStartTime\":{\"hour\":808082616,\"minute\":146690608},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":1751850154,\"rampUpCapacityThresholdPct\":612007503,\"peakStartTime\":{\"hour\":2085427407,\"minute\":928121621},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":844035132,\"minute\":1145439736},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1395211030,\"rampDownCapacityThresholdPct\":97372344,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":1945298143,\"rampDownNotificationMessage\":\"gtdysnaqu\",\"offPeakStartTime\":{\"hour\":1842048438,\"minute\":1011075581},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"q\",\"name\":\"amz\",\"type\":\"rwd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ScalingPlanPooledSchedule response = - manager - .scalingPlanPooledSchedules() - .getWithResponse("wnjlxu", "rhwpus", "jbaqehgpdoh", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DayOfWeek.WEDNESDAY, response.daysOfWeek().get(0)); - Assertions.assertEquals(808082616, response.rampUpStartTime().hour()); - Assertions.assertEquals(146690608, response.rampUpStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1751850154, response.rampUpMinimumHostsPct()); - Assertions.assertEquals(612007503, response.rampUpCapacityThresholdPct()); - Assertions.assertEquals(2085427407, response.peakStartTime().hour()); - Assertions.assertEquals(928121621, response.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(844035132, response.rampDownStartTime().hour()); - Assertions.assertEquals(1145439736, response.rampDownStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, response.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1395211030, response.rampDownMinimumHostsPct()); - Assertions.assertEquals(97372344, response.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, response.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, response.rampDownStopHostsWhen()); - Assertions.assertEquals(1945298143, response.rampDownWaitTimeMinutes()); - Assertions.assertEquals("gtdysnaqu", response.rampDownNotificationMessage()); - Assertions.assertEquals(1842048438, response.offPeakStartTime().hour()); - Assertions.assertEquals(1011075581, response.offPeakStartTime().minute()); - Assertions - .assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, response.offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java deleted file mode 100644 index 7d660e00180e..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListMockTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.DayOfWeek; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlanPooledSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlanPooledSchedulesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"daysOfWeek\":[\"Sunday\",\"Thursday\",\"Thursday\"],\"rampUpStartTime\":{\"hour\":1749280590,\"minute\":720786123},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":1489010807,\"rampUpCapacityThresholdPct\":1872407270,\"peakStartTime\":{\"hour\":807818343,\"minute\":468087914},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1329198912,\"minute\":1292218152},\"rampDownLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownMinimumHostsPct\":1596109972,\"rampDownCapacityThresholdPct\":148028664,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":41278512,\"rampDownNotificationMessage\":\"cjkgdirazftxej\",\"offPeakStartTime\":{\"hour\":1368771016,\"minute\":1529285659},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},\"id\":\"jtmvc\",\"name\":\"pexcmjurbuhh\",\"type\":\"kyqltqsrogt\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .scalingPlanPooledSchedules() - .list("jjvpilguooqja", "m", 1068210919, false, 1892935943, com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DayOfWeek.SUNDAY, response.iterator().next().daysOfWeek().get(0)); - Assertions.assertEquals(1749280590, response.iterator().next().rampUpStartTime().hour()); - Assertions.assertEquals(720786123, response.iterator().next().rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - response.iterator().next().rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(1489010807, response.iterator().next().rampUpMinimumHostsPct()); - Assertions.assertEquals(1872407270, response.iterator().next().rampUpCapacityThresholdPct()); - Assertions.assertEquals(807818343, response.iterator().next().peakStartTime().hour()); - Assertions.assertEquals(468087914, response.iterator().next().peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - response.iterator().next().peakLoadBalancingAlgorithm()); - Assertions.assertEquals(1329198912, response.iterator().next().rampDownStartTime().hour()); - Assertions.assertEquals(1292218152, response.iterator().next().rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - response.iterator().next().rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1596109972, response.iterator().next().rampDownMinimumHostsPct()); - Assertions.assertEquals(148028664, response.iterator().next().rampDownCapacityThresholdPct()); - Assertions.assertEquals(false, response.iterator().next().rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_SESSIONS, response.iterator().next().rampDownStopHostsWhen()); - Assertions.assertEquals(41278512, response.iterator().next().rampDownWaitTimeMinutes()); - Assertions.assertEquals("cjkgdirazftxej", response.iterator().next().rampDownNotificationMessage()); - Assertions.assertEquals(1368771016, response.iterator().next().offPeakStartTime().hour()); - Assertions.assertEquals(1529285659, response.iterator().next().offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - response.iterator().next().offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java deleted file mode 100644 index 75dca3835473..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPropertiesTests.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.ScalingPlanProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolType; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingScheduleDaysOfWeekItem; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingPlanPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingPlanProperties model = - BinaryData - .fromString( - "{\"objectId\":\"aos\",\"description\":\"xc\",\"friendlyName\":\"npc\",\"timeZone\":\"hocohslkev\",\"hostPoolType\":\"Pooled\",\"exclusionTag\":\"zfbuhf\",\"schedules\":[{\"name\":\"x\",\"daysOfWeek\":[\"Sunday\",\"Saturday\",\"Wednesday\"],\"rampUpStartTime\":{\"hour\":378191098,\"minute\":1914432251},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":511745945,\"rampUpCapacityThresholdPct\":72720177,\"peakStartTime\":{\"hour\":1090911341,\"minute\":516508763},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":2099560460,\"minute\":63743502},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":852408036,\"rampDownCapacityThresholdPct\":1533389693,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":849896725,\"rampDownNotificationMessage\":\"jx\",\"offPeakStartTime\":{\"hour\":2030028307,\"minute\":953955678},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"},{\"name\":\"ptkoenkoukn\",\"daysOfWeek\":[\"Monday\",\"Saturday\",\"Thursday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":133898645,\"minute\":45967354},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":969530861,\"rampUpCapacityThresholdPct\":626726522,\"peakStartTime\":{\"hour\":1997522468,\"minute\":655680628},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":1866473569,\"minute\":212177726},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":862594448,\"rampDownCapacityThresholdPct\":157234884,\"rampDownForceLogoffUsers\":false,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":1142457061,\"rampDownNotificationMessage\":\"gevqznty\",\"offPeakStartTime\":{\"hour\":1534766868,\"minute\":1785806943},\"offPeakLoadBalancingAlgorithm\":\"DepthFirst\"},{\"name\":\"c\",\"daysOfWeek\":[\"Tuesday\",\"Wednesday\",\"Friday\",\"Friday\"],\"rampUpStartTime\":{\"hour\":2075884745,\"minute\":1295210131},\"rampUpLoadBalancingAlgorithm\":\"DepthFirst\",\"rampUpMinimumHostsPct\":229483686,\"rampUpCapacityThresholdPct\":1665159346,\"peakStartTime\":{\"hour\":856772857,\"minute\":403055260},\"peakLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownStartTime\":{\"hour\":170373532,\"minute\":1718564660},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1909902819,\"rampDownCapacityThresholdPct\":362966046,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroSessions\",\"rampDownWaitTimeMinutes\":22083476,\"rampDownNotificationMessage\":\"bkh\",\"offPeakStartTime\":{\"hour\":2127806039,\"minute\":1192393079},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}],\"hostPoolReferences\":[{\"hostPoolArmPath\":\"p\",\"scalingPlanEnabled\":false}]}") - .toObject(ScalingPlanProperties.class); - Assertions.assertEquals("xc", model.description()); - Assertions.assertEquals("npc", model.friendlyName()); - Assertions.assertEquals("hocohslkev", model.timeZone()); - Assertions.assertEquals(ScalingHostPoolType.POOLED, model.hostPoolType()); - Assertions.assertEquals("zfbuhf", model.exclusionTag()); - Assertions.assertEquals("x", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SUNDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(378191098, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(1914432251, model.schedules().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(511745945, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(72720177, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1090911341, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(516508763, model.schedules().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(2099560460, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(63743502, model.schedules().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(852408036, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1533389693, model.schedules().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(849896725, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("jx", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(2030028307, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(953955678, model.schedules().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("p", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingPlanProperties model = - new ScalingPlanProperties() - .withDescription("xc") - .withFriendlyName("npc") - .withTimeZone("hocohslkev") - .withHostPoolType(ScalingHostPoolType.POOLED) - .withExclusionTag("zfbuhf") - .withSchedules( - Arrays - .asList( - new ScalingSchedule() - .withName("x") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.SUNDAY, - ScalingScheduleDaysOfWeekItem.SATURDAY, - ScalingScheduleDaysOfWeekItem.WEDNESDAY)) - .withRampUpStartTime(new Time().withHour(378191098).withMinute(1914432251)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(511745945) - .withRampUpCapacityThresholdPct(72720177) - .withPeakStartTime(new Time().withHour(1090911341).withMinute(516508763)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(2099560460).withMinute(63743502)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(852408036) - .withRampDownCapacityThresholdPct(1533389693) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(849896725) - .withRampDownNotificationMessage("jx") - .withOffPeakStartTime(new Time().withHour(2030028307).withMinute(953955678)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST), - new ScalingSchedule() - .withName("ptkoenkoukn") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.MONDAY, - ScalingScheduleDaysOfWeekItem.SATURDAY, - ScalingScheduleDaysOfWeekItem.THURSDAY, - ScalingScheduleDaysOfWeekItem.SATURDAY)) - .withRampUpStartTime(new Time().withHour(133898645).withMinute(45967354)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(969530861) - .withRampUpCapacityThresholdPct(626726522) - .withPeakStartTime(new Time().withHour(1997522468).withMinute(655680628)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(1866473569).withMinute(212177726)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(862594448) - .withRampDownCapacityThresholdPct(157234884) - .withRampDownForceLogoffUsers(false) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(1142457061) - .withRampDownNotificationMessage("gevqznty") - .withOffPeakStartTime(new Time().withHour(1534766868).withMinute(1785806943)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST), - new ScalingSchedule() - .withName("c") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.WEDNESDAY, - ScalingScheduleDaysOfWeekItem.FRIDAY, - ScalingScheduleDaysOfWeekItem.FRIDAY)) - .withRampUpStartTime(new Time().withHour(2075884745).withMinute(1295210131)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampUpMinimumHostsPct(229483686) - .withRampUpCapacityThresholdPct(1665159346) - .withPeakStartTime(new Time().withHour(856772857).withMinute(403055260)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownStartTime(new Time().withHour(170373532).withMinute(1718564660)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1909902819) - .withRampDownCapacityThresholdPct(362966046) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_SESSIONS) - .withRampDownWaitTimeMinutes(22083476) - .withRampDownNotificationMessage("bkh") - .withOffPeakStartTime(new Time().withHour(2127806039).withMinute(1192393079)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST))) - .withHostPoolReferences( - Arrays - .asList(new ScalingHostPoolReference().withHostPoolArmPath("p").withScalingPlanEnabled(false))); - model = BinaryData.fromObject(model).toObject(ScalingPlanProperties.class); - Assertions.assertEquals("xc", model.description()); - Assertions.assertEquals("npc", model.friendlyName()); - Assertions.assertEquals("hocohslkev", model.timeZone()); - Assertions.assertEquals(ScalingHostPoolType.POOLED, model.hostPoolType()); - Assertions.assertEquals("zfbuhf", model.exclusionTag()); - Assertions.assertEquals("x", model.schedules().get(0).name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SUNDAY, model.schedules().get(0).daysOfWeek().get(0)); - Assertions.assertEquals(378191098, model.schedules().get(0).rampUpStartTime().hour()); - Assertions.assertEquals(1914432251, model.schedules().get(0).rampUpStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(511745945, model.schedules().get(0).rampUpMinimumHostsPct()); - Assertions.assertEquals(72720177, model.schedules().get(0).rampUpCapacityThresholdPct()); - Assertions.assertEquals(1090911341, model.schedules().get(0).peakStartTime().hour()); - Assertions.assertEquals(516508763, model.schedules().get(0).peakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.schedules().get(0).peakLoadBalancingAlgorithm()); - Assertions.assertEquals(2099560460, model.schedules().get(0).rampDownStartTime().hour()); - Assertions.assertEquals(63743502, model.schedules().get(0).rampDownStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, - model.schedules().get(0).rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(852408036, model.schedules().get(0).rampDownMinimumHostsPct()); - Assertions.assertEquals(1533389693, model.schedules().get(0).rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.schedules().get(0).rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.schedules().get(0).rampDownStopHostsWhen()); - Assertions.assertEquals(849896725, model.schedules().get(0).rampDownWaitTimeMinutes()); - Assertions.assertEquals("jx", model.schedules().get(0).rampDownNotificationMessage()); - Assertions.assertEquals(2030028307, model.schedules().get(0).offPeakStartTime().hour()); - Assertions.assertEquals(953955678, model.schedules().get(0).offPeakStartTime().minute()); - Assertions - .assertEquals( - SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, - model.schedules().get(0).offPeakLoadBalancingAlgorithm()); - Assertions.assertEquals("p", model.hostPoolReferences().get(0).hostPoolArmPath()); - Assertions.assertEquals(false, model.hostPoolReferences().get(0).scalingPlanEnabled()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index b749591d05a6..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScalingPlansDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .scalingPlans() - .deleteByResourceGroupWithResponse("tcmwqkchc", "waxfewzjkj", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java deleted file mode 100644 index de1c5dd0a678..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingScheduleTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingSchedule; -import com.azure.resourcemanager.desktopvirtualization.models.ScalingScheduleDaysOfWeekItem; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostLoadBalancingAlgorithm; -import com.azure.resourcemanager.desktopvirtualization.models.StopHostsWhen; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScalingScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingSchedule model = - BinaryData - .fromString( - "{\"name\":\"lpbuxwgipwhonowk\",\"daysOfWeek\":[\"Saturday\",\"Wednesday\",\"Tuesday\",\"Saturday\"],\"rampUpStartTime\":{\"hour\":691407592,\"minute\":583460875},\"rampUpLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampUpMinimumHostsPct\":624724935,\"rampUpCapacityThresholdPct\":491108548,\"peakStartTime\":{\"hour\":895884461,\"minute\":1086025239},\"peakLoadBalancingAlgorithm\":\"BreadthFirst\",\"rampDownStartTime\":{\"hour\":2061883120,\"minute\":998969185},\"rampDownLoadBalancingAlgorithm\":\"DepthFirst\",\"rampDownMinimumHostsPct\":1117331465,\"rampDownCapacityThresholdPct\":591392190,\"rampDownForceLogoffUsers\":true,\"rampDownStopHostsWhen\":\"ZeroActiveSessions\",\"rampDownWaitTimeMinutes\":130500015,\"rampDownNotificationMessage\":\"cqvyxlwhzlsico\",\"offPeakStartTime\":{\"hour\":774640076,\"minute\":1969001145},\"offPeakLoadBalancingAlgorithm\":\"BreadthFirst\"}") - .toObject(ScalingSchedule.class); - Assertions.assertEquals("lpbuxwgipwhonowk", model.name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SATURDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(691407592, model.rampUpStartTime().hour()); - Assertions.assertEquals(583460875, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(624724935, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(491108548, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(895884461, model.peakStartTime().hour()); - Assertions.assertEquals(1086025239, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(2061883120, model.rampDownStartTime().hour()); - Assertions.assertEquals(998969185, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1117331465, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(591392190, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(130500015, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("cqvyxlwhzlsico", model.rampDownNotificationMessage()); - Assertions.assertEquals(774640076, model.offPeakStartTime().hour()); - Assertions.assertEquals(1969001145, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingSchedule model = - new ScalingSchedule() - .withName("lpbuxwgipwhonowk") - .withDaysOfWeek( - Arrays - .asList( - ScalingScheduleDaysOfWeekItem.SATURDAY, - ScalingScheduleDaysOfWeekItem.WEDNESDAY, - ScalingScheduleDaysOfWeekItem.TUESDAY, - ScalingScheduleDaysOfWeekItem.SATURDAY)) - .withRampUpStartTime(new Time().withHour(691407592).withMinute(583460875)) - .withRampUpLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampUpMinimumHostsPct(624724935) - .withRampUpCapacityThresholdPct(491108548) - .withPeakStartTime(new Time().withHour(895884461).withMinute(1086025239)) - .withPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST) - .withRampDownStartTime(new Time().withHour(2061883120).withMinute(998969185)) - .withRampDownLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST) - .withRampDownMinimumHostsPct(1117331465) - .withRampDownCapacityThresholdPct(591392190) - .withRampDownForceLogoffUsers(true) - .withRampDownStopHostsWhen(StopHostsWhen.ZERO_ACTIVE_SESSIONS) - .withRampDownWaitTimeMinutes(130500015) - .withRampDownNotificationMessage("cqvyxlwhzlsico") - .withOffPeakStartTime(new Time().withHour(774640076).withMinute(1969001145)) - .withOffPeakLoadBalancingAlgorithm(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST); - model = BinaryData.fromObject(model).toObject(ScalingSchedule.class); - Assertions.assertEquals("lpbuxwgipwhonowk", model.name()); - Assertions.assertEquals(ScalingScheduleDaysOfWeekItem.SATURDAY, model.daysOfWeek().get(0)); - Assertions.assertEquals(691407592, model.rampUpStartTime().hour()); - Assertions.assertEquals(583460875, model.rampUpStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.rampUpLoadBalancingAlgorithm()); - Assertions.assertEquals(624724935, model.rampUpMinimumHostsPct()); - Assertions.assertEquals(491108548, model.rampUpCapacityThresholdPct()); - Assertions.assertEquals(895884461, model.peakStartTime().hour()); - Assertions.assertEquals(1086025239, model.peakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.peakLoadBalancingAlgorithm()); - Assertions.assertEquals(2061883120, model.rampDownStartTime().hour()); - Assertions.assertEquals(998969185, model.rampDownStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.DEPTH_FIRST, model.rampDownLoadBalancingAlgorithm()); - Assertions.assertEquals(1117331465, model.rampDownMinimumHostsPct()); - Assertions.assertEquals(591392190, model.rampDownCapacityThresholdPct()); - Assertions.assertEquals(true, model.rampDownForceLogoffUsers()); - Assertions.assertEquals(StopHostsWhen.ZERO_ACTIVE_SESSIONS, model.rampDownStopHostsWhen()); - Assertions.assertEquals(130500015, model.rampDownWaitTimeMinutes()); - Assertions.assertEquals("cqvyxlwhzlsico", model.rampDownNotificationMessage()); - Assertions.assertEquals(774640076, model.offPeakStartTime().hour()); - Assertions.assertEquals(1969001145, model.offPeakStartTime().minute()); - Assertions.assertEquals(SessionHostLoadBalancingAlgorithm.BREADTH_FIRST, model.offPeakLoadBalancingAlgorithm()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java deleted file mode 100644 index 4a566097fd95..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SendMessageTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; -import org.junit.jupiter.api.Assertions; - -public final class SendMessageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SendMessage model = - BinaryData - .fromString("{\"messageTitle\":\"srdvetn\",\"messageBody\":\"dtutnwldu\"}") - .toObject(SendMessage.class); - Assertions.assertEquals("srdvetn", model.messageTitle()); - Assertions.assertEquals("dtutnwldu", model.messageBody()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SendMessage model = new SendMessage().withMessageTitle("srdvetn").withMessageBody("dtutnwldu"); - model = BinaryData.fromObject(model).toObject(SendMessage.class); - Assertions.assertEquals("srdvetn", model.messageTitle()); - Assertions.assertEquals("dtutnwldu", model.messageBody()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java deleted file mode 100644 index dd24493b8611..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.LogSpecification; -import com.azure.resourcemanager.desktopvirtualization.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = - BinaryData - .fromString( - "{\"logSpecifications\":[{\"name\":\"qniwbybrkxvdumj\",\"displayName\":\"tfwvukxgaudc\",\"blobDuration\":\"nhsjcnyej\"}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("qniwbybrkxvdumj", model.logSpecifications().get(0).name()); - Assertions.assertEquals("tfwvukxgaudc", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("nhsjcnyej", model.logSpecifications().get(0).blobDuration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = - new ServiceSpecification() - .withLogSpecifications( - Arrays - .asList( - new LogSpecification() - .withName("qniwbybrkxvdumj") - .withDisplayName("tfwvukxgaudc") - .withBlobDuration("nhsjcnyej"))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("qniwbybrkxvdumj", model.logSpecifications().get(0).name()); - Assertions.assertEquals("tfwvukxgaudc", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("nhsjcnyej", model.logSpecifications().get(0).blobDuration()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java deleted file mode 100644 index a077bd4d6d2b..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostListTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostInner; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostList; -import com.azure.resourcemanager.desktopvirtualization.models.Status; -import com.azure.resourcemanager.desktopvirtualization.models.UpdateState; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SessionHostListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionHostList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"ygvjayvblmh\",\"lastHeartBeat\":\"2021-07-26T11:14:50Z\",\"sessions\":2100624724,\"agentVersion\":\"xvvy\",\"allowNewSession\":false,\"virtualMachineId\":\"pbyrqufegxu\",\"resourceId\":\"zfbn\",\"assignedUser\":\"mctlpdngitv\",\"friendlyName\":\"mhrixkwmyijejve\",\"status\":\"NeedsAssistance\",\"statusTimestamp\":\"2021-09-18T06:49:11Z\",\"osVersion\":\"aixexccbdreaxh\",\"sxSStackVersion\":\"xdrrvqahqkghtp\",\"updateState\":\"Initial\",\"lastUpdateTime\":\"2021-03-19T04:26:57Z\",\"updateErrorMessage\":\"jsvfycxzbfvoowv\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}}]},\"id\":\"pyostronzmyhgfi\",\"name\":\"nsxkmcwaekrrjr\",\"type\":\"afxtsgum\"},{\"properties\":{\"objectId\":\"ikkx\",\"lastHeartBeat\":\"2021-05-16T06:07:50Z\",\"sessions\":1513768261,\"agentVersion\":\"qpvuzlmvfelf\",\"allowNewSession\":true,\"virtualMachineId\":\"lcrpw\",\"resourceId\":\"eznoig\",\"assignedUser\":\"njwmwkpnbsazejj\",\"friendlyName\":\"kagfhsxtt\",\"status\":\"Available\",\"statusTimestamp\":\"2021-04-24T19:56:55Z\",\"osVersion\":\"faazpxdtnkdmkqjj\",\"sxSStackVersion\":\"uenvrkp\",\"updateState\":\"Failed\",\"lastUpdateTime\":\"2021-06-02T18:39:14Z\",\"updateErrorMessage\":\"rebqaaysjk\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"SxSStackListenerCheck\",\"healthCheckResult\":\"HealthCheckSucceeded\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"UrlsAccessibleCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}}]},\"id\":\"ffiakp\",\"name\":\"pqqmted\",\"type\":\"tmmjihyeozph\"},{\"properties\":{\"objectId\":\"y\",\"lastHeartBeat\":\"2021-05-03T13:45:25Z\",\"sessions\":1385853585,\"agentVersion\":\"p\",\"allowNewSession\":false,\"virtualMachineId\":\"mdscwxqupev\",\"resourceId\":\"f\",\"assignedUser\":\"otxhojujby\",\"friendlyName\":\"lmcuvhixb\",\"status\":\"NeedsAssistance\",\"statusTimestamp\":\"2021-03-04T07:09:13Z\",\"osVersion\":\"yl\",\"sxSStackVersion\":\"ool\",\"updateState\":\"Started\",\"lastUpdateTime\":\"2021-01-29T16:46:41Z\",\"updateErrorMessage\":\"w\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"MetaDataServiceCheck\",\"healthCheckResult\":\"HealthCheckFailed\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"DomainTrustCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"SupportedEncryptionCheck\",\"healthCheckResult\":\"Unknown\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"MetaDataServiceCheck\",\"healthCheckResult\":\"HealthCheckFailed\",\"additionalFailureDetails\":{}}]},\"id\":\"wiithtywub\",\"name\":\"cbihwqk\",\"type\":\"fdntwjchrdgoih\"},{\"properties\":{\"objectId\":\"ctondz\",\"lastHeartBeat\":\"2021-05-20T02:25:29Z\",\"sessions\":382280149,\"agentVersion\":\"dlwggytsbwtovv\",\"allowNewSession\":true,\"virtualMachineId\":\"inqfiufxqknpirgn\",\"resourceId\":\"ttwqmsni\",\"assignedUser\":\"cdm\",\"friendlyName\":\"r\",\"status\":\"Disconnected\",\"statusTimestamp\":\"2021-07-05T10:57:07Z\",\"osVersion\":\"nkrxfrddhcr\",\"sxSStackVersion\":\"izzronasxiftozqy\",\"updateState\":\"Failed\",\"lastUpdateTime\":\"2021-07-28T03:20:11Z\",\"updateErrorMessage\":\"sgogczhonnxk\",\"sessionHostHealthCheckResults\":[{\"healthCheckName\":\"DomainReachable\",\"healthCheckResult\":\"SessionHostShutdown\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"HealthCheckSucceeded\",\"additionalFailureDetails\":{}},{\"healthCheckName\":\"WebRTCRedirectorCheck\",\"healthCheckResult\":\"SessionHostShutdown\",\"additionalFailureDetails\":{}}]},\"id\":\"gh\",\"name\":\"jbdhqxvc\",\"type\":\"gf\"}],\"nextLink\":\"dsofbshrns\"}") - .toObject(SessionHostList.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T11:14:50Z"), model.value().get(0).lastHeartBeat()); - Assertions.assertEquals(2100624724, model.value().get(0).sessions()); - Assertions.assertEquals("xvvy", model.value().get(0).agentVersion()); - Assertions.assertEquals(false, model.value().get(0).allowNewSession()); - Assertions.assertEquals("mctlpdngitv", model.value().get(0).assignedUser()); - Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).friendlyName()); - Assertions.assertEquals(Status.NEEDS_ASSISTANCE, model.value().get(0).status()); - Assertions.assertEquals("aixexccbdreaxh", model.value().get(0).osVersion()); - Assertions.assertEquals("xdrrvqahqkghtp", model.value().get(0).sxSStackVersion()); - Assertions.assertEquals(UpdateState.INITIAL, model.value().get(0).updateState()); - Assertions.assertEquals("jsvfycxzbfvoowv", model.value().get(0).updateErrorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionHostList model = - new SessionHostList() - .withValue( - Arrays - .asList( - new SessionHostInner() - .withLastHeartBeat(OffsetDateTime.parse("2021-07-26T11:14:50Z")) - .withSessions(2100624724) - .withAgentVersion("xvvy") - .withAllowNewSession(false) - .withAssignedUser("mctlpdngitv") - .withFriendlyName("mhrixkwmyijejve") - .withStatus(Status.NEEDS_ASSISTANCE) - .withOsVersion("aixexccbdreaxh") - .withSxSStackVersion("xdrrvqahqkghtp") - .withUpdateState(UpdateState.INITIAL) - .withUpdateErrorMessage("jsvfycxzbfvoowv"), - new SessionHostInner() - .withLastHeartBeat(OffsetDateTime.parse("2021-05-16T06:07:50Z")) - .withSessions(1513768261) - .withAgentVersion("qpvuzlmvfelf") - .withAllowNewSession(true) - .withAssignedUser("njwmwkpnbsazejj") - .withFriendlyName("kagfhsxtt") - .withStatus(Status.AVAILABLE) - .withOsVersion("faazpxdtnkdmkqjj") - .withSxSStackVersion("uenvrkp") - .withUpdateState(UpdateState.FAILED) - .withUpdateErrorMessage("rebqaaysjk"), - new SessionHostInner() - .withLastHeartBeat(OffsetDateTime.parse("2021-05-03T13:45:25Z")) - .withSessions(1385853585) - .withAgentVersion("p") - .withAllowNewSession(false) - .withAssignedUser("otxhojujby") - .withFriendlyName("lmcuvhixb") - .withStatus(Status.NEEDS_ASSISTANCE) - .withOsVersion("yl") - .withSxSStackVersion("ool") - .withUpdateState(UpdateState.STARTED) - .withUpdateErrorMessage("w"), - new SessionHostInner() - .withLastHeartBeat(OffsetDateTime.parse("2021-05-20T02:25:29Z")) - .withSessions(382280149) - .withAgentVersion("dlwggytsbwtovv") - .withAllowNewSession(true) - .withAssignedUser("cdm") - .withFriendlyName("r") - .withStatus(Status.DISCONNECTED) - .withOsVersion("nkrxfrddhcr") - .withSxSStackVersion("izzronasxiftozqy") - .withUpdateState(UpdateState.FAILED) - .withUpdateErrorMessage("sgogczhonnxk"))); - model = BinaryData.fromObject(model).toObject(SessionHostList.class); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T11:14:50Z"), model.value().get(0).lastHeartBeat()); - Assertions.assertEquals(2100624724, model.value().get(0).sessions()); - Assertions.assertEquals("xvvy", model.value().get(0).agentVersion()); - Assertions.assertEquals(false, model.value().get(0).allowNewSession()); - Assertions.assertEquals("mctlpdngitv", model.value().get(0).assignedUser()); - Assertions.assertEquals("mhrixkwmyijejve", model.value().get(0).friendlyName()); - Assertions.assertEquals(Status.NEEDS_ASSISTANCE, model.value().get(0).status()); - Assertions.assertEquals("aixexccbdreaxh", model.value().get(0).osVersion()); - Assertions.assertEquals("xdrrvqahqkghtp", model.value().get(0).sxSStackVersion()); - Assertions.assertEquals(UpdateState.INITIAL, model.value().get(0).updateState()); - Assertions.assertEquals("jsvfycxzbfvoowv", model.value().get(0).updateErrorMessage()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java deleted file mode 100644 index 2b1354f095a8..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.SessionHostPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class SessionHostPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionHostPatchProperties model = - BinaryData - .fromString("{\"allowNewSession\":false,\"assignedUser\":\"vrwxkv\",\"friendlyName\":\"k\"}") - .toObject(SessionHostPatchProperties.class); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("vrwxkv", model.assignedUser()); - Assertions.assertEquals("k", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionHostPatchProperties model = - new SessionHostPatchProperties() - .withAllowNewSession(false) - .withAssignedUser("vrwxkv") - .withFriendlyName("k"); - model = BinaryData.fromObject(model).toObject(SessionHostPatchProperties.class); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("vrwxkv", model.assignedUser()); - Assertions.assertEquals("k", model.friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java deleted file mode 100644 index 2e42175df295..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostPatchTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; -import org.junit.jupiter.api.Assertions; - -public final class SessionHostPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SessionHostPatch model = - BinaryData - .fromString( - "{\"properties\":{\"allowNewSession\":false,\"assignedUser\":\"zywkb\",\"friendlyName\":\"ryuzh\"},\"id\":\"hkjoqr\",\"name\":\"qqaatjinrvgou\",\"type\":\"mfiibfggj\"}") - .toObject(SessionHostPatch.class); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("zywkb", model.assignedUser()); - Assertions.assertEquals("ryuzh", model.friendlyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SessionHostPatch model = - new SessionHostPatch().withAllowNewSession(false).withAssignedUser("zywkb").withFriendlyName("ryuzh"); - model = BinaryData.fromObject(model).toObject(SessionHostPatch.class); - Assertions.assertEquals(false, model.allowNewSession()); - Assertions.assertEquals("zywkb", model.assignedUser()); - Assertions.assertEquals("ryuzh", model.friendlyName()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java deleted file mode 100644 index a6e30281ee01..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SessionHostsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sessionHosts() - .deleteWithResponse("rrscubiwsdrnp", "qwodiffjx", "jrmmuabwib", false, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java deleted file mode 100644 index eace254e9da0..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/SkuTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.Sku; -import com.azure.resourcemanager.desktopvirtualization.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString( - "{\"name\":\"a\",\"tier\":\"Standard\",\"size\":\"izuckyfihrfidfvz\",\"family\":\"zuhtymwisdkfthwx\",\"capacity\":61317803}") - .toObject(Sku.class); - Assertions.assertEquals("a", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("izuckyfihrfidfvz", model.size()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.family()); - Assertions.assertEquals(61317803, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = - new Sku() - .withName("a") - .withTier(SkuTier.STANDARD) - .withSize("izuckyfihrfidfvz") - .withFamily("zuhtymwisdkfthwx") - .withCapacity(61317803); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("a", model.name()); - Assertions.assertEquals(SkuTier.STANDARD, model.tier()); - Assertions.assertEquals("izuckyfihrfidfvz", model.size()); - Assertions.assertEquals("zuhtymwisdkfthwx", model.family()); - Assertions.assertEquals(61317803, model.capacity()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java deleted file mode 100644 index 0e4f9cd3a0f2..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemInner; -import org.junit.jupiter.api.Assertions; - -public final class StartMenuItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StartMenuItemInner model = - BinaryData - .fromString( - "{\"properties\":{\"appAlias\":\"jrjxgciqibrhosx\",\"filePath\":\"qrhzoymibmrqyib\",\"commandLineArguments\":\"wfluszdt\",\"iconPath\":\"rkwofyyvoqa\",\"iconIndex\":848769798},\"id\":\"expbtg\",\"name\":\"wbwo\",\"type\":\"nwashrtd\"}") - .toObject(StartMenuItemInner.class); - Assertions.assertEquals("jrjxgciqibrhosx", model.appAlias()); - Assertions.assertEquals("qrhzoymibmrqyib", model.filePath()); - Assertions.assertEquals("wfluszdt", model.commandLineArguments()); - Assertions.assertEquals("rkwofyyvoqa", model.iconPath()); - Assertions.assertEquals(848769798, model.iconIndex()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StartMenuItemInner model = - new StartMenuItemInner() - .withAppAlias("jrjxgciqibrhosx") - .withFilePath("qrhzoymibmrqyib") - .withCommandLineArguments("wfluszdt") - .withIconPath("rkwofyyvoqa") - .withIconIndex(848769798); - model = BinaryData.fromObject(model).toObject(StartMenuItemInner.class); - Assertions.assertEquals("jrjxgciqibrhosx", model.appAlias()); - Assertions.assertEquals("qrhzoymibmrqyib", model.filePath()); - Assertions.assertEquals("wfluszdt", model.commandLineArguments()); - Assertions.assertEquals("rkwofyyvoqa", model.iconPath()); - Assertions.assertEquals(848769798, model.iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java deleted file mode 100644 index c74224404417..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemListTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemInner; -import com.azure.resourcemanager.desktopvirtualization.models.StartMenuItemList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class StartMenuItemListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StartMenuItemList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"appAlias\":\"pdggkzzlvm\",\"filePath\":\"paxmodfvuefywsb\",\"commandLineArguments\":\"vmwy\",\"iconPath\":\"fouyf\",\"iconIndex\":938616277},\"id\":\"kcpwiy\",\"name\":\"vqtmnub\",\"type\":\"xkp\"},{\"properties\":{\"appAlias\":\"mond\",\"filePath\":\"quxvypomgkop\",\"commandLineArguments\":\"hojvpajqgxysmocm\",\"iconPath\":\"fqvm\",\"iconIndex\":1181340997},\"id\":\"oz\",\"name\":\"pvhelxprg\",\"type\":\"yat\"}],\"nextLink\":\"ckcb\"}") - .toObject(StartMenuItemList.class); - Assertions.assertEquals("pdggkzzlvm", model.value().get(0).appAlias()); - Assertions.assertEquals("paxmodfvuefywsb", model.value().get(0).filePath()); - Assertions.assertEquals("vmwy", model.value().get(0).commandLineArguments()); - Assertions.assertEquals("fouyf", model.value().get(0).iconPath()); - Assertions.assertEquals(938616277, model.value().get(0).iconIndex()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StartMenuItemList model = - new StartMenuItemList() - .withValue( - Arrays - .asList( - new StartMenuItemInner() - .withAppAlias("pdggkzzlvm") - .withFilePath("paxmodfvuefywsb") - .withCommandLineArguments("vmwy") - .withIconPath("fouyf") - .withIconIndex(938616277), - new StartMenuItemInner() - .withAppAlias("mond") - .withFilePath("quxvypomgkop") - .withCommandLineArguments("hojvpajqgxysmocm") - .withIconPath("fqvm") - .withIconIndex(1181340997))); - model = BinaryData.fromObject(model).toObject(StartMenuItemList.class); - Assertions.assertEquals("pdggkzzlvm", model.value().get(0).appAlias()); - Assertions.assertEquals("paxmodfvuefywsb", model.value().get(0).filePath()); - Assertions.assertEquals("vmwy", model.value().get(0).commandLineArguments()); - Assertions.assertEquals("fouyf", model.value().get(0).iconPath()); - Assertions.assertEquals(938616277, model.value().get(0).iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java deleted file mode 100644 index f90489efdb54..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemPropertiesTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.StartMenuItemProperties; -import org.junit.jupiter.api.Assertions; - -public final class StartMenuItemPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StartMenuItemProperties model = - BinaryData - .fromString( - "{\"appAlias\":\"cnqxwbpokulpi\",\"filePath\":\"waasip\",\"commandLineArguments\":\"iobyu\",\"iconPath\":\"rpqlp\",\"iconIndex\":1285990077}") - .toObject(StartMenuItemProperties.class); - Assertions.assertEquals("cnqxwbpokulpi", model.appAlias()); - Assertions.assertEquals("waasip", model.filePath()); - Assertions.assertEquals("iobyu", model.commandLineArguments()); - Assertions.assertEquals("rpqlp", model.iconPath()); - Assertions.assertEquals(1285990077, model.iconIndex()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StartMenuItemProperties model = - new StartMenuItemProperties() - .withAppAlias("cnqxwbpokulpi") - .withFilePath("waasip") - .withCommandLineArguments("iobyu") - .withIconPath("rpqlp") - .withIconIndex(1285990077); - model = BinaryData.fromObject(model).toObject(StartMenuItemProperties.class); - Assertions.assertEquals("cnqxwbpokulpi", model.appAlias()); - Assertions.assertEquals("waasip", model.filePath()); - Assertions.assertEquals("iobyu", model.commandLineArguments()); - Assertions.assertEquals("rpqlp", model.iconPath()); - Assertions.assertEquals(1285990077, model.iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java deleted file mode 100644 index 7c014e40b947..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.StartMenuItem; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class StartMenuItemsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"appAlias\":\"vwwskondcbr\",\"filePath\":\"muvqejosovyr\",\"commandLineArguments\":\"eaesin\",\"iconPath\":\"tljqobbpih\",\"iconIndex\":1941467727},\"id\":\"ecybmrqbrj\",\"name\":\"bmpxdlvykfrexc\",\"type\":\"s\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .startMenuItems() - .list("whqjjyslurlpshhk", "pedwqsl", 510077945, false, 1919863050, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vwwskondcbr", response.iterator().next().appAlias()); - Assertions.assertEquals("muvqejosovyr", response.iterator().next().filePath()); - Assertions.assertEquals("eaesin", response.iterator().next().commandLineArguments()); - Assertions.assertEquals("tljqobbpih", response.iterator().next().iconPath()); - Assertions.assertEquals(1941467727, response.iterator().next().iconIndex()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java deleted file mode 100644 index 263165be8c0a..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/TimeTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.Time; -import org.junit.jupiter.api.Assertions; - -public final class TimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Time model = BinaryData.fromString("{\"hour\":1797950253,\"minute\":1146711687}").toObject(Time.class); - Assertions.assertEquals(1797950253, model.hour()); - Assertions.assertEquals(1146711687, model.minute()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Time model = new Time().withHour(1797950253).withMinute(1146711687); - model = BinaryData.fromObject(model).toObject(Time.class); - Assertions.assertEquals(1797950253, model.hour()); - Assertions.assertEquals(1146711687, model.minute()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java deleted file mode 100644 index cccf0f849e31..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionInner; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class UserSessionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserSessionInner model = - BinaryData - .fromString( - "{\"properties\":{\"objectId\":\"hneuyowqkd\",\"userPrincipalName\":\"t\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Pending\",\"activeDirectoryUserName\":\"cgpik\",\"createTime\":\"2021-11-09T05:31:13Z\"},\"id\":\"mejzanlfzxia\",\"name\":\"rmbzo\",\"type\":\"okixrjqcir\"}") - .toObject(UserSessionInner.class); - Assertions.assertEquals("t", model.userPrincipalName()); - Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); - Assertions.assertEquals(SessionState.PENDING, model.sessionState()); - Assertions.assertEquals("cgpik", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T05:31:13Z"), model.createTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserSessionInner model = - new UserSessionInner() - .withUserPrincipalName("t") - .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.PENDING) - .withActiveDirectoryUsername("cgpik") - .withCreateTime(OffsetDateTime.parse("2021-11-09T05:31:13Z")); - model = BinaryData.fromObject(model).toObject(UserSessionInner.class); - Assertions.assertEquals("t", model.userPrincipalName()); - Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); - Assertions.assertEquals(SessionState.PENDING, model.sessionState()); - Assertions.assertEquals("cgpik", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-09T05:31:13Z"), model.createTime()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java deleted file mode 100644 index 708c6ae44978..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionListTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionInner; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSessionList; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UserSessionListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserSessionList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"objectId\":\"p\",\"userPrincipalName\":\"cstwity\",\"applicationType\":\"Desktop\",\"sessionState\":\"UserProfileDiskMounted\",\"activeDirectoryUserName\":\"cedcpnmdy\",\"createTime\":\"2021-08-04T00:15:47Z\"},\"id\":\"wzxltjc\",\"name\":\"nhltiugcxn\",\"type\":\"vvwxqi\"},{\"properties\":{\"objectId\":\"nyowxwlmdjrkvfg\",\"userPrincipalName\":\"fvpdbo\",\"applicationType\":\"Desktop\",\"sessionState\":\"Disconnected\",\"activeDirectoryUserName\":\"j\",\"createTime\":\"2021-03-04T03:48:03Z\"},\"id\":\"krribdeibqi\",\"name\":\"qkgh\",\"type\":\"xndzwm\"},{\"properties\":{\"objectId\":\"ajpjo\",\"userPrincipalName\":\"kqnyh\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Active\",\"activeDirectoryUserName\":\"ivfxzsjabibsyst\",\"createTime\":\"2021-05-13T21:12:04Z\"},\"id\":\"sdjpvkvp\",\"name\":\"jxbkzbzkdvn\",\"type\":\"jabudurgkakmo\"},{\"properties\":{\"objectId\":\"jk\",\"userPrincipalName\":\"fhmouwq\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Active\",\"activeDirectoryUserName\":\"eeyebi\",\"createTime\":\"2021-05-17T10:43:36Z\"},\"id\":\"ayuhqlbjbsy\",\"name\":\"bqwrvtldgm\",\"type\":\"pgvmpipaslthaqfx\"}],\"nextLink\":\"mwutwbdsre\"}") - .toObject(UserSessionList.class); - Assertions.assertEquals("cstwity", model.value().get(0).userPrincipalName()); - Assertions.assertEquals(ApplicationType.DESKTOP, model.value().get(0).applicationType()); - Assertions.assertEquals(SessionState.USER_PROFILE_DISK_MOUNTED, model.value().get(0).sessionState()); - Assertions.assertEquals("cedcpnmdy", model.value().get(0).activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T00:15:47Z"), model.value().get(0).createTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserSessionList model = - new UserSessionList() - .withValue( - Arrays - .asList( - new UserSessionInner() - .withUserPrincipalName("cstwity") - .withApplicationType(ApplicationType.DESKTOP) - .withSessionState(SessionState.USER_PROFILE_DISK_MOUNTED) - .withActiveDirectoryUsername("cedcpnmdy") - .withCreateTime(OffsetDateTime.parse("2021-08-04T00:15:47Z")), - new UserSessionInner() - .withUserPrincipalName("fvpdbo") - .withApplicationType(ApplicationType.DESKTOP) - .withSessionState(SessionState.DISCONNECTED) - .withActiveDirectoryUsername("j") - .withCreateTime(OffsetDateTime.parse("2021-03-04T03:48:03Z")), - new UserSessionInner() - .withUserPrincipalName("kqnyh") - .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.ACTIVE) - .withActiveDirectoryUsername("ivfxzsjabibsyst") - .withCreateTime(OffsetDateTime.parse("2021-05-13T21:12:04Z")), - new UserSessionInner() - .withUserPrincipalName("fhmouwq") - .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.ACTIVE) - .withActiveDirectoryUsername("eeyebi") - .withCreateTime(OffsetDateTime.parse("2021-05-17T10:43:36Z")))); - model = BinaryData.fromObject(model).toObject(UserSessionList.class); - Assertions.assertEquals("cstwity", model.value().get(0).userPrincipalName()); - Assertions.assertEquals(ApplicationType.DESKTOP, model.value().get(0).applicationType()); - Assertions.assertEquals(SessionState.USER_PROFILE_DISK_MOUNTED, model.value().get(0).sessionState()); - Assertions.assertEquals("cedcpnmdy", model.value().get(0).activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-04T00:15:47Z"), model.value().get(0).createTime()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java deleted file mode 100644 index cae536540b69..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.UserSessionProperties; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class UserSessionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserSessionProperties model = - BinaryData - .fromString( - "{\"objectId\":\"pfrlazsz\",\"userPrincipalName\":\"woiindf\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"Active\",\"activeDirectoryUserName\":\"wbtlhflsjcdh\",\"createTime\":\"2021-08-12T16:31:07Z\"}") - .toObject(UserSessionProperties.class); - Assertions.assertEquals("woiindf", model.userPrincipalName()); - Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); - Assertions.assertEquals(SessionState.ACTIVE, model.sessionState()); - Assertions.assertEquals("wbtlhflsjcdh", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T16:31:07Z"), model.createTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserSessionProperties model = - new UserSessionProperties() - .withUserPrincipalName("woiindf") - .withApplicationType(ApplicationType.REMOTE_APP) - .withSessionState(SessionState.ACTIVE) - .withActiveDirectoryUsername("wbtlhflsjcdh") - .withCreateTime(OffsetDateTime.parse("2021-08-12T16:31:07Z")); - model = BinaryData.fromObject(model).toObject(UserSessionProperties.class); - Assertions.assertEquals("woiindf", model.userPrincipalName()); - Assertions.assertEquals(ApplicationType.REMOTE_APP, model.applicationType()); - Assertions.assertEquals(SessionState.ACTIVE, model.sessionState()); - Assertions.assertEquals("wbtlhflsjcdh", model.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T16:31:07Z"), model.createTime()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java deleted file mode 100644 index 5bdd9e1b74e6..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UserSessionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .userSessions() - .deleteWithResponse( - "aifghtmoqqt", "ffhzbkrkjjjavfq", "vhnqo", "wdogiyetesyp", false, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java deleted file mode 100644 index 38aa2de0acdd..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UserSessionsDisconnectWithResponseMockTests { - @Test - public void testDisconnectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .userSessions() - .disconnectWithResponse( - "bsjuscvsfx", "gctmgxuupbezq", "cydrtceukdqkk", "ihztgeqmgqzgwldo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java deleted file mode 100644 index 37e3e2ee72ea..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSession; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UserSessionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"objectId\":\"rttuiaclkiexha\",\"userPrincipalName\":\"fnth\",\"applicationType\":\"RemoteApp\",\"sessionState\":\"LogOff\",\"activeDirectoryUserName\":\"t\",\"createTime\":\"2021-07-20T02:29:06Z\"},\"id\":\"gbpvnwswmtxkyct\",\"name\":\"wgzwxjlmecvog\",\"type\":\"gzyvnee\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UserSession response = - manager - .userSessions() - .getWithResponse("gsksrfhf", "olmk", "bnxwc", "ommpvfqaw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("fnth", response.userPrincipalName()); - Assertions.assertEquals(ApplicationType.REMOTE_APP, response.applicationType()); - Assertions.assertEquals(SessionState.LOG_OFF, response.sessionState()); - Assertions.assertEquals("t", response.activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T02:29:06Z"), response.createTime()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java deleted file mode 100644 index 7d15f961e455..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSession; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UserSessionsListByHostPoolMockTests { - @Test - public void testListByHostPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"qnrmvvfko\",\"userPrincipalName\":\"lghktuidvrm\",\"applicationType\":\"Desktop\",\"sessionState\":\"Pending\",\"activeDirectoryUserName\":\"wex\",\"createTime\":\"2021-08-07T05:35:14Z\"},\"id\":\"vlazipbhpwvqsgny\",\"name\":\"uuzivensrpmeyyvp\",\"type\":\"patlbijp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .userSessions() - .listByHostPool( - "duczkgof", "y", "srucvcrrpcjtt", 411078462, false, 2056089114, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lghktuidvrm", response.iterator().next().userPrincipalName()); - Assertions.assertEquals(ApplicationType.DESKTOP, response.iterator().next().applicationType()); - Assertions.assertEquals(SessionState.PENDING, response.iterator().next().sessionState()); - Assertions.assertEquals("wex", response.iterator().next().activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-07T05:35:14Z"), response.iterator().next().createTime()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java deleted file mode 100644 index 1f3062a9bb99..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.ApplicationType; -import com.azure.resourcemanager.desktopvirtualization.models.SessionState; -import com.azure.resourcemanager.desktopvirtualization.models.UserSession; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UserSessionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"objectId\":\"upia\",\"userPrincipalName\":\"xnafbw\",\"applicationType\":\"Desktop\",\"sessionState\":\"LogOff\",\"activeDirectoryUserName\":\"uovmaonurjt\",\"createTime\":\"2021-05-12T05:44:48Z\"},\"id\":\"hihpvecmsl\",\"name\":\"lbl\",\"type\":\"jxl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .userSessions() - .list( - "dbztjhqtfbov", "ynkbwetnju", "p", 1399052652, true, 1446166939, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xnafbw", response.iterator().next().userPrincipalName()); - Assertions.assertEquals(ApplicationType.DESKTOP, response.iterator().next().applicationType()); - Assertions.assertEquals(SessionState.LOG_OFF, response.iterator().next().sessionState()); - Assertions.assertEquals("uovmaonurjt", response.iterator().next().activeDirectoryUsername()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-12T05:44:48Z"), response.iterator().next().createTime()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java deleted file mode 100644 index 2635e1854eea..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UserSessionsSendMessageWithResponseMockTests { - @Test - public void testSendMessageWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .userSessions() - .sendMessageWithResponse( - "chillcecf", - "huwaoaguhic", - "llizs", - "ac", - new SendMessage().withMessageTitle("vhrweftkwqejpmv").withMessageBody("ehaepwamcxtc"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java deleted file mode 100644 index b5f41976f944..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspacePatchProperties; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspacePatchProperties model = - BinaryData - .fromString( - "{\"description\":\"rzafbljjgpbtoqcj\",\"friendlyName\":\"ljavbqid\",\"applicationGroupReferences\":[\"jzyulpk\",\"dj\"],\"publicNetworkAccess\":\"Enabled\"}") - .toObject(WorkspacePatchProperties.class); - Assertions.assertEquals("rzafbljjgpbtoqcj", model.description()); - Assertions.assertEquals("ljavbqid", model.friendlyName()); - Assertions.assertEquals("jzyulpk", model.applicationGroupReferences().get(0)); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspacePatchProperties model = - new WorkspacePatchProperties() - .withDescription("rzafbljjgpbtoqcj") - .withFriendlyName("ljavbqid") - .withApplicationGroupReferences(Arrays.asList("jzyulpk", "dj")) - .withPublicNetworkAccess(PublicNetworkAccess.ENABLED); - model = BinaryData.fromObject(model).toObject(WorkspacePatchProperties.class); - Assertions.assertEquals("rzafbljjgpbtoqcj", model.description()); - Assertions.assertEquals("ljavbqid", model.friendlyName()); - Assertions.assertEquals("jzyulpk", model.applicationGroupReferences().get(0)); - Assertions.assertEquals(PublicNetworkAccess.ENABLED, model.publicNetworkAccess()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java deleted file mode 100644 index d048ed4602b7..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePatchTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; -import com.azure.resourcemanager.desktopvirtualization.models.WorkspacePatch; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspacePatch model = - BinaryData - .fromString( - "{\"tags\":{\"wjdk\":\"qrimzinpv\",\"t\":\"rsoodqxhcrmnoh\"},\"properties\":{\"description\":\"h\",\"friendlyName\":\"oifiyipjxsqwpgr\",\"applicationGroupReferences\":[\"norcjxvsnbyxqab\",\"mocpc\"],\"publicNetworkAccess\":\"Disabled\"}}") - .toObject(WorkspacePatch.class); - Assertions.assertEquals("qrimzinpv", model.tags().get("wjdk")); - Assertions.assertEquals("h", model.description()); - Assertions.assertEquals("oifiyipjxsqwpgr", model.friendlyName()); - Assertions.assertEquals("norcjxvsnbyxqab", model.applicationGroupReferences().get(0)); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspacePatch model = - new WorkspacePatch() - .withTags(mapOf("wjdk", "qrimzinpv", "t", "rsoodqxhcrmnoh")) - .withDescription("h") - .withFriendlyName("oifiyipjxsqwpgr") - .withApplicationGroupReferences(Arrays.asList("norcjxvsnbyxqab", "mocpc")) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED); - model = BinaryData.fromObject(model).toObject(WorkspacePatch.class); - Assertions.assertEquals("qrimzinpv", model.tags().get("wjdk")); - Assertions.assertEquals("h", model.description()); - Assertions.assertEquals("oifiyipjxsqwpgr", model.friendlyName()); - Assertions.assertEquals("norcjxvsnbyxqab", model.applicationGroupReferences().get(0)); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java deleted file mode 100644 index cc6f2cde76eb..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacePropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceProperties; -import com.azure.resourcemanager.desktopvirtualization.models.PublicNetworkAccess; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceProperties model = - BinaryData - .fromString( - "{\"objectId\":\"xzxtheo\",\"description\":\"si\",\"friendlyName\":\"evcciqihnhun\",\"applicationGroupReferences\":[\"jzrnf\",\"gxg\",\"spemvtzfk\",\"fublj\"],\"cloudPcResource\":true,\"publicNetworkAccess\":\"Disabled\",\"privateEndpointConnections\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qjhqjbas\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"jqul\",\"actionsRequired\":\"sntnbybkzgcw\"},\"provisioningState\":\"Deleting\"},\"id\":\"lxxwrljdouskc\",\"name\":\"vkocrcjdkwtn\",\"type\":\"xbnjbiksq\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"sainqpjwnzl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ppeebvmgxsab\",\"actionsRequired\":\"qduujitcjczdz\"},\"provisioningState\":\"Creating\"},\"id\":\"dhkrwpdappdsbdk\",\"name\":\"wrwjfeu\",\"type\":\"nhutjeltmrldhugj\"}]}") - .toObject(WorkspaceProperties.class); - Assertions.assertEquals("si", model.description()); - Assertions.assertEquals("evcciqihnhun", model.friendlyName()); - Assertions.assertEquals("jzrnf", model.applicationGroupReferences().get(0)); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceProperties model = - new WorkspaceProperties() - .withDescription("si") - .withFriendlyName("evcciqihnhun") - .withApplicationGroupReferences(Arrays.asList("jzrnf", "gxg", "spemvtzfk", "fublj")) - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED); - model = BinaryData.fromObject(model).toObject(WorkspaceProperties.class); - Assertions.assertEquals("si", model.description()); - Assertions.assertEquals("evcciqihnhun", model.friendlyName()); - Assertions.assertEquals("jzrnf", model.applicationGroupReferences().get(0)); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - } -} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java deleted file mode 100644 index ed02fe0eb21b..000000000000 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/test/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.desktopvirtualization.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.desktopvirtualization.DesktopVirtualizationManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesDeleteByResourceGroupWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - DesktopVirtualizationManager manager = - DesktopVirtualizationManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().deleteByResourceGroupWithResponse("ecuijpxtxs", "wprtu", com.azure.core.util.Context.NONE); - } -}