diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/CHANGELOG.md index 651f8577b78f..250b08228d2e 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 (2023-10-31) + +- Azure Resource Manager DesktopVirtualization client library for Java. This package contains Microsoft Azure SDK for DesktopVirtualization Management SDK. Package tag package-preview-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/README.md index b875cc8927bb..4c5c9671f87e 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-preview-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-desktopvirtualization - 1.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..21ee8bad6394 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,222 @@ - [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/preview/2023-10-04-preview/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/preview/2023-10-04-preview/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() + .deleteWithResponse("resourceGroup1", "packagefullname", null, 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/preview/2023-10-04-preview/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/preview/2023-10-04-preview/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/preview/2023-10-04-preview/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/preview/2023-10-04-preview/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/preview/2023-10-04-preview/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 @@ -130,7 +359,7 @@ import java.util.Map; /** 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/preview/2023-10-04-preview/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. @@ -174,7 +403,7 @@ public final class ApplicationGroupsCreateOrUpdateSamples { /** 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/preview/2023-10-04-preview/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. @@ -196,7 +425,7 @@ public final class ApplicationGroupsDeleteSamples { /** 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/preview/2023-10-04-preview/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. @@ -218,7 +447,7 @@ public final class ApplicationGroupsGetByResourceGroupSamples { /** 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/preview/2023-10-04-preview/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. @@ -238,7 +467,7 @@ public final class ApplicationGroupsListSamples { /** 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/preview/2023-10-04-preview/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. @@ -270,7 +499,7 @@ import java.util.Map; /** 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/preview/2023-10-04-preview/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. @@ -315,7 +544,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting /** Samples for Applications CreateOrUpdate. */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Create.json */ /** * Sample code: Application_Create. @@ -347,7 +576,7 @@ public final class ApplicationsCreateOrUpdateSamples { /** 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/preview/2023-10-04-preview/examples/Application_Delete.json */ /** * Sample code: Application_Delete. @@ -370,7 +599,7 @@ public final class ApplicationsDeleteSamples { /** 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/preview/2023-10-04-preview/examples/Application_Get.json */ /** * Sample code: Application_Get. @@ -392,7 +621,7 @@ public final class ApplicationsGetSamples { /** 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/preview/2023-10-04-preview/examples/Application_List.json */ /** * Sample code: Applications_List. @@ -418,7 +647,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationT /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Update.json */ /** * Sample code: Application_Update. @@ -455,7 +684,7 @@ public final class ApplicationsUpdateSamples { /** 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/preview/2023-10-04-preview/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. @@ -477,7 +706,7 @@ public final class DesktopsGetSamples { /** 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/preview/2023-10-04-preview/examples/Desktop_List.json */ /** * Sample code: Desktop_List. @@ -499,7 +728,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.DesktopPatch; /** Samples for Desktops Update. */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. @@ -542,7 +771,7 @@ import java.util.Map; /** 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/preview/2023-10-04-preview/examples/HostPool_Create.json */ /** * Sample code: HostPool_Create. @@ -607,7 +836,7 @@ public final class HostPoolsCreateOrUpdateSamples { /** 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/preview/2023-10-04-preview/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. @@ -627,7 +856,7 @@ public final class HostPoolsDeleteSamples { /** 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/preview/2023-10-04-preview/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. @@ -649,7 +878,7 @@ public final class HostPoolsGetByResourceGroupSamples { /** 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/preview/2023-10-04-preview/examples/HostPool_List.json */ /** * Sample code: HostPool_List. @@ -669,7 +898,7 @@ public final class HostPoolsListSamples { /** 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/preview/2023-10-04-preview/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. @@ -689,7 +918,7 @@ public final class HostPoolsListByResourceGroupSamples { /** 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/preview/2023-10-04-preview/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. @@ -726,7 +955,7 @@ import java.util.Map; /** 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/preview/2023-10-04-preview/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. @@ -793,7 +1022,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixImageUri; /** Samples for MsixImages Expand. */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. @@ -824,7 +1053,7 @@ import java.util.Arrays; /** 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/preview/2023-10-04-preview/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. @@ -875,7 +1104,7 @@ public final class MsixPackagesCreateOrUpdateSamples { /** 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/preview/2023-10-04-preview/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. @@ -897,7 +1126,7 @@ public final class MsixPackagesDeleteSamples { /** 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/preview/2023-10-04-preview/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. @@ -919,7 +1148,7 @@ public final class MsixPackagesGetSamples { /** 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/preview/2023-10-04-preview/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. @@ -941,7 +1170,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.MsixPackage; /** Samples for MsixPackages Update. */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. @@ -966,7 +1195,7 @@ public final class MsixPackagesUpdateSamples { /** 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/preview/2023-10-04-preview/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. @@ -986,7 +1215,7 @@ public final class OperationsListSamples { /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_DeleteByHostPool.json */ /** * Sample code: PrivateEndpointConnection_DeleteByHostPool. @@ -1012,7 +1241,7 @@ public final class PrivateEndpointConnectionsDeleteByHostPoolSamples { /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_DeleteByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_DeleteByWorkspace. @@ -1038,7 +1267,7 @@ public final class PrivateEndpointConnectionsDeleteByWorkspaceSamples { /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByHostPool.json */ /** * Sample code: PrivateEndpointConnection_GetByHostPool. @@ -1064,7 +1293,7 @@ public final class PrivateEndpointConnectionsGetByHostPoolSamples { /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_GetByWorkspace. @@ -1090,7 +1319,7 @@ public final class PrivateEndpointConnectionsGetByWorkspaceSamples { /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_ListByHostPool.json */ /** * Sample code: PrivateEndpointConnection_ListByHostPool. @@ -1112,7 +1341,7 @@ public final class PrivateEndpointConnectionsListByHostPoolSamples { /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_ListByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_ListByWorkspace. @@ -1138,7 +1367,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkService /** Samples for PrivateEndpointConnections UpdateByHostPool. */ public final class PrivateEndpointConnectionsUpdateByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByHostPool.json */ /** * Sample code: PrivateEndpointConnection_UpdateByHostPool. @@ -1174,7 +1403,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.PrivateLinkService /** Samples for PrivateEndpointConnections UpdateByWorkspace. */ public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/PrivateEndpointConnection_UpdateByWorkspace.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_UpdateByWorkspace. @@ -1206,7 +1435,7 @@ public final class PrivateEndpointConnectionsUpdateByWorkspaceSamples { /** 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/preview/2023-10-04-preview/examples/PrivateLinkResources_ListByHostPool.json */ /** * Sample code: PrivateLinkResources_ListByHostPool. @@ -1228,7 +1457,7 @@ public final class PrivateLinkResourcesListByHostPoolSamples { /** 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/preview/2023-10-04-preview/examples/PrivateLinkResources_ListByWorkspace.json */ /** * Sample code: PrivateLinkResources_ListByWorkspace. @@ -1257,7 +1486,7 @@ import java.util.Arrays; /** Samples for ScalingPlanPersonalSchedules Create. */ public final class ScalingPlanPersonalSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Create.json */ /** * Sample code: ScalingPlanPersonalSchedules_Create. @@ -1310,7 +1539,7 @@ public final class ScalingPlanPersonalSchedulesCreateSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Delete.json */ /** * Sample code: ScalingPlanPersonalSchedules_Delete. @@ -1333,7 +1562,7 @@ public final class ScalingPlanPersonalSchedulesDeleteSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Get.json */ /** * Sample code: ScalingPlanPersonalSchedules_Get. @@ -1359,7 +1588,7 @@ public final class ScalingPlanPersonalSchedulesGetSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_List.json */ /** * Sample code: ScalingPlanPersonalSchedules_List. @@ -1386,7 +1615,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.Time; /** Samples for ScalingPlanPersonalSchedules Update. */ public final class ScalingPlanPersonalSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPersonalSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Update.json */ /** * Sample code: ScalingPlanPersonalSchedules_Update. @@ -1435,7 +1664,7 @@ import java.util.Arrays; /** 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/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Create.json */ /** * Sample code: ScalingPlanPooledSchedules_Create. @@ -1478,7 +1707,7 @@ public final class ScalingPlanPooledSchedulesCreateSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Delete.json */ /** * Sample code: ScalingPlanPooledSchedules_Delete. @@ -1501,7 +1730,7 @@ public final class ScalingPlanPooledSchedulesDeleteSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Get.json */ /** * Sample code: ScalingPlanPooledSchedules_Get. @@ -1524,7 +1753,7 @@ public final class ScalingPlanPooledSchedulesGetSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_List.json */ /** * Sample code: ScalingPlanPooledSchedules_List. @@ -1552,7 +1781,7 @@ import java.util.Arrays; /** 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/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Update.json */ /** * Sample code: ScalingPlanPooledSchedules_Update. @@ -1600,7 +1829,7 @@ import java.util.Map; /** 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/preview/2023-10-04-preview/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_Create. @@ -1678,7 +1907,7 @@ public final class ScalingPlansCreateSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. @@ -1700,7 +1929,7 @@ public final class ScalingPlansDeleteSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. @@ -1722,7 +1951,7 @@ public final class ScalingPlansGetByResourceGroupSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. @@ -1742,7 +1971,7 @@ public final class ScalingPlansListSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. @@ -1764,7 +1993,7 @@ public final class ScalingPlansListByHostPoolSamples { /** 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/preview/2023-10-04-preview/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. @@ -1786,7 +2015,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.ScalingPlan; /** Samples for ScalingPlans Update. */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. @@ -1811,7 +2040,7 @@ public final class ScalingPlansUpdateSamples { /** 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/preview/2023-10-04-preview/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. @@ -1834,7 +2063,7 @@ public final class SessionHostsDeleteSamples { /** 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/preview/2023-10-04-preview/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. @@ -1857,7 +2086,7 @@ public final class SessionHostsGetSamples { /** 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/preview/2023-10-04-preview/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. @@ -1879,7 +2108,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.SessionHostPatch; /** Samples for SessionHosts Update. */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. @@ -1910,7 +2139,7 @@ public final class SessionHostsUpdateSamples { /** 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/preview/2023-10-04-preview/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. @@ -1932,7 +2161,7 @@ public final class StartMenuItemsListSamples { /** 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/preview/2023-10-04-preview/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. @@ -1960,7 +2189,7 @@ public final class UserSessionsDeleteSamples { /** 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/preview/2023-10-04-preview/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. @@ -1983,7 +2212,7 @@ public final class UserSessionsDisconnectSamples { /** 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/preview/2023-10-04-preview/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. @@ -2006,7 +2235,7 @@ public final class UserSessionsGetSamples { /** 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/preview/2023-10-04-preview/examples/UserSession_List.json */ /** * Sample code: UserSession_List. @@ -2035,7 +2264,7 @@ public final class UserSessionsListSamples { /** 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/preview/2023-10-04-preview/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. @@ -2066,7 +2295,7 @@ import com.azure.resourcemanager.desktopvirtualization.models.SendMessage; /** Samples for UserSessions SendMessage. */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. @@ -2097,7 +2326,7 @@ import java.util.Map; /** 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/preview/2023-10-04-preview/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. @@ -2137,7 +2366,7 @@ public final class WorkspacesCreateOrUpdateSamples { /** 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/preview/2023-10-04-preview/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. @@ -2159,7 +2388,7 @@ public final class WorkspacesDeleteSamples { /** 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/preview/2023-10-04-preview/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. @@ -2181,7 +2410,7 @@ public final class WorkspacesGetByResourceGroupSamples { /** 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/preview/2023-10-04-preview/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. @@ -2201,7 +2430,7 @@ public final class WorkspacesListSamples { /** 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/preview/2023-10-04-preview/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. @@ -2225,7 +2454,7 @@ import java.util.Map; /** 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/preview/2023-10-04-preview/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/pom.xml index 0f16ecde87f9..75e128b66ba1 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-preview-2023-10. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/DesktopVirtualizationManager.java index 0a090c871fac..b01d5d9ec1c8 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 @@ -24,6 +24,8 @@ 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; @@ -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; @@ -96,8 +100,12 @@ public final class DesktopVirtualizationManager { private MsixPackages msixPackages; + private AppAttachPackageInfoes appAttachPackageInfoes; + private MsixImages msixImages; + private AppAttachPackages appAttachPackages; + private final DesktopVirtualizationApiClient clientObject; private DesktopVirtualizationManager( @@ -264,7 +272,7 @@ public DesktopVirtualizationManager authenticate(TokenCredential credential, Azu .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(" (") @@ -504,6 +512,19 @@ 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. * @@ -516,6 +537,18 @@ 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. 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..f0b80fe94ab8 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackageInfoesClient.java @@ -0,0 +1,67 @@ +// Copyright (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..63831c7063c2 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/AppAttachPackagesClient.java @@ -0,0 +1,349 @@ +// Copyright (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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 arm object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 arm object. + * @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 arm object. + * @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 arm object. + * @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 arm object. + * @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 arm object. + * @param force Force flag to delete 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, Boolean force); + + /** + * 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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 arm object. + * @param force Force flag to delete 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, Boolean force, 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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 arm object. + * @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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 arm object. + * @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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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/DesktopVirtualizationApiClient.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/DesktopVirtualizationApiClient.java index 8a128c96020d..f3a57c781466 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 @@ -149,10 +149,24 @@ public interface DesktopVirtualizationApiClient { */ 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/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..71a2ba1dae54 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/AppAttachPackageInner.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.desktopvirtualization.models.AppAttachPackageProperties; +import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySet; +import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; +import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; +import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Schema for App Attach Package properties. */ +@Fluent +public final class AppAttachPackageInner 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 App Attach Package + */ + @JsonProperty(value = "properties", required = true) + private AppAttachPackageProperties properties; + + /** Creates an instance of AppAttachPackageInner class. */ + public AppAttachPackageInner() { + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the 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; + } + + /** {@inheritDoc} */ + @Override + public AppAttachPackageInner withManagedBy(String managedBy) { + super.withManagedBy(managedBy); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppAttachPackageInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppAttachPackageInner withIdentity(ResourceModelWithAllowedPropertySetIdentity identity) { + super.withIdentity(identity); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppAttachPackageInner withSku(ResourceModelWithAllowedPropertySetSku sku) { + super.withSku(sku); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppAttachPackageInner withPlan(ResourceModelWithAllowedPropertySetPlan plan) { + super.withPlan(plan); + return this; + } + + /** {@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. + */ + @Override + public void validate() { + super.validate(); + if (properties() == null) { + throw LOGGER + .logExceptionAsError( + 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/ApplicationInner.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ApplicationInner.java index 95a3eee8def3..89a92521ef86 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 @@ -15,6 +15,8 @@ /** Schema for Application properties. */ @Fluent public final class ApplicationInner extends ProxyResource { + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + /* * Metadata pertaining to creation and last modification of the resource. */ @@ -330,7 +332,7 @@ public String iconHash() { * @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(); } /** 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..1c39bb2f22e2 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 @@ -12,6 +12,8 @@ /** Schema for Desktop properties. */ @Fluent public final class DesktopInner extends ProxyResource { + private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; + /* * Metadata pertaining to creation and last modification of the resource. */ @@ -116,7 +118,7 @@ public String iconHash() { * @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(); } /** 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..0d61449fd587 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 @@ -335,6 +335,52 @@ public ExpandMsixImageInner withPackageApplications(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; + /** Creates an instance of ExpandMsixImageProperties class. */ public ExpandMsixImageProperties() { } @@ -358,6 +370,46 @@ public ExpandMsixImageProperties withPackageApplications(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. * 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..243d2d8652db 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 @@ -98,6 +98,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. */ @@ -402,6 +408,15 @@ 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. * 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..91ec73605ed1 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageImpl.java @@ -0,0 +1,254 @@ +// Copyright (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 com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetIdentity; +import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetPlan; +import com.azure.resourcemanager.desktopvirtualization.models.ResourceModelWithAllowedPropertySetSku; +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 String managedBy() { + return this.innerModel().managedBy(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public ResourceModelWithAllowedPropertySetIdentity identity() { + return this.innerModel().identity(); + } + + public ResourceModelWithAllowedPropertySetSku sku() { + return this.innerModel().sku(); + } + + public ResourceModelWithAllowedPropertySetPlan plan() { + return this.innerModel().plan(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AppAttachPackageProperties properties() { + return this.innerModel().properties(); + } + + 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 = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.appAttachPackageName = Utils.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) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateAppAttachPackagePatch.withTags(tags); + return this; + } + } + + public AppAttachPackageImpl withManagedBy(String managedBy) { + this.innerModel().withManagedBy(managedBy); + return this; + } + + public AppAttachPackageImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public AppAttachPackageImpl withIdentity(ResourceModelWithAllowedPropertySetIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public AppAttachPackageImpl withSku(ResourceModelWithAllowedPropertySetSku sku) { + this.innerModel().withSku(sku); + return this; + } + + public AppAttachPackageImpl withPlan(ResourceModelWithAllowedPropertySetPlan plan) { + this.innerModel().withPlan(plan); + return this; + } + + public AppAttachPackageImpl withProperties(AppAttachPackagePatchProperties properties) { + this.updateAppAttachPackagePatch.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesClientImpl.java new file mode 100644 index 000000000000..665528465d6d --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesClientImpl.java @@ -0,0 +1,380 @@ +// Copyright (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..225c2d3cc3e6 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackageInfoesImpl.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.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 Utils.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 Utils.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..de0f2c941d96 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackagesClientImpl.java @@ -0,0 +1,1315 @@ +// Copyright (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, + @QueryParam("force") Boolean force, + @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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 arm object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 arm object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 arm object. + * @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 arm object. + * @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 arm object. + * @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 arm object. + * @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 arm object. + * @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 arm object. + * @param force Force flag to delete 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, Boolean force) { + 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, + force, + 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 arm object. + * @param force Force flag to delete 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, Boolean force, 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, + force, + 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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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) { + final Boolean force = null; + return deleteWithResponseAsync(resourceGroupName, appAttachPackageName, force).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 arm object. + * @param force Force flag to delete 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, Boolean force, Context context) { + return deleteWithResponseAsync(resourceGroupName, appAttachPackageName, force, 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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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) { + final Boolean force = null; + deleteWithResponse(resourceGroupName, appAttachPackageName, force, 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 arm object. + * @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 arm object. + * @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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 arm object. + * @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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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..f1ab7e15714d --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/AppAttachPackagesImpl.java @@ -0,0 +1,182 @@ +// Copyright (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 deleteWithResponse( + String resourceGroupName, String appAttachPackageName, Boolean force, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, appAttachPackageName, force, context); + } + + public void delete(String resourceGroupName, String appAttachPackageName) { + this.serviceClient().delete(resourceGroupName, appAttachPackageName); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.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 Utils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Context context) { + PagedIterable inner = this.serviceClient().list(filter, context); + return Utils.mapPage(inner, inner1 -> new AppAttachPackageImpl(inner1, this.manager())); + } + + public AppAttachPackage getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appAttachPackageName = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appAttachPackageName = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appAttachPackageName = Utils.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))); + } + Boolean localForce = null; + this.deleteWithResponse(resourceGroupName, appAttachPackageName, localForce, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Boolean force, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appAttachPackageName = Utils.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.deleteWithResponse(resourceGroupName, appAttachPackageName, force, 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/DesktopVirtualizationApiClientImpl.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/DesktopVirtualizationApiClientImpl.java index d56062c1038a..2e0e2e5f3f8c 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 @@ -22,6 +22,8 @@ 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; @@ -303,6 +305,18 @@ public MsixPackagesClient getMsixPackages() { return this.msixPackages; } + /** 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; @@ -315,6 +329,18 @@ 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. * @@ -337,7 +363,7 @@ public MsixImagesClient getMsixImages() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-09-05"; + this.apiVersion = "2023-10-04-preview"; this.operations = new OperationsClientImpl(this); this.workspaces = new WorkspacesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); @@ -353,7 +379,9 @@ 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); } /** 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..1ad765b0efad 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 @@ -98,6 +98,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..3a2639c5439f 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 @@ -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(); } 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..24673d3e7c7d 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 @@ -93,6 +93,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/Utils.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/implementation/Utils.java index d7ad6e805e92..75767cc4b7cb 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/Utils.java @@ -20,6 +20,9 @@ import reactor.core.publisher.Flux; final class Utils { + private Utils() { + } + 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 { @@ -133,30 +136,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 +198,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/models/AppAttachPackage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackage.java new file mode 100644 index 000000000000..a647d6865628 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackage.java @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.AppAttachPackageInner; +import java.util.Map; + +/** An immutable client-side representation of AppAttachPackage. */ +public interface AppAttachPackage { + /** + * 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(); + + /** + * 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 + * validate and persist this value. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the etag property: 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. + * + * @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. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the properties property: Detailed properties for App Attach Package. + * + * @return the properties value. + */ + AppAttachPackageProperties properties(); + + /** + * 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, + DefinitionStages.WithManagedBy, + DefinitionStages.WithKind, + DefinitionStages.WithIdentity, + DefinitionStages.WithSku, + DefinitionStages.WithPlan { + /** + * 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); + } + + /** The stage of the AppAttachPackage 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. + * @return the next definition stage. + */ + WithCreate withManagedBy(String managedBy); + } + + /** The stage of the AppAttachPackage 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 + * 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. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + + /** The stage of the AppAttachPackage 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 AppAttachPackage 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 AppAttachPackage 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); + } + } + + /** + * Begins update for the AppAttachPackage resource. + * + * @return the stage of resource update. + */ + AppAttachPackage.Update update(); + + /** The template for AppAttachPackage update. */ + interface Update extends UpdateStages.WithTags, 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 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 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..e6f3878b0e0e --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageArchitectures.java @@ -0,0 +1,62 @@ +// Copyright (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..3060d7f8c826 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoProperties.java @@ -0,0 +1,450 @@ +// Copyright (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..8270bb17f4f4 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageInfoes.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.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..9e58206a25d6 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageList.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.desktopvirtualization.fluent.models.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..8b33d4a302c4 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackagePatch.java @@ -0,0 +1,83 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Schema for patchable App Attach Package properties. */ +@Fluent +public final class AppAttachPackagePatch extends ProxyResource { + /* + * tags to be updated + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Detailed properties for App Attach Package + */ + @JsonProperty(value = "properties") + private AppAttachPackagePatchProperties properties; + + /** Creates an instance of AppAttachPackagePatch class. */ + public AppAttachPackagePatch() { + } + + /** + * Get the tags property: tags to be updated. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: tags to be updated. + * + * @param tags the tags value to set. + * @return the AppAttachPackagePatch object itself. + */ + public AppAttachPackagePatch withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * 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; + } + + /** + * 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..6250ff6d2abd --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackagePatchProperties.java @@ -0,0 +1,135 @@ +// Copyright (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 of keyvault location to store certificate + */ + @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 of keyvault location to store certificate. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Set the keyVaultUrl property: URL of keyvault location to store certificate. + * + * @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..0215365121ac --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/AppAttachPackageProperties.java @@ -0,0 +1,150 @@ +// Copyright (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 of keyvault location to store certificate + */ + @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 of keyvault location to store certificate. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Set the keyVaultUrl property: URL of keyvault location to store certificate. + * + * @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..1ce4365c0a6c --- /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 arm object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 arm object. + * @param force Force flag to delete 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 deleteWithResponse( + String resourceGroupName, String appAttachPackageName, Boolean force, 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 arm object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String 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 force Force flag to delete 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 deleteByIdWithResponse(String id, Boolean force, 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/ExpandMsixImage.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ExpandMsixImage.java index a70dcd0f08cd..64c2f347020b 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 @@ -123,6 +123,20 @@ public interface ExpandMsixImage { */ 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. * 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..7dbe4f3fdaff --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/FailHealthCheckOnStagingFailure.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** 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/HostPool.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/HostPool.java index 2e2df0ffcb0b..dde1b4c9b219 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 @@ -197,6 +197,13 @@ public interface HostPool { */ 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. * 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..1cf094d307cc 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 @@ -100,6 +100,13 @@ public interface HostPoolProperties { */ 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. * 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..a13128027564 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ImportPackageInfoRequest.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.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/PackageTimestamped.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PackageTimestamped.java new file mode 100644 index 000000000000..8e78d99bab49 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/PackageTimestamped.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.desktopvirtualization.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** 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/ProvisioningState.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ProvisioningState.java new file mode 100644 index 000000000000..476482310afb --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/models/ProvisioningState.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; + +/** 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/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..e870014375a7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageCreateOrUpdateSamples.java @@ -0,0 +1,72 @@ +// Copyright (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/preview/2023-10-04-preview/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..8a037a5a53a4 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageDeleteSamples.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 Delete. */ +public final class AppAttachPackageDeleteSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/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() + .deleteWithResponse("resourceGroup1", "packagefullname", null, 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..9d6e3acddbec --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageGetByResourceGroupSamples.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 GetByResourceGroup. */ +public final class AppAttachPackageGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/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..8f415ece9e8d --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageInfoImportMethodSamples.java @@ -0,0 +1,32 @@ +// Copyright (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/preview/2023-10-04-preview/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..3b54e6445e40 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListByResourceGroupSamples.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 ListByResourceGroup. */ +public final class AppAttachPackageListByResourceGroupSamples { + /* + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/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..d5809bfe6d35 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageListSamples.java @@ -0,0 +1,21 @@ +// Copyright (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/preview/2023-10-04-preview/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..c309b4c198e4 --- /dev/null +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/AppAttachPackageUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (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/preview/2023-10-04-preview/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..671cf5a80acb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ApplicationGroups CreateOrUpdate. */ public final class ApplicationGroupsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Create.json */ /** * Sample code: ApplicationGroup_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java index 60108384f45c..83496bcfe4b4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups Delete. */ public final class ApplicationGroupsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Delete.json */ /** * Sample code: ApplicationGroup_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java index bf74645cc6ac..9204b017ca72 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups GetByResourceGroup. */ public final class ApplicationGroupsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Get.json */ /** * Sample code: ApplicationGroup_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java index f4860929fe98..b2757b604c0f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups ListByResourceGroup. */ public final class ApplicationGroupsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_ListByResourceGroup.json */ /** * Sample code: ApplicationGroup_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java index 4be0ec5be229..dd2fba55f863 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ApplicationGroups List. */ public final class ApplicationGroupsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_ListBySubscription.json */ /** * Sample code: ApplicationGroup_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java index d947de84a414..cfdebf4f3429 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationGroupsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ApplicationGroups Update. */ public final class ApplicationGroupsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ApplicationGroup_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ApplicationGroup_Update.json */ /** * Sample code: ApplicationGroups_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java index 9cb6306bac21..36556e96ac3d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Applications CreateOrUpdate. */ public final class ApplicationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Create.json */ /** * Sample code: Application_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java index a08d501719e0..03ab60680d59 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Delete.json */ /** * Sample code: Application_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java index a5e9be9340d2..8f7d77b026f9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Get.json */ /** * Sample code: Application_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java index 0acf2a3e579d..f38a877b7603 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Applications List. */ public final class ApplicationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_List.json */ /** * Sample code: Applications_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java index ad21688194c5..98f65472744c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ApplicationsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Applications Update. */ public final class ApplicationsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Application_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Application_Update.json */ /** * Sample code: Application_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java index 6ee3076ede97..2e4afa3f2f0c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Desktops Get. */ public final class DesktopsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Get.json */ /** * Sample code: Desktop_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java index 76dd322caec7..5fcedfd725f4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Desktops List. */ public final class DesktopsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_List.json */ /** * Sample code: Desktop_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java index fd3ce680eb4d..f03d52212b10 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/DesktopsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Desktops Update. */ public final class DesktopsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Desktop_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Desktop_Update.json */ /** * Sample code: Desktop_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java index aebcc181e4f4..51c4ef90d2ca 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsCreateOrUpdateSamples.java @@ -23,7 +23,7 @@ /** Samples for HostPools CreateOrUpdate. */ public final class HostPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Create.json */ /** * Sample code: HostPool_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..e7669d4b1140 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools Delete. */ public final class HostPoolsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Delete.json */ /** * Sample code: HostPool_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java index 8ab5ce0650e0..29aaae494937 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools GetByResourceGroup. */ public final class HostPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Get.json */ /** * Sample code: HostPool_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java index 8f8a1916a901..f8f4b1431cd9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools ListByResourceGroup. */ public final class HostPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_ListByResourceGroup.json */ /** * Sample code: HostPool_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java index e4edb9ceea55..adf8b1e49d6a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsListSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools List. */ public final class HostPoolsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_List.json */ /** * Sample code: HostPool_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java index 516b1e4c3329..e6db20200846 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsRetrieveRegistrationTokenSamples.java @@ -7,7 +7,7 @@ /** Samples for HostPools RetrieveRegistrationToken. */ public final class HostPoolsRetrieveRegistrationTokenSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPools_RetrieveRegistrationToken_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPools_RetrieveRegistrationToken_Post.json */ /** * Sample code: HostPools_RetrieveRegistrationToken_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java index 171045fcfb64..dd2b23ae5809 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/HostPoolsUpdateSamples.java @@ -22,7 +22,7 @@ /** Samples for HostPools Update. */ public final class HostPoolsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/HostPool_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/HostPool_Update.json */ /** * Sample code: HostPool_Update. 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..11b85172bc5a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixImagesExpandSamples.java @@ -9,7 +9,7 @@ /** Samples for MsixImages Expand. */ public final class MsixImagesExpandSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixImage_Expand_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixImage_Expand_Post.json */ /** * Sample code: MsixImage_Expand. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java index 7eb05104702e..0054b5b7e4eb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for MsixPackages CreateOrUpdate. */ public final class MsixPackagesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Create.json */ /** * Sample code: MSIXPackage_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java index 3535f5d6c93d..9c8d7593dce3 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for MsixPackages Delete. */ public final class MsixPackagesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Delete.json */ /** * Sample code: MSIXPackage_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java index d74c26d6d288..eb7a6364bebc 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for MsixPackages Get. */ public final class MsixPackagesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Get.json */ /** * Sample code: MSIXPackage_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java index f45e7e5ede6c..6e1119afe663 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesListSamples.java @@ -7,7 +7,7 @@ /** Samples for MsixPackages List. */ public final class MsixPackagesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_List.json */ /** * Sample code: MSIXPackage_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java index 671bd72e6eb4..078368eaa475 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/MsixPackagesUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for MsixPackages Update. */ public final class MsixPackagesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/MsixPackage_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/MsixPackage_Update.json */ /** * Sample code: MSIXPackage_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java index 28b0226815cc..ffddeabc44df 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/OperationDescription_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/OperationDescription_List.json */ /** * Sample code: OperationDescription_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByHostPoolSamples.java index e32cfef70403..e61b496d8799 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_DeleteByHostPool.json */ /** * Sample code: PrivateEndpointConnection_DeleteByHostPool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsDeleteByWorkspaceSamples.java index 69f4b8e0ed9e..81ffaf8d7777 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_DeleteByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_DeleteByWorkspace. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByHostPoolSamples.java index e48da89af70a..d47c6028dddd 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByHostPool.json */ /** * Sample code: PrivateEndpointConnection_GetByHostPool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsGetByWorkspaceSamples.java index 8f3e3d4ff540..092aa7e2d326 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_GetByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_GetByWorkspace. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsListByHostPoolSamples.java index 58ed915c64e5..d11eaed811c6 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_ListByHostPool.json */ /** * Sample code: PrivateEndpointConnection_ListByHostPool. 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..591def624f7a 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_ListByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_ListByWorkspace. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByHostPoolSamples.java index 309d8ccbcd6a..2d43a43b1d29 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 @@ -11,7 +11,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByHostPool.json */ /** * Sample code: PrivateEndpointConnection_UpdateByHostPool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateEndpointConnectionsUpdateByWorkspaceSamples.java index 7e351104dba2..aa02b9ccc277 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 @@ -11,7 +11,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateEndpointConnection_UpdateByWorkspace.json */ /** * Sample code: PrivateEndpointConnection_UpdateByWorkspace. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/PrivateLinkResourcesListByHostPoolSamples.java index b7d07c4ea030..7dd11bec94fb 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateLinkResources_ListByHostPool.json */ /** * Sample code: PrivateLinkResources_ListByHostPool. 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..27e38889dd5b 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/PrivateLinkResources_ListByWorkspace.json */ /** * Sample code: PrivateLinkResources_ListByWorkspace. 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..af19b19b118b 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 @@ -14,7 +14,7 @@ /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Create.json */ /** * Sample code: ScalingPlanPersonalSchedules_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPersonalSchedulesDeleteSamples.java index 0c88ba2659ba..1562aea5340b 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Delete.json */ /** * Sample code: ScalingPlanPersonalSchedules_Delete. 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..0bcad5856f51 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Get.json */ /** * Sample code: ScalingPlanPersonalSchedules_Get. 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..61493b4287db 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 @@ -7,7 +7,7 @@ /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_List.json */ /** * Sample code: ScalingPlanPersonalSchedules_List. 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..9e3ab6622ca2 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 @@ -12,7 +12,7 @@ /** 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/preview/2023-10-04-preview/examples/ScalingPlanPersonalSchedule_Update.json */ /** * Sample code: ScalingPlanPersonalSchedules_Update. 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..3f9b2cfab13d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesCreateSamples.java @@ -12,7 +12,7 @@ /** Samples for ScalingPlanPooledSchedules Create. */ public final class ScalingPlanPooledSchedulesCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Create.json */ /** * Sample code: ScalingPlanPooledSchedules_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java index 73c7fe42a09d..5e242f7d8e94 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlanPooledSchedules Delete. */ public final class ScalingPlanPooledSchedulesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Delete.json */ /** * Sample code: ScalingPlanPooledSchedules_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java index c709d6102088..90117547e0a9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlanPooledSchedules Get. */ public final class ScalingPlanPooledSchedulesGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Get.json */ /** * Sample code: ScalingPlanPooledSchedules_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java index 695c3fb9c5bb..93204cf3986d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlanPooledSchedules List. */ public final class ScalingPlanPooledSchedulesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_List.json */ /** * Sample code: ScalingPlanPooledSchedules_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java index f9d99313f570..04832d25466c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlanPooledSchedulesUpdateSamples.java @@ -13,7 +13,7 @@ /** Samples for ScalingPlanPooledSchedules Update. */ public final class ScalingPlanPooledSchedulesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlanPooledSchedule_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlanPooledSchedule_Update.json */ /** * Sample code: ScalingPlanPooledSchedules_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java index a6b224a2857f..324f7a0ba5b8 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansCreateSamples.java @@ -17,7 +17,7 @@ /** Samples for ScalingPlans Create. */ public final class ScalingPlansCreateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Create.json */ /** * Sample code: ScalingPlans_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..4cc54116e539 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans Delete. */ public final class ScalingPlansDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Delete.json */ /** * Sample code: ScalingPlans_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java index fcb015cb26c0..9734d8202782 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans GetByResourceGroup. */ public final class ScalingPlansGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Get.json */ /** * Sample code: ScalingPlans_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java index 0a6e860ab3b6..77523d0476eb 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByHostPoolSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans ListByHostPool. */ public final class ScalingPlansListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_ListByHostPool.json */ /** * Sample code: ScalingPlan_ListByHostPool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java index c8e8b6ddc8e3..1d9ed41d489f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans ListByResourceGroup. */ public final class ScalingPlansListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_ListByResourceGroup.json */ /** * Sample code: ScalingPlans_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java index 5f37f255b8d4..c0a8ae3b6886 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansListSamples.java @@ -7,7 +7,7 @@ /** Samples for ScalingPlans List. */ public final class ScalingPlansListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_ListBySubscription.json */ /** * Sample code: ScalingPlans_ListBySubscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java index 40f559c3dd7a..f1c599228da4 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/ScalingPlansUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for ScalingPlans Update. */ public final class ScalingPlansUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/ScalingPlan_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/ScalingPlan_Update.json */ /** * Sample code: ScalingPlans_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java index dd743a3e0a72..948cbb9363fe 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for SessionHosts Delete. */ public final class SessionHostsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Delete.json */ /** * Sample code: SessionHost_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java index 9357f442e991..feaa7bdb151f 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for SessionHosts Get. */ public final class SessionHostsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Get.json */ /** * Sample code: SessionHost_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java index a173fc7631fb..571838f83327 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsListSamples.java @@ -7,7 +7,7 @@ /** Samples for SessionHosts List. */ public final class SessionHostsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_List.json */ /** * Sample code: SessionHost_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java index 94607d6a7c12..a86cf28b515a 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/SessionHostsUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for SessionHosts Update. */ public final class SessionHostsUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/SessionHost_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/SessionHost_Update.json */ /** * Sample code: SessionHost_Update. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java index aac9de967e81..1bb2cb1f98d9 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/StartMenuItemsListSamples.java @@ -7,7 +7,7 @@ /** Samples for StartMenuItems List. */ public final class StartMenuItemsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/StartMenuItem_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/StartMenuItem_List.json */ /** * Sample code: StartMenuItem_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java index b6d8cb96e044..38aacf074916 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions Delete. */ public final class UserSessionsDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Delete.json */ /** * Sample code: UserSession_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java index d8ca961dd9af..aa1b0ac39840 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsDisconnectSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions Disconnect. */ public final class UserSessionsDisconnectSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Disconnect_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Disconnect_Post.json */ /** * Sample code: UserSession_Disconnect_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java index 063dcb23c53c..f6abeb5f2040 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions Get. */ public final class UserSessionsGetSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_Get.json */ /** * Sample code: UserSession_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java index 743af2364466..fba801bd577d 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListByHostPoolSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions ListByHostPool. */ public final class UserSessionsListByHostPoolSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_ListByHostPool.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_ListByHostPool.json */ /** * Sample code: UserSession_ListByHostPool. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java index b1ad5dc1c671..9e0ebbd75d9c 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for UserSessions List. */ public final class UserSessionsListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_List.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_List.json */ /** * Sample code: UserSession_List. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java index 1927a382d8f1..4e48d2c0a691 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/UserSessionsSendMessageSamples.java @@ -9,7 +9,7 @@ /** Samples for UserSessions SendMessage. */ public final class UserSessionsSendMessageSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/UserSession_SendMessage_Post.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/UserSession_SendMessage_Post.json */ /** * Sample code: UserSession_SendMessage_Post. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java index d00760de9e64..42f51c338cb0 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for Workspaces CreateOrUpdate. */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Create.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Create.json */ /** * Sample code: Workspace_Create. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java index 6e94a24b977d..1045dc97ca79 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces Delete. */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Delete.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Delete.json */ /** * Sample code: Workspace_Delete. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java index 0d4bb1ef6d29..92ca2413989e 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces GetByResourceGroup. */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Get.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Get.json */ /** * Sample code: Workspace_Get. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java index e19d22123052..519e9c5d2c66 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces ListByResourceGroup. */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListByResourceGroup.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_ListByResourceGroup.json */ /** * Sample code: Workspace_ListByResourceGroup. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java index b319baabb4c3..49a3a772a986 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Workspaces List. */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_ListBySubscription.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_ListBySubscription.json */ /** * Sample code: Workspace_ListBySubscription. diff --git a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java index 24be100cd849..a554616a7d55 100644 --- a/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java +++ b/sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/samples/java/com/azure/resourcemanager/desktopvirtualization/generated/WorkspacesUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Workspaces Update. */ public final class WorkspacesUpdateSamples { /* - * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2023-09-05/examples/Workspace_Update.json + * x-ms-original-file: specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/preview/2023-10-04-preview/examples/Workspace_Update.json */ /** * Sample code: Workspace_Update. 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); - } -}