diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md b/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md index 700e1576f74c8..a5177d1ccb531 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md +++ b/sdk/devcenter/azure-resourcemanager-devcenter/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2023-03-16) + +- Azure Resource Manager DevCenter client library for Java. This package contains Microsoft Azure SDK for DevCenter Management SDK. DevCenter Management API. Package tag package-preview-2023-01. 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/devcenter/azure-resourcemanager-devcenter/README.md b/sdk/devcenter/azure-resourcemanager-devcenter/README.md index 78e175bfd60ec..8240b4dc2c4cd 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/README.md +++ b/sdk/devcenter/azure-resourcemanager-devcenter/README.md @@ -2,7 +2,7 @@ Azure Resource Manager DevCenter client library for Java. -This package contains Microsoft Azure SDK for DevCenter Management SDK. DevCenter Management API. Package tag package-preview-2022-11. 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 DevCenter Management SDK. DevCenter Management API. Package tag package-preview-2023-01. 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-devcenter - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md b/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md index 956497322faf7..93d74894008c0 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md +++ b/sdk/devcenter/azure-resourcemanager-devcenter/SAMPLE.md @@ -77,6 +77,7 @@ - [List](#networkconnections_list) - [ListByResourceGroup](#networkconnections_listbyresourcegroup) - [ListHealthDetails](#networkconnections_listhealthdetails) +- [ListOutboundNetworkDependenciesEndpoints](#networkconnections_listoutboundnetworkdependenciesendpoints) - [RunHealthChecks](#networkconnections_runhealthchecks) - [Update](#networkconnections_update) @@ -94,6 +95,7 @@ - [Delete](#pools_delete) - [Get](#pools_get) - [ListByProject](#pools_listbyproject) +- [RunHealthChecks](#pools_runhealthchecks) - [Update](#pools_update) ## ProjectAllowedEnvironmentTypes @@ -129,17 +131,13 @@ ## Skus - [List](#skus_list) - -## Usages - -- [ListByLocation](#usages_listbylocation) ### AttachedNetworks_CreateOrUpdate ```java /** Samples for AttachedNetworks CreateOrUpdate. */ public final class AttachedNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_Create.json */ /** * Sample code: AttachedNetworks_Create. @@ -161,12 +159,10 @@ public final class AttachedNetworksCreateOrUpdateSamples { ### AttachedNetworks_Delete ```java -import com.azure.core.util.Context; - /** Samples for AttachedNetworks Delete. */ public final class AttachedNetworksDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_Delete.json */ /** * Sample code: AttachedNetworks_Delete. @@ -174,7 +170,7 @@ public final class AttachedNetworksDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().delete("rg1", "Contoso", "network-uswest3", Context.NONE); + manager.attachedNetworks().delete("rg1", "Contoso", "network-uswest3", com.azure.core.util.Context.NONE); } } ``` @@ -182,12 +178,10 @@ public final class AttachedNetworksDeleteSamples { ### AttachedNetworks_GetByDevCenter ```java -import com.azure.core.util.Context; - /** Samples for AttachedNetworks GetByDevCenter. */ public final class AttachedNetworksGetByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_GetByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_GetByDevCenter.json */ /** * Sample code: AttachedNetworks_GetByDevCenter. @@ -195,7 +189,9 @@ public final class AttachedNetworksGetByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksGetByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().getByDevCenterWithResponse("rg1", "Contoso", "network-uswest3", Context.NONE); + manager + .attachedNetworks() + .getByDevCenterWithResponse("rg1", "Contoso", "network-uswest3", com.azure.core.util.Context.NONE); } } ``` @@ -203,12 +199,10 @@ public final class AttachedNetworksGetByDevCenterSamples { ### AttachedNetworks_GetByProject ```java -import com.azure.core.util.Context; - /** Samples for AttachedNetworks GetByProject. */ public final class AttachedNetworksGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_GetByProject.json */ /** * Sample code: AttachedNetworks_GetByProject. @@ -216,7 +210,9 @@ public final class AttachedNetworksGetByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksGetByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().getByProjectWithResponse("rg1", "DevProject", "network-uswest3", Context.NONE); + manager + .attachedNetworks() + .getByProjectWithResponse("rg1", "DevProject", "network-uswest3", com.azure.core.util.Context.NONE); } } ``` @@ -224,12 +220,10 @@ public final class AttachedNetworksGetByProjectSamples { ### AttachedNetworks_ListByDevCenter ```java -import com.azure.core.util.Context; - /** Samples for AttachedNetworks ListByDevCenter. */ public final class AttachedNetworksListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_ListByDevCenter.json */ /** * Sample code: AttachedNetworks_ListByDevCenter. @@ -237,7 +231,7 @@ public final class AttachedNetworksListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.attachedNetworks().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -245,12 +239,10 @@ public final class AttachedNetworksListByDevCenterSamples { ### AttachedNetworks_ListByProject ```java -import com.azure.core.util.Context; - /** Samples for AttachedNetworks ListByProject. */ public final class AttachedNetworksListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_ListByProject.json */ /** * Sample code: AttachedNetworks_ListByProject. @@ -258,7 +250,7 @@ public final class AttachedNetworksListByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksListByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().listByProject("rg1", "DevProject", null, Context.NONE); + manager.attachedNetworks().listByProject("rg1", "DevProject", null, com.azure.core.util.Context.NONE); } } ``` @@ -271,7 +263,7 @@ import com.azure.resourcemanager.devcenter.models.GitCatalog; /** Samples for Catalogs CreateOrUpdate. */ public final class CatalogsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_CreateAdo.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_CreateAdo.json */ /** * Sample code: Catalogs_CreateOrUpdateAdo. @@ -293,7 +285,7 @@ public final class CatalogsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_CreateGitHub.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_CreateGitHub.json */ /** * Sample code: Catalogs_CreateOrUpdateGitHub. @@ -319,12 +311,10 @@ public final class CatalogsCreateOrUpdateSamples { ### Catalogs_Delete ```java -import com.azure.core.util.Context; - /** Samples for Catalogs Delete. */ public final class CatalogsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Delete.json */ /** * Sample code: Catalogs_Delete. @@ -332,7 +322,7 @@ public final class CatalogsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().delete("rg1", "Contoso", "CentralCatalog", Context.NONE); + manager.catalogs().delete("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); } } ``` @@ -340,12 +330,10 @@ public final class CatalogsDeleteSamples { ### Catalogs_Get ```java -import com.azure.core.util.Context; - /** Samples for Catalogs Get. */ public final class CatalogsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Get.json */ /** * Sample code: Catalogs_Get. @@ -353,7 +341,7 @@ public final class CatalogsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().getWithResponse("rg1", "Contoso", "CentralCatalog", Context.NONE); + manager.catalogs().getWithResponse("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); } } ``` @@ -361,12 +349,10 @@ public final class CatalogsGetSamples { ### Catalogs_ListByDevCenter ```java -import com.azure.core.util.Context; - /** Samples for Catalogs ListByDevCenter. */ public final class CatalogsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_List.json */ /** * Sample code: Catalogs_ListByDevCenter. @@ -374,7 +360,7 @@ public final class CatalogsListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.catalogs().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -382,12 +368,10 @@ public final class CatalogsListByDevCenterSamples { ### Catalogs_Sync ```java -import com.azure.core.util.Context; - /** Samples for Catalogs Sync. */ public final class CatalogsSyncSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Sync.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Sync.json */ /** * Sample code: Catalogs_Sync. @@ -395,7 +379,7 @@ public final class CatalogsSyncSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsSync(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().sync("rg1", "Contoso", "CentralCatalog", Context.NONE); + manager.catalogs().sync("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); } } ``` @@ -403,14 +387,13 @@ public final class CatalogsSyncSamples { ### Catalogs_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Catalog; import com.azure.resourcemanager.devcenter.models.GitCatalog; /** Samples for Catalogs Update. */ public final class CatalogsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Patch.json */ /** * Sample code: Catalogs_Update. @@ -419,7 +402,10 @@ public final class CatalogsUpdateSamples { */ public static void catalogsUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { Catalog resource = - manager.catalogs().getWithResponse("rg1", "Contoso", "CentralCatalog", Context.NONE).getValue(); + manager + .catalogs() + .getWithResponse("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withGitHub(new GitCatalog().withPath("/environments")).apply(); } } @@ -428,13 +414,12 @@ public final class CatalogsUpdateSamples { ### CheckNameAvailability_Execute ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityRequest; /** Samples for CheckNameAvailability Execute. */ public final class CheckNameAvailabilityExecuteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/CheckNameAvailability.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: NameAvailability. @@ -446,7 +431,7 @@ public final class CheckNameAvailabilityExecuteSamples { .checkNameAvailabilities() .executeWithResponse( new CheckNameAvailabilityRequest().withName("name1").withType("Microsoft.DevCenter/devcenters"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -461,7 +446,7 @@ import com.azure.resourcemanager.devcenter.models.Sku; /** Samples for DevBoxDefinitions CreateOrUpdate. */ public final class DevBoxDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Create.json */ /** * Sample code: DevBoxDefinitions_Create. @@ -479,7 +464,6 @@ public final class DevBoxDefinitionsCreateOrUpdateSamples { .withId( "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0")) .withSku(new Sku().withName("Preview")) - .withOsStorageType("SSD_1024") .withHibernateSupport(HibernateSupport.ENABLED) .create(); } @@ -489,12 +473,10 @@ public final class DevBoxDefinitionsCreateOrUpdateSamples { ### DevBoxDefinitions_Delete ```java -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions Delete. */ public final class DevBoxDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Delete.json */ /** * Sample code: DevBoxDefinitions_Delete. @@ -502,7 +484,7 @@ public final class DevBoxDefinitionsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().delete("rg1", "Contoso", "WebDevBox", Context.NONE); + manager.devBoxDefinitions().delete("rg1", "Contoso", "WebDevBox", com.azure.core.util.Context.NONE); } } ``` @@ -510,12 +492,10 @@ public final class DevBoxDefinitionsDeleteSamples { ### DevBoxDefinitions_Get ```java -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions Get. */ public final class DevBoxDefinitionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Get.json */ /** * Sample code: DevBoxDefinitions_Get. @@ -523,7 +503,7 @@ public final class DevBoxDefinitionsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().getWithResponse("rg1", "Contoso", "WebDevBox", Context.NONE); + manager.devBoxDefinitions().getWithResponse("rg1", "Contoso", "WebDevBox", com.azure.core.util.Context.NONE); } } ``` @@ -531,12 +511,10 @@ public final class DevBoxDefinitionsGetSamples { ### DevBoxDefinitions_GetByProject ```java -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions GetByProject. */ public final class DevBoxDefinitionsGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_GetByProject.json */ /** * Sample code: DevBoxDefinitions_GetByProject. @@ -544,7 +522,9 @@ public final class DevBoxDefinitionsGetByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsGetByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().getByProjectWithResponse("rg1", "ContosoProject", "WebDevBox", Context.NONE); + manager + .devBoxDefinitions() + .getByProjectWithResponse("rg1", "ContosoProject", "WebDevBox", com.azure.core.util.Context.NONE); } } ``` @@ -552,12 +532,10 @@ public final class DevBoxDefinitionsGetByProjectSamples { ### DevBoxDefinitions_ListByDevCenter ```java -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions ListByDevCenter. */ public final class DevBoxDefinitionsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_ListByDevCenter.json */ /** * Sample code: DevBoxDefinitions_ListByDevCenter. @@ -565,7 +543,7 @@ public final class DevBoxDefinitionsListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.devBoxDefinitions().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -573,12 +551,10 @@ public final class DevBoxDefinitionsListByDevCenterSamples { ### DevBoxDefinitions_ListByProject ```java -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions ListByProject. */ public final class DevBoxDefinitionsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_ListByProject.json */ /** * Sample code: DevBoxDefinitions_ListByProject. @@ -586,7 +562,7 @@ public final class DevBoxDefinitionsListByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsListByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().listByProject("rg1", "ContosoProject", null, Context.NONE); + manager.devBoxDefinitions().listByProject("rg1", "ContosoProject", null, com.azure.core.util.Context.NONE); } } ``` @@ -594,14 +570,13 @@ public final class DevBoxDefinitionsListByProjectSamples { ### DevBoxDefinitions_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.DevBoxDefinition; import com.azure.resourcemanager.devcenter.models.ImageReference; /** Samples for DevBoxDefinitions Update. */ public final class DevBoxDefinitionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Patch.json */ /** * Sample code: DevBoxDefinitions_Patch. @@ -610,7 +585,10 @@ public final class DevBoxDefinitionsUpdateSamples { */ public static void devBoxDefinitionsPatch(com.azure.resourcemanager.devcenter.DevCenterManager manager) { DevBoxDefinition resource = - manager.devBoxDefinitions().getWithResponse("rg1", "Contoso", "WebDevBox", Context.NONE).getValue(); + manager + .devBoxDefinitions() + .getWithResponse("rg1", "Contoso", "WebDevBox", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withImageReference( @@ -634,7 +612,7 @@ import java.util.Map; /** Samples for DevCenters CreateOrUpdate. */ public final class DevCentersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Create.json */ /** * Sample code: DevCenters_Create. @@ -652,7 +630,7 @@ public final class DevCentersCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_CreateWithUserIdentity.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_CreateWithUserIdentity.json */ /** * Sample code: DevCenters_CreateWithUserIdentity. @@ -692,12 +670,10 @@ public final class DevCentersCreateOrUpdateSamples { ### DevCenters_Delete ```java -import com.azure.core.util.Context; - /** Samples for DevCenters Delete. */ public final class DevCentersDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Delete.json */ /** * Sample code: DevCenters_Delete. @@ -705,7 +681,7 @@ public final class DevCentersDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().delete("rg1", "Contoso", Context.NONE); + manager.devCenters().delete("rg1", "Contoso", com.azure.core.util.Context.NONE); } } ``` @@ -713,12 +689,10 @@ public final class DevCentersDeleteSamples { ### DevCenters_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for DevCenters GetByResourceGroup. */ public final class DevCentersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Get.json */ /** * Sample code: DevCenters_Get. @@ -726,7 +700,7 @@ public final class DevCentersGetByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().getByResourceGroupWithResponse("rg1", "Contoso", Context.NONE); + manager.devCenters().getByResourceGroupWithResponse("rg1", "Contoso", com.azure.core.util.Context.NONE); } } ``` @@ -734,12 +708,10 @@ public final class DevCentersGetByResourceGroupSamples { ### DevCenters_List ```java -import com.azure.core.util.Context; - /** Samples for DevCenters List. */ public final class DevCentersListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_ListBySubscription.json */ /** * Sample code: DevCenters_ListBySubscription. @@ -747,7 +719,7 @@ public final class DevCentersListSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersListBySubscription(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().list(null, Context.NONE); + manager.devCenters().list(null, com.azure.core.util.Context.NONE); } } ``` @@ -755,12 +727,10 @@ public final class DevCentersListSamples { ### DevCenters_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for DevCenters ListByResourceGroup. */ public final class DevCentersListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_ListByResourceGroup.json */ /** * Sample code: DevCenters_ListByResourceGroup. @@ -768,7 +738,7 @@ public final class DevCentersListByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersListByResourceGroup(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().listByResourceGroup("rg1", null, Context.NONE); + manager.devCenters().listByResourceGroup("rg1", null, com.azure.core.util.Context.NONE); } } ``` @@ -776,7 +746,6 @@ public final class DevCentersListByResourceGroupSamples { ### DevCenters_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.DevCenter; import java.util.HashMap; import java.util.Map; @@ -784,7 +753,7 @@ import java.util.Map; /** Samples for DevCenters Update. */ public final class DevCentersUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Patch.json */ /** * Sample code: DevCenters_Update. @@ -793,7 +762,10 @@ public final class DevCentersUpdateSamples { */ public static void devCentersUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { DevCenter resource = - manager.devCenters().getByResourceGroupWithResponse("rg1", "Contoso", Context.NONE).getValue(); + manager + .devCenters() + .getByResourceGroupWithResponse("rg1", "Contoso", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("CostCode", "12345")).apply(); } @@ -819,7 +791,7 @@ import java.util.Map; /** Samples for EnvironmentTypes CreateOrUpdate. */ public final class EnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Put.json */ /** * Sample code: EnvironmentTypes_CreateOrUpdate. @@ -851,12 +823,10 @@ public final class EnvironmentTypesCreateOrUpdateSamples { ### EnvironmentTypes_Delete ```java -import com.azure.core.util.Context; - /** Samples for EnvironmentTypes Delete. */ public final class EnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Delete.json */ /** * Sample code: EnvironmentTypes_Delete. @@ -864,7 +834,7 @@ public final class EnvironmentTypesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void environmentTypesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.environmentTypes().deleteWithResponse("rg1", "Contoso", "DevTest", Context.NONE); + manager.environmentTypes().deleteWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE); } } ``` @@ -872,12 +842,10 @@ public final class EnvironmentTypesDeleteSamples { ### EnvironmentTypes_Get ```java -import com.azure.core.util.Context; - /** Samples for EnvironmentTypes Get. */ public final class EnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Get.json */ /** * Sample code: EnvironmentTypes_Get. @@ -885,7 +853,7 @@ public final class EnvironmentTypesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void environmentTypesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.environmentTypes().getWithResponse("rg1", "Contoso", "DevTest", Context.NONE); + manager.environmentTypes().getWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE); } } ``` @@ -893,12 +861,10 @@ public final class EnvironmentTypesGetSamples { ### EnvironmentTypes_ListByDevCenter ```java -import com.azure.core.util.Context; - /** Samples for EnvironmentTypes ListByDevCenter. */ public final class EnvironmentTypesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_List.json */ /** * Sample code: EnvironmentTypes_ListByDevCenter. @@ -906,7 +872,7 @@ public final class EnvironmentTypesListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void environmentTypesListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.environmentTypes().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.environmentTypes().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -914,7 +880,6 @@ public final class EnvironmentTypesListByDevCenterSamples { ### EnvironmentTypes_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.EnvironmentType; import java.util.HashMap; import java.util.Map; @@ -922,7 +887,7 @@ import java.util.Map; /** Samples for EnvironmentTypes Update. */ public final class EnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Patch.json */ /** * Sample code: EnvironmentTypes_Update. @@ -931,7 +896,10 @@ public final class EnvironmentTypesUpdateSamples { */ public static void environmentTypesUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { EnvironmentType resource = - manager.environmentTypes().getWithResponse("rg1", "Contoso", "DevTest", Context.NONE).getValue(); + manager + .environmentTypes() + .getWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Owner", "superuser")).apply(); } @@ -954,7 +922,7 @@ public final class EnvironmentTypesUpdateSamples { /** Samples for Galleries CreateOrUpdate. */ public final class GalleriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_Create.json */ /** * Sample code: Galleries_CreateOrUpdate. @@ -976,12 +944,10 @@ public final class GalleriesCreateOrUpdateSamples { ### Galleries_Delete ```java -import com.azure.core.util.Context; - /** Samples for Galleries Delete. */ public final class GalleriesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_Delete.json */ /** * Sample code: Galleries_Delete. @@ -989,7 +955,7 @@ public final class GalleriesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void galleriesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.galleries().delete("rg1", "Contoso", "StandardGallery", Context.NONE); + manager.galleries().delete("rg1", "Contoso", "StandardGallery", com.azure.core.util.Context.NONE); } } ``` @@ -997,12 +963,10 @@ public final class GalleriesDeleteSamples { ### Galleries_Get ```java -import com.azure.core.util.Context; - /** Samples for Galleries Get. */ public final class GalleriesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_Get.json */ /** * Sample code: Galleries_Get. @@ -1010,7 +974,7 @@ public final class GalleriesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void galleriesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.galleries().getWithResponse("rg1", "Contoso", "StandardGallery", Context.NONE); + manager.galleries().getWithResponse("rg1", "Contoso", "StandardGallery", com.azure.core.util.Context.NONE); } } ``` @@ -1018,12 +982,10 @@ public final class GalleriesGetSamples { ### Galleries_ListByDevCenter ```java -import com.azure.core.util.Context; - /** Samples for Galleries ListByDevCenter. */ public final class GalleriesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_List.json */ /** * Sample code: Galleries_ListByDevCenter. @@ -1031,7 +993,7 @@ public final class GalleriesListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void galleriesListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.galleries().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.galleries().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -1039,12 +1001,10 @@ public final class GalleriesListByDevCenterSamples { ### ImageVersions_Get ```java -import com.azure.core.util.Context; - /** Samples for ImageVersions Get. */ public final class ImageVersionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ImageVersions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ImageVersions_Get.json */ /** * Sample code: Versions_Get. @@ -1052,7 +1012,9 @@ public final class ImageVersionsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void versionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.imageVersions().getWithResponse("rg1", "Contoso", "DefaultDevGallery", "Win11", "1.0.0", Context.NONE); + manager + .imageVersions() + .getWithResponse("rg1", "Contoso", "DefaultDevGallery", "Win11", "1.0.0", com.azure.core.util.Context.NONE); } } ``` @@ -1060,12 +1022,10 @@ public final class ImageVersionsGetSamples { ### ImageVersions_ListByImage ```java -import com.azure.core.util.Context; - /** Samples for ImageVersions ListByImage. */ public final class ImageVersionsListByImageSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ImageVersions_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ImageVersions_List.json */ /** * Sample code: ImageVersions_ListByImage. @@ -1073,7 +1033,9 @@ public final class ImageVersionsListByImageSamples { * @param manager Entry point to DevCenterManager. */ public static void imageVersionsListByImage(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.imageVersions().listByImage("rg1", "Contoso", "DefaultDevGallery", "Win11", Context.NONE); + manager + .imageVersions() + .listByImage("rg1", "Contoso", "DefaultDevGallery", "Win11", com.azure.core.util.Context.NONE); } } ``` @@ -1081,12 +1043,10 @@ public final class ImageVersionsListByImageSamples { ### Images_Get ```java -import com.azure.core.util.Context; - /** Samples for Images Get. */ public final class ImagesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Images_Get.json */ /** * Sample code: Images_Get. @@ -1094,7 +1054,10 @@ public final class ImagesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void imagesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.images().getWithResponse("rg1", "Contoso", "DefaultDevGallery", "ContosoBaseImage", Context.NONE); + manager + .images() + .getWithResponse( + "rg1", "Contoso", "DefaultDevGallery", "ContosoBaseImage", com.azure.core.util.Context.NONE); } } ``` @@ -1102,12 +1065,10 @@ public final class ImagesGetSamples { ### Images_ListByDevCenter ```java -import com.azure.core.util.Context; - /** Samples for Images ListByDevCenter. */ public final class ImagesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Images_ListByDevCenter.json */ /** * Sample code: Images_ListByDevCenter. @@ -1115,7 +1076,7 @@ public final class ImagesListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void imagesListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.images().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.images().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -1123,12 +1084,10 @@ public final class ImagesListByDevCenterSamples { ### Images_ListByGallery ```java -import com.azure.core.util.Context; - /** Samples for Images ListByGallery. */ public final class ImagesListByGallerySamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_ListByGallery.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Images_ListByGallery.json */ /** * Sample code: Images_ListByGallery. @@ -1136,7 +1095,7 @@ public final class ImagesListByGallerySamples { * @param manager Entry point to DevCenterManager. */ public static void imagesListByGallery(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.images().listByGallery("rg1", "Contoso", "DevGallery", null, Context.NONE); + manager.images().listByGallery("rg1", "Contoso", "DevGallery", null, com.azure.core.util.Context.NONE); } } ``` @@ -1149,7 +1108,7 @@ import com.azure.resourcemanager.devcenter.models.DomainJoinType; /** Samples for NetworkConnections CreateOrUpdate. */ public final class NetworkConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Put.json */ /** * Sample code: NetworkConnections_CreateOrUpdate. @@ -1177,12 +1136,10 @@ public final class NetworkConnectionsCreateOrUpdateSamples { ### NetworkConnections_Delete ```java -import com.azure.core.util.Context; - /** Samples for NetworkConnections Delete. */ public final class NetworkConnectionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Delete.json */ /** * Sample code: NetworkConnections_Delete. @@ -1190,7 +1147,7 @@ public final class NetworkConnectionsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void networkConnectionsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().delete("rg1", "eastusnetwork", Context.NONE); + manager.networkConnections().delete("rg1", "eastusnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -1198,12 +1155,10 @@ public final class NetworkConnectionsDeleteSamples { ### NetworkConnections_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for NetworkConnections GetByResourceGroup. */ public final class NetworkConnectionsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Get.json */ /** * Sample code: NetworkConnections_Get. @@ -1211,7 +1166,9 @@ public final class NetworkConnectionsGetByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void networkConnectionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().getByResourceGroupWithResponse("rg1", "uswest3network", Context.NONE); + manager + .networkConnections() + .getByResourceGroupWithResponse("rg1", "uswest3network", com.azure.core.util.Context.NONE); } } ``` @@ -1219,12 +1176,10 @@ public final class NetworkConnectionsGetByResourceGroupSamples { ### NetworkConnections_GetHealthDetails ```java -import com.azure.core.util.Context; - /** Samples for NetworkConnections GetHealthDetails. */ public final class NetworkConnectionsGetHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_GetHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_GetHealthDetails.json */ /** * Sample code: NetworkConnections_GetHealthDetails. @@ -1233,7 +1188,9 @@ public final class NetworkConnectionsGetHealthDetailsSamples { */ public static void networkConnectionsGetHealthDetails( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().getHealthDetailsWithResponse("rg1", "eastusnetwork", Context.NONE); + manager + .networkConnections() + .getHealthDetailsWithResponse("rg1", "eastusnetwork", com.azure.core.util.Context.NONE); } } ``` @@ -1241,12 +1198,10 @@ public final class NetworkConnectionsGetHealthDetailsSamples { ### NetworkConnections_List ```java -import com.azure.core.util.Context; - /** Samples for NetworkConnections List. */ public final class NetworkConnectionsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListBySubscription.json */ /** * Sample code: NetworkConnections_ListBySubscription. @@ -1255,7 +1210,7 @@ public final class NetworkConnectionsListSamples { */ public static void networkConnectionsListBySubscription( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().list(null, Context.NONE); + manager.networkConnections().list(null, com.azure.core.util.Context.NONE); } } ``` @@ -1263,12 +1218,10 @@ public final class NetworkConnectionsListSamples { ### NetworkConnections_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for NetworkConnections ListByResourceGroup. */ public final class NetworkConnectionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListByResourceGroup.json */ /** * Sample code: NetworkConnections_ListByResourceGroup. @@ -1277,7 +1230,7 @@ public final class NetworkConnectionsListByResourceGroupSamples { */ public static void networkConnectionsListByResourceGroup( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().listByResourceGroup("rg1", null, Context.NONE); + manager.networkConnections().listByResourceGroup("rg1", null, com.azure.core.util.Context.NONE); } } ``` @@ -1285,12 +1238,10 @@ public final class NetworkConnectionsListByResourceGroupSamples { ### NetworkConnections_ListHealthDetails ```java -import com.azure.core.util.Context; - /** Samples for NetworkConnections ListHealthDetails. */ public final class NetworkConnectionsListHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListHealthDetails.json */ /** * Sample code: NetworkConnections_ListHealthDetails. @@ -1299,20 +1250,39 @@ public final class NetworkConnectionsListHealthDetailsSamples { */ public static void networkConnectionsListHealthDetails( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().listHealthDetails("rg1", "uswest3network", null, Context.NONE); + manager.networkConnections().listHealthDetails("rg1", "uswest3network", null, com.azure.core.util.Context.NONE); } } ``` -### NetworkConnections_RunHealthChecks +### NetworkConnections_ListOutboundNetworkDependenciesEndpoints ```java -import com.azure.core.util.Context; +/** Samples for NetworkConnections ListOutboundNetworkDependenciesEndpoints. */ +public final class NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json + */ + /** + * Sample code: ListOutboundNetworkDependencies. + * + * @param manager Entry point to DevCenterManager. + */ + public static void listOutboundNetworkDependencies(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .networkConnections() + .listOutboundNetworkDependenciesEndpoints("rg1", "uswest3network", null, com.azure.core.util.Context.NONE); + } +} +``` +### NetworkConnections_RunHealthChecks + +```java /** Samples for NetworkConnections RunHealthChecks. */ public final class NetworkConnectionsRunHealthChecksSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_RunHealthChecks.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_RunHealthChecks.json */ /** * Sample code: NetworkConnections_RunHealthChecks. @@ -1320,7 +1290,7 @@ public final class NetworkConnectionsRunHealthChecksSamples { * @param manager Entry point to DevCenterManager. */ public static void networkConnectionsRunHealthChecks(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().runHealthChecks("rg1", "uswest3network", Context.NONE); + manager.networkConnections().runHealthChecks("rg1", "uswest3network", com.azure.core.util.Context.NONE); } } ``` @@ -1328,13 +1298,12 @@ public final class NetworkConnectionsRunHealthChecksSamples { ### NetworkConnections_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.NetworkConnection; /** Samples for NetworkConnections Update. */ public final class NetworkConnectionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Patch.json */ /** * Sample code: NetworkConnections_Update. @@ -1345,7 +1314,7 @@ public final class NetworkConnectionsUpdateSamples { NetworkConnection resource = manager .networkConnections() - .getByResourceGroupWithResponse("rg1", "uswest3network", Context.NONE) + .getByResourceGroupWithResponse("rg1", "uswest3network", com.azure.core.util.Context.NONE) .getValue(); resource.update().withDomainPassword("New Password value for user").apply(); } @@ -1355,12 +1324,10 @@ public final class NetworkConnectionsUpdateSamples { ### OperationStatuses_Get ```java -import com.azure.core.util.Context; - /** Samples for OperationStatuses Get. */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/OperationStatus_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/OperationStatus_Get.json */ /** * Sample code: Get OperationStatus. @@ -1368,7 +1335,9 @@ public final class OperationStatusesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void getOperationStatus(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.operationStatuses().getWithResponse("westus3", "3fa1a29d-e807-488d-81d1-f1c5456a08cd", Context.NONE); + manager + .operationStatuses() + .getWithResponse("westus3", "3fa1a29d-e807-488d-81d1-f1c5456a08cd", com.azure.core.util.Context.NONE); } } ``` @@ -1376,12 +1345,10 @@ public final class OperationStatusesGetSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Operations_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Operations_Get.json */ /** * Sample code: Operations_Get. @@ -1389,7 +1356,7 @@ public final class OperationsListSamples { * @param manager Entry point to DevCenterManager. */ public static void operationsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -1399,11 +1366,13 @@ public final class OperationsListSamples { ```java import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; /** Samples for Pools CreateOrUpdate. */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Put.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -1420,6 +1389,10 @@ public final class PoolsCreateOrUpdateSamples { .withNetworkConnectionName("Network1-westus2") .withLicenseType(LicenseType.WINDOWS_CLIENT) .withLocalAdministrator(LocalAdminStatus.ENABLED) + .withStopOnDisconnect( + new StopOnDisconnectConfiguration() + .withStatus(StopOnDisconnectEnableStatus.ENABLED) + .withGracePeriodMinutes(60)) .create(); } } @@ -1428,12 +1401,10 @@ public final class PoolsCreateOrUpdateSamples { ### Pools_Delete ```java -import com.azure.core.util.Context; - /** Samples for Pools Delete. */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -1441,7 +1412,7 @@ public final class PoolsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.pools().delete("rg1", "DevProject", "poolName", Context.NONE); + manager.pools().delete("rg1", "DevProject", "poolName", com.azure.core.util.Context.NONE); } } ``` @@ -1449,12 +1420,22 @@ public final class PoolsDeleteSamples { ### Pools_Get ```java -import com.azure.core.util.Context; - /** Samples for Pools Get. */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_GetUnhealthyStatus.json + */ + /** + * Sample code: Pools_GetUnhealthyStatus. + * + * @param manager Entry point to DevCenterManager. + */ + public static void poolsGetUnhealthyStatus(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager.pools().getWithResponse("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -1462,7 +1443,7 @@ public final class PoolsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.pools().getWithResponse("rg1", "DevProject", "DevPool", Context.NONE); + manager.pools().getWithResponse("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE); } } ``` @@ -1470,12 +1451,10 @@ public final class PoolsGetSamples { ### Pools_ListByProject ```java -import com.azure.core.util.Context; - /** Samples for Pools ListByProject. */ public final class PoolsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_List.json */ /** * Sample code: Pools_ListByProject. @@ -1483,7 +1462,26 @@ public final class PoolsListByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsListByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.pools().listByProject("rg1", "DevProject", null, Context.NONE); + manager.pools().listByProject("rg1", "DevProject", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Pools_RunHealthChecks + +```java +/** Samples for Pools RunHealthChecks. */ +public final class PoolsRunHealthChecksSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_RunHealthChecks.json + */ + /** + * Sample code: Pools_RefreshStatus. + * + * @param manager Entry point to DevCenterManager. + */ + public static void poolsRefreshStatus(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager.pools().runHealthChecks("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE); } } ``` @@ -1491,13 +1489,12 @@ public final class PoolsListByProjectSamples { ### Pools_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Pool; /** Samples for Pools Update. */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Patch.json */ /** * Sample code: Pools_Update. @@ -1505,7 +1502,11 @@ public final class PoolsUpdateSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - Pool resource = manager.pools().getWithResponse("rg1", "DevProject", "DevPool", Context.NONE).getValue(); + Pool resource = + manager + .pools() + .getWithResponse("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withDevBoxDefinitionName("WebDevBox2").apply(); } } @@ -1514,12 +1515,10 @@ public final class PoolsUpdateSamples { ### ProjectAllowedEnvironmentTypes_Get ```java -import com.azure.core.util.Context; - /** Samples for ProjectAllowedEnvironmentTypes Get. */ public final class ProjectAllowedEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectAllowedEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_Get. @@ -1527,7 +1526,9 @@ public final class ProjectAllowedEnvironmentTypesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void projectAllowedEnvironmentTypesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectAllowedEnvironmentTypes().getWithResponse("rg1", "Contoso", "DevTest", Context.NONE); + manager + .projectAllowedEnvironmentTypes() + .getWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE); } } ``` @@ -1535,12 +1536,10 @@ public final class ProjectAllowedEnvironmentTypesGetSamples { ### ProjectAllowedEnvironmentTypes_List ```java -import com.azure.core.util.Context; - /** Samples for ProjectAllowedEnvironmentTypes List. */ public final class ProjectAllowedEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectAllowedEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectAllowedEnvironmentTypes_List.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_List. @@ -1549,7 +1548,7 @@ public final class ProjectAllowedEnvironmentTypesListSamples { */ public static void projectAllowedEnvironmentTypesList( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectAllowedEnvironmentTypes().list("rg1", "Contoso", null, Context.NONE); + manager.projectAllowedEnvironmentTypes().list("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } ``` @@ -1557,8 +1556,8 @@ public final class ProjectAllowedEnvironmentTypesListSamples { ### ProjectEnvironmentTypes_CreateOrUpdate ```java -import com.azure.resourcemanager.devcenter.models.EnableStatus; import com.azure.resourcemanager.devcenter.models.EnvironmentRole; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; @@ -1570,7 +1569,7 @@ import java.util.Map; /** Samples for ProjectEnvironmentTypes CreateOrUpdate. */ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Put.json */ /** * Sample code: ProjectEnvironmentTypes_CreateOrUpdate. @@ -1592,7 +1591,7 @@ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", new UserAssignedIdentity()))) .withDeploymentTargetId("/subscriptions/00000000-0000-0000-0000-000000000000") - .withStatus(EnableStatus.ENABLED) + .withStatus(EnvironmentTypeEnableStatus.ENABLED) .withCreatorRoleAssignment( new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() .withRoles(mapOf("4cbf0b6c-e750-441c-98a7-10da8387e4d6", new EnvironmentRole()))) @@ -1620,12 +1619,10 @@ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { ### ProjectEnvironmentTypes_Delete ```java -import com.azure.core.util.Context; - /** Samples for ProjectEnvironmentTypes Delete. */ public final class ProjectEnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Delete.json */ /** * Sample code: ProjectEnvironmentTypes_Delete. @@ -1633,7 +1630,9 @@ public final class ProjectEnvironmentTypesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void projectEnvironmentTypesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectEnvironmentTypes().deleteWithResponse("rg1", "ContosoProj", "DevTest", Context.NONE); + manager + .projectEnvironmentTypes() + .deleteWithResponse("rg1", "ContosoProj", "DevTest", com.azure.core.util.Context.NONE); } } ``` @@ -1641,12 +1640,10 @@ public final class ProjectEnvironmentTypesDeleteSamples { ### ProjectEnvironmentTypes_Get ```java -import com.azure.core.util.Context; - /** Samples for ProjectEnvironmentTypes Get. */ public final class ProjectEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Get.json */ /** * Sample code: ProjectEnvironmentTypes_Get. @@ -1654,7 +1651,9 @@ public final class ProjectEnvironmentTypesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void projectEnvironmentTypesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectEnvironmentTypes().getWithResponse("rg1", "ContosoProj", "DevTest", Context.NONE); + manager + .projectEnvironmentTypes() + .getWithResponse("rg1", "ContosoProj", "DevTest", com.azure.core.util.Context.NONE); } } ``` @@ -1662,12 +1661,10 @@ public final class ProjectEnvironmentTypesGetSamples { ### ProjectEnvironmentTypes_List ```java -import com.azure.core.util.Context; - /** Samples for ProjectEnvironmentTypes List. */ public final class ProjectEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_List.json */ /** * Sample code: ProjectEnvironmentTypes_List. @@ -1675,7 +1672,7 @@ public final class ProjectEnvironmentTypesListSamples { * @param manager Entry point to DevCenterManager. */ public static void projectEnvironmentTypesList(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectEnvironmentTypes().list("rg1", "ContosoProj", null, Context.NONE); + manager.projectEnvironmentTypes().list("rg1", "ContosoProj", null, com.azure.core.util.Context.NONE); } } ``` @@ -1683,9 +1680,8 @@ public final class ProjectEnvironmentTypesListSamples { ### ProjectEnvironmentTypes_Update ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.devcenter.models.EnableStatus; import com.azure.resourcemanager.devcenter.models.EnvironmentRole; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; @@ -1697,7 +1693,7 @@ import java.util.Map; /** Samples for ProjectEnvironmentTypes Update. */ public final class ProjectEnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Patch.json */ /** * Sample code: ProjectEnvironmentTypes_Update. @@ -1706,7 +1702,10 @@ public final class ProjectEnvironmentTypesUpdateSamples { */ public static void projectEnvironmentTypesUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { ProjectEnvironmentType resource = - manager.projectEnvironmentTypes().getWithResponse("rg1", "ContosoProj", "DevTest", Context.NONE).getValue(); + manager + .projectEnvironmentTypes() + .getWithResponse("rg1", "ContosoProj", "DevTest", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("CostCenter", "RnD")) @@ -1718,7 +1717,7 @@ public final class ProjectEnvironmentTypesUpdateSamples { "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", new UserAssignedIdentity()))) .withDeploymentTargetId("/subscriptions/00000000-0000-0000-0000-000000000000") - .withStatus(EnableStatus.ENABLED) + .withStatus(EnvironmentTypeEnableStatus.ENABLED) .withUserRoleAssignments( mapOf( "e45e3m7c-176e-416a-b466-0c5ec8298f8a", @@ -1749,7 +1748,30 @@ import java.util.Map; /** Samples for Projects CreateOrUpdate. */ public final class ProjectsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_PutWithMaxDevBoxPerUser.json + */ + /** + * Sample code: Projects_CreateOrUpdateWithLimitsPerDev. + * + * @param manager Entry point to DevCenterManager. + */ + public static void projectsCreateOrUpdateWithLimitsPerDev( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .projects() + .define("DevProject") + .withRegion("centralus") + .withExistingResourceGroup("rg1") + .withTags(mapOf("CostCenter", "R&D")) + .withDevCenterId( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso") + .withDescription("This is my first project.") + .withMaxDevBoxesPerUser(3) + .create(); + } + + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Put.json */ /** * Sample code: Projects_CreateOrUpdate. @@ -1785,12 +1807,10 @@ public final class ProjectsCreateOrUpdateSamples { ### Projects_Delete ```java -import com.azure.core.util.Context; - /** Samples for Projects Delete. */ public final class ProjectsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Delete.json */ /** * Sample code: Projects_Delete. @@ -1798,7 +1818,7 @@ public final class ProjectsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().delete("rg1", "DevProject", Context.NONE); + manager.projects().delete("rg1", "DevProject", com.azure.core.util.Context.NONE); } } ``` @@ -1806,12 +1826,10 @@ public final class ProjectsDeleteSamples { ### Projects_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Projects GetByResourceGroup. */ public final class ProjectsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Get.json */ /** * Sample code: Projects_Get. @@ -1819,7 +1837,7 @@ public final class ProjectsGetByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().getByResourceGroupWithResponse("rg1", "DevProject", Context.NONE); + manager.projects().getByResourceGroupWithResponse("rg1", "DevProject", com.azure.core.util.Context.NONE); } } ``` @@ -1827,12 +1845,10 @@ public final class ProjectsGetByResourceGroupSamples { ### Projects_List ```java -import com.azure.core.util.Context; - /** Samples for Projects List. */ public final class ProjectsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_ListBySubscription.json */ /** * Sample code: Projects_ListBySubscription. @@ -1840,7 +1856,7 @@ public final class ProjectsListSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsListBySubscription(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().list(null, Context.NONE); + manager.projects().list(null, com.azure.core.util.Context.NONE); } } ``` @@ -1848,12 +1864,10 @@ public final class ProjectsListSamples { ### Projects_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Projects ListByResourceGroup. */ public final class ProjectsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_ListByResourceGroup.json */ /** * Sample code: Projects_ListByResourceGroup. @@ -1861,7 +1875,7 @@ public final class ProjectsListByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsListByResourceGroup(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().listByResourceGroup("rg1", null, Context.NONE); + manager.projects().listByResourceGroup("rg1", null, com.azure.core.util.Context.NONE); } } ``` @@ -1869,7 +1883,6 @@ public final class ProjectsListByResourceGroupSamples { ### Projects_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Project; import java.util.HashMap; import java.util.Map; @@ -1877,7 +1890,7 @@ import java.util.Map; /** Samples for Projects Update. */ public final class ProjectsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Patch.json */ /** * Sample code: Projects_Update. @@ -1886,7 +1899,10 @@ public final class ProjectsUpdateSamples { */ public static void projectsUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { Project resource = - manager.projects().getByResourceGroupWithResponse("rg1", "DevProject", Context.NONE).getValue(); + manager + .projects() + .getByResourceGroupWithResponse("rg1", "DevProject", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("CostCenter", "R&D")).withDescription("This is my first project.").apply(); } @@ -1906,14 +1922,14 @@ public final class ProjectsUpdateSamples { ### Schedules_CreateOrUpdate ```java -import com.azure.resourcemanager.devcenter.models.EnableStatus; +import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; import com.azure.resourcemanager.devcenter.models.ScheduledType; /** Samples for Schedules CreateOrUpdate. */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json */ /** * Sample code: Schedules_CreateDailyShutdownPoolSchedule. @@ -1930,7 +1946,7 @@ public final class SchedulesCreateOrUpdateSamples { .withFrequency(ScheduledFrequency.DAILY) .withTime("17:30") .withTimeZone("America/Los_Angeles") - .withState(EnableStatus.ENABLED) + .withState(ScheduleEnableStatus.ENABLED) .create(); } } @@ -1939,12 +1955,10 @@ public final class SchedulesCreateOrUpdateSamples { ### Schedules_Delete ```java -import com.azure.core.util.Context; - /** Samples for Schedules Delete. */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_Delete.json */ /** * Sample code: Schedules_Delete. @@ -1952,7 +1966,9 @@ public final class SchedulesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void schedulesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.schedules().delete("rg1", "TestProject", "DevPool", "autoShutdown", null, Context.NONE); + manager + .schedules() + .delete("rg1", "TestProject", "DevPool", "autoShutdown", null, com.azure.core.util.Context.NONE); } } ``` @@ -1960,12 +1976,10 @@ public final class SchedulesDeleteSamples { ### Schedules_Get ```java -import com.azure.core.util.Context; - /** Samples for Schedules Get. */ public final class SchedulesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_Get.json */ /** * Sample code: Schedules_GetByPool. @@ -1973,7 +1987,9 @@ public final class SchedulesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void schedulesGetByPool(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.schedules().getWithResponse("rg1", "TestProject", "DevPool", "autoShutdown", null, Context.NONE); + manager + .schedules() + .getWithResponse("rg1", "TestProject", "DevPool", "autoShutdown", null, com.azure.core.util.Context.NONE); } } ``` @@ -1981,12 +1997,10 @@ public final class SchedulesGetSamples { ### Schedules_ListByPool ```java -import com.azure.core.util.Context; - /** Samples for Schedules ListByPool. */ public final class SchedulesListByPoolSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_ListByPool.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_ListByPool.json */ /** * Sample code: Schedules_ListByPool. @@ -1994,7 +2008,7 @@ public final class SchedulesListByPoolSamples { * @param manager Entry point to DevCenterManager. */ public static void schedulesListByPool(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.schedules().listByPool("rg1", "TestProject", "DevPool", null, Context.NONE); + manager.schedules().listByPool("rg1", "TestProject", "DevPool", null, com.azure.core.util.Context.NONE); } } ``` @@ -2002,13 +2016,12 @@ public final class SchedulesListByPoolSamples { ### Schedules_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Schedule; /** Samples for Schedules Update. */ public final class SchedulesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_Patch.json */ /** * Sample code: Schedules_Update. @@ -2019,7 +2032,8 @@ public final class SchedulesUpdateSamples { Schedule resource = manager .schedules() - .getWithResponse("rg1", "TestProject", "DevPool", "autoShutdown", null, Context.NONE) + .getWithResponse( + "rg1", "TestProject", "DevPool", "autoShutdown", null, com.azure.core.util.Context.NONE) .getValue(); resource.update().withTime("18:00").apply(); } @@ -2029,12 +2043,10 @@ public final class SchedulesUpdateSamples { ### Skus_List ```java -import com.azure.core.util.Context; - /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Skus_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Skus_ListBySubscription.json */ /** * Sample code: Skus_ListBySubscription. @@ -2042,28 +2054,7 @@ public final class SkusListSamples { * @param manager Entry point to DevCenterManager. */ public static void skusListBySubscription(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.skus().list(null, Context.NONE); - } -} -``` - -### Usages_ListByLocation - -```java -import com.azure.core.util.Context; - -/** Samples for Usages ListByLocation. */ -public final class UsagesListByLocationSamples { - /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Usages_ListByLocation.json - */ - /** - * Sample code: listUsages. - * - * @param manager Entry point to DevCenterManager. - */ - public static void listUsages(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.usages().listByLocation("westus", Context.NONE); + manager.skus().list(null, com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml b/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml index 5dfe19537e20e..148164cb22579 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml +++ b/sdk/devcenter/azure-resourcemanager-devcenter/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for DevCenter Management - This package contains Microsoft Azure SDK for DevCenter Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DevCenter Management API. Package tag package-preview-2022-11. + This package contains Microsoft Azure SDK for DevCenter Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. DevCenter Management API. Package tag package-preview-2023-01. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java index d311881272ccf..4a469b8ea17a2 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/DevCenterManager.java @@ -43,7 +43,6 @@ import com.azure.resourcemanager.devcenter.implementation.ProjectsImpl; import com.azure.resourcemanager.devcenter.implementation.SchedulesImpl; import com.azure.resourcemanager.devcenter.implementation.SkusImpl; -import com.azure.resourcemanager.devcenter.implementation.UsagesImpl; import com.azure.resourcemanager.devcenter.models.AttachedNetworks; import com.azure.resourcemanager.devcenter.models.Catalogs; import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilities; @@ -62,7 +61,6 @@ import com.azure.resourcemanager.devcenter.models.Projects; import com.azure.resourcemanager.devcenter.models.Schedules; import com.azure.resourcemanager.devcenter.models.Skus; -import com.azure.resourcemanager.devcenter.models.Usages; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -98,8 +96,6 @@ public final class DevCenterManager { private OperationStatuses operationStatuses; - private Usages usages; - private CheckNameAvailabilities checkNameAvailabilities; private Skus skus; @@ -275,7 +271,7 @@ public DevCenterManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.devcenter") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -490,18 +486,6 @@ public OperationStatuses operationStatuses() { return operationStatuses; } - /** - * Gets the resource collection API of Usages. - * - * @return Resource collection API of Usages. - */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); - } - return usages; - } - /** * Gets the resource collection API of CheckNameAvailabilities. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java index 24967b10b14ef..7f6ac5a8498ed 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/DevCenterManagementClient.java @@ -135,13 +135,6 @@ public interface DevCenterManagementClient { */ OperationStatusesClient getOperationStatuses(); - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - UsagesClient getUsages(); - /** * Gets the CheckNameAvailabilitiesClient object to access its operations. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/NetworkConnectionsClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/NetworkConnectionsClient.java index 24ad4e3b04e95..7a7c3e6112133 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/NetworkConnectionsClient.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/NetworkConnectionsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.devcenter.fluent.models.HealthCheckStatusDetailsInner; import com.azure.resourcemanager.devcenter.fluent.models.NetworkConnectionInner; +import com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.devcenter.models.NetworkConnectionUpdate; /** An instance of this class provides access to all the operations defined in NetworkConnectionsClient. */ @@ -384,4 +385,36 @@ SyncPoller, Void> beginRunHealthChecks( */ @ServiceMethod(returns = ReturnType.SINGLE) void runHealthChecks(String resourceGroupName, String networkConnectionName, Context context); + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a 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 values returned by the List operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName); + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName, Integer top, Context context); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/PoolsClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/PoolsClient.java index 8671061a85d99..c62db145795cc 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/PoolsClient.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/PoolsClient.java @@ -258,4 +258,62 @@ SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String projectName, String poolName, Context context); + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRunHealthChecks( + String resourceGroupName, String projectName, String poolName); + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRunHealthChecks( + String resourceGroupName, String projectName, String poolName, Context context); + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void runHealthChecks(String resourceGroupName, String projectName, String poolName); + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void runHealthChecks(String resourceGroupName, String projectName, String poolName, Context context); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/UsagesClient.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/UsagesClient.java deleted file mode 100644 index 69fb4f4ec0fd0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/UsagesClient.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.devcenter.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public interface UsagesClient { - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location); - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByLocation(String location, Context context); -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageInner.java index 87589bf111b7b..c9db60e8b4cb1 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.models.HibernateSupport; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import com.azure.resourcemanager.devcenter.models.RecommendedMachineConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; @@ -102,6 +103,16 @@ public ProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the hibernateSupport property: Indicates whether this image has hibernate enabled. Not all images are capable + * of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate. + * + * @return the hibernateSupport value. + */ + public HibernateSupport hibernateSupport() { + return this.innerProperties() == null ? null : this.innerProperties().hibernateSupport(); + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageProperties.java index 6e3fe9c4ad200..238215ba46882 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ImageProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.models.HibernateSupport; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import com.azure.resourcemanager.devcenter.models.RecommendedMachineConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; @@ -48,6 +49,13 @@ public final class ImageProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ProvisioningState provisioningState; + /* + * Indicates whether this image has hibernate enabled. Not all images are capable of supporting hibernation. To + * find out more see https://aka.ms/devbox/hibernate + */ + @JsonProperty(value = "hibernateSupport", access = JsonProperty.Access.WRITE_ONLY) + private HibernateSupport hibernateSupport; + /** Creates an instance of ImageProperties class. */ public ImageProperties() { } @@ -106,6 +114,16 @@ public ProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the hibernateSupport property: Indicates whether this image has hibernate enabled. Not all images are capable + * of supporting hibernation. To find out more see https://aka.ms/devbox/hibernate. + * + * @return the hibernateSupport value. + */ + public HibernateSupport hibernateSupport() { + return this.hibernateSupport; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/OutboundEnvironmentEndpointInner.java new file mode 100644 index 0000000000000..e048ec545cad3 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/OutboundEnvironmentEndpointInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.devcenter.models.EndpointDependency; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A collection of related endpoints from the same service for which the agent requires outbound access. */ +@Immutable +public final class OutboundEnvironmentEndpointInner { + /* + * The type of service that the agent connects to. + */ + @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) + private String category; + + /* + * The endpoints for this service for which the agent requires outbound access. + */ + @JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY) + private List endpoints; + + /** Creates an instance of OutboundEnvironmentEndpointInner class. */ + public OutboundEnvironmentEndpointInner() { + } + + /** + * Get the category property: The type of service that the agent connects to. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Get the endpoints property: The endpoints for this service for which the agent requires outbound access. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java index 10e6d2971cb80..f5f8c4faa6ce4 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolInner.java @@ -7,10 +7,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.devcenter.models.HealthStatus; +import com.azure.resourcemanager.devcenter.models.HealthStatusDetail; import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; /** A pool of Virtual Machines. */ @@ -64,6 +68,26 @@ public PoolInner withTags(Map tags) { return this; } + /** + * Get the healthStatus property: Overall health status of the Pool. Indicates whether or not the Pool is available + * to create Dev Boxes. + * + * @return the healthStatus value. + */ + public HealthStatus healthStatus() { + return this.innerProperties() == null ? null : this.innerProperties().healthStatus(); + } + + /** + * Get the healthStatusDetails property: Details on the Pool health status to help diagnose issues. This is only + * populated when the pool status indicates the pool is in a non-healthy state. + * + * @return the healthStatusDetails value. + */ + public List healthStatusDetails() { + return this.innerProperties() == null ? null : this.innerProperties().healthStatusDetails(); + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -169,6 +193,29 @@ public PoolInner withLocalAdministrator(LocalAdminStatus localAdministrator) { return this; } + /** + * Get the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created in this pool. + * + * @return the stopOnDisconnect value. + */ + public StopOnDisconnectConfiguration stopOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().stopOnDisconnect(); + } + + /** + * Set the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created in this pool. + * + * @param stopOnDisconnect the stopOnDisconnect value to set. + * @return the PoolInner object itself. + */ + public PoolInner withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new PoolProperties(); + } + this.innerProperties().withStopOnDisconnect(stopOnDisconnect); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java index 547f575902b58..639bcc2cd6aff 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolProperties.java @@ -5,14 +5,31 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devcenter.models.HealthStatus; +import com.azure.resourcemanager.devcenter.models.HealthStatusDetail; import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** Properties of a Pool. */ @Fluent public final class PoolProperties extends PoolUpdateProperties { + /* + * Overall health status of the Pool. Indicates whether or not the Pool is available to create Dev Boxes. + */ + @JsonProperty(value = "healthStatus", access = JsonProperty.Access.WRITE_ONLY) + private HealthStatus healthStatus; + + /* + * Details on the Pool health status to help diagnose issues. This is only populated when the pool status indicates + * the pool is in a non-healthy state + */ + @JsonProperty(value = "healthStatusDetails", access = JsonProperty.Access.WRITE_ONLY) + private List healthStatusDetails; + /* * The provisioning state of the resource. */ @@ -23,6 +40,26 @@ public final class PoolProperties extends PoolUpdateProperties { public PoolProperties() { } + /** + * Get the healthStatus property: Overall health status of the Pool. Indicates whether or not the Pool is available + * to create Dev Boxes. + * + * @return the healthStatus value. + */ + public HealthStatus healthStatus() { + return this.healthStatus; + } + + /** + * Get the healthStatusDetails property: Details on the Pool health status to help diagnose issues. This is only + * populated when the pool status indicates the pool is in a non-healthy state. + * + * @return the healthStatusDetails value. + */ + public List healthStatusDetails() { + return this.healthStatusDetails; + } + /** * Get the provisioningState property: The provisioning state of the resource. * @@ -60,6 +97,13 @@ public PoolProperties withLocalAdministrator(LocalAdminStatus localAdministrator return this; } + /** {@inheritDoc} */ + @Override + public PoolProperties withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect) { + super.withStopOnDisconnect(stopOnDisconnect); + return this; + } + /** * Validates the instance. * @@ -68,5 +112,8 @@ public PoolProperties withLocalAdministrator(LocalAdminStatus localAdministrator @Override public void validate() { super.validate(); + if (healthStatusDetails() != null) { + healthStatusDetails().forEach(e -> e.validate()); + } } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java index 21d1c184f1ee0..82bef8bd1c49f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/PoolUpdateProperties.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a Pool. These properties can be updated after the resource has been created. */ @@ -37,6 +38,12 @@ public class PoolUpdateProperties { @JsonProperty(value = "localAdministrator") private LocalAdminStatus localAdministrator; + /* + * Stop on disconnect configuration settings for Dev Boxes created in this pool. + */ + @JsonProperty(value = "stopOnDisconnect") + private StopOnDisconnectConfiguration stopOnDisconnect; + /** Creates an instance of PoolUpdateProperties class. */ public PoolUpdateProperties() { } @@ -125,11 +132,34 @@ public PoolUpdateProperties withLocalAdministrator(LocalAdminStatus localAdminis return this; } + /** + * Get the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created in this pool. + * + * @return the stopOnDisconnect value. + */ + public StopOnDisconnectConfiguration stopOnDisconnect() { + return this.stopOnDisconnect; + } + + /** + * Set the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created in this pool. + * + * @param stopOnDisconnect the stopOnDisconnect value to set. + * @return the PoolUpdateProperties object itself. + */ + public PoolUpdateProperties withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect) { + this.stopOnDisconnect = stopOnDisconnect; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (stopOnDisconnect() != null) { + stopOnDisconnect().validate(); + } } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeInner.java index 5a0b85e3f2c56..3b8d4c9b28ba7 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeInner.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.devcenter.models.EnableStatus; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; import com.azure.resourcemanager.devcenter.models.ProvisioningState; @@ -171,7 +171,7 @@ public ProjectEnvironmentTypeInner withDeploymentTargetId(String deploymentTarge * * @return the status value. */ - public EnableStatus status() { + public EnvironmentTypeEnableStatus status() { return this.innerProperties() == null ? null : this.innerProperties().status(); } @@ -181,7 +181,7 @@ public EnableStatus status() { * @param status the status value to set. * @return the ProjectEnvironmentTypeInner object itself. */ - public ProjectEnvironmentTypeInner withStatus(EnableStatus status) { + public ProjectEnvironmentTypeInner withStatus(EnvironmentTypeEnableStatus status) { if (this.innerProperties() == null) { this.innerProperties = new ProjectEnvironmentTypeProperties(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeProperties.java index b1d0759844c43..4c0743bc4fab5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeProperties.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.devcenter.models.EnableStatus; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; @@ -43,7 +43,7 @@ public ProjectEnvironmentTypeProperties withDeploymentTargetId(String deployment /** {@inheritDoc} */ @Override - public ProjectEnvironmentTypeProperties withStatus(EnableStatus status) { + public ProjectEnvironmentTypeProperties withStatus(EnvironmentTypeEnableStatus status) { super.withStatus(status); return this; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeUpdateProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeUpdateProperties.java index 1062a8b71a4fa..146cfac0c6f84 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeUpdateProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectEnvironmentTypeUpdateProperties.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.devcenter.models.EnableStatus; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; import com.fasterxml.jackson.annotation.JsonInclude; @@ -26,7 +26,7 @@ public class ProjectEnvironmentTypeUpdateProperties { * Defines whether this Environment Type can be used in this Project. */ @JsonProperty(value = "status") - private EnableStatus status; + private EnvironmentTypeEnableStatus status; /* * The role definition assigned to the environment creator on backing resources. @@ -73,7 +73,7 @@ public ProjectEnvironmentTypeUpdateProperties withDeploymentTargetId(String depl * * @return the status value. */ - public EnableStatus status() { + public EnvironmentTypeEnableStatus status() { return this.status; } @@ -83,7 +83,7 @@ public EnableStatus status() { * @param status the status value to set. * @return the ProjectEnvironmentTypeUpdateProperties object itself. */ - public ProjectEnvironmentTypeUpdateProperties withStatus(EnableStatus status) { + public ProjectEnvironmentTypeUpdateProperties withStatus(EnvironmentTypeEnableStatus status) { this.status = status; return this; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectInner.java index ce66325842b34..fe94185f38328 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectInner.java @@ -126,6 +126,31 @@ public ProjectInner withDescription(String description) { return this; } + /** + * Get the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a single user can + * create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * + * @return the maxDevBoxesPerUser value. + */ + public Integer maxDevBoxesPerUser() { + return this.innerProperties() == null ? null : this.innerProperties().maxDevBoxesPerUser(); + } + + /** + * Set the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a single user can + * create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * + * @param maxDevBoxesPerUser the maxDevBoxesPerUser value to set. + * @return the ProjectInner object itself. + */ + public ProjectInner withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser) { + if (this.innerProperties() == null) { + this.innerProperties = new ProjectProperties(); + } + this.innerProperties().withMaxDevBoxesPerUser(maxDevBoxesPerUser); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectProperties.java index 70a922da4496f..6f4d7b07cf009 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectProperties.java @@ -59,6 +59,13 @@ public ProjectProperties withDescription(String description) { return this; } + /** {@inheritDoc} */ + @Override + public ProjectProperties withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser) { + super.withMaxDevBoxesPerUser(maxDevBoxesPerUser); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectUpdateProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectUpdateProperties.java index 5f8266f1d93bb..0e7a334dab2ac 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectUpdateProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ProjectUpdateProperties.java @@ -22,6 +22,13 @@ public class ProjectUpdateProperties { @JsonProperty(value = "description") private String description; + /* + * When specified, limits the maximum number of Dev Boxes a single user can create across all pools in the project. + * This will have no effect on existing Dev Boxes when reduced. + */ + @JsonProperty(value = "maxDevBoxesPerUser") + private Integer maxDevBoxesPerUser; + /** Creates an instance of ProjectUpdateProperties class. */ public ProjectUpdateProperties() { } @@ -66,6 +73,28 @@ public ProjectUpdateProperties withDescription(String description) { return this; } + /** + * Get the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a single user can + * create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * + * @return the maxDevBoxesPerUser value. + */ + public Integer maxDevBoxesPerUser() { + return this.maxDevBoxesPerUser; + } + + /** + * Set the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a single user can + * create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * + * @param maxDevBoxesPerUser the maxDevBoxesPerUser value to set. + * @return the ProjectUpdateProperties object itself. + */ + public ProjectUpdateProperties withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser) { + this.maxDevBoxesPerUser = maxDevBoxesPerUser; + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleInner.java index 4ad793aa09e53..8b27dfb74b440 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleInner.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleInner.java @@ -7,8 +7,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.devcenter.models.EnableStatus; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; import com.azure.resourcemanager.devcenter.models.ScheduledType; import com.fasterxml.jackson.annotation.JsonProperty; @@ -156,7 +156,7 @@ public ScheduleInner withTimeZone(String timeZone) { * * @return the state value. */ - public EnableStatus state() { + public ScheduleEnableStatus state() { return this.innerProperties() == null ? null : this.innerProperties().state(); } @@ -166,7 +166,7 @@ public EnableStatus state() { * @param state the state value to set. * @return the ScheduleInner object itself. */ - public ScheduleInner withState(EnableStatus state) { + public ScheduleInner withState(ScheduleEnableStatus state) { if (this.innerProperties() == null) { this.innerProperties = new ScheduleProperties(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleProperties.java index 57503f70ae853..163295504c727 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleProperties.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.devcenter.models.EnableStatus; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; import com.azure.resourcemanager.devcenter.models.ScheduledType; import com.fasterxml.jackson.annotation.JsonProperty; @@ -63,7 +63,7 @@ public ScheduleProperties withTimeZone(String timeZone) { /** {@inheritDoc} */ @Override - public ScheduleProperties withState(EnableStatus state) { + public ScheduleProperties withState(ScheduleEnableStatus state) { super.withState(state); return this; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleUpdateProperties.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleUpdateProperties.java index 0bc9079ac8a37..002ab1f063f6d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleUpdateProperties.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/ScheduleUpdateProperties.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.devcenter.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.devcenter.models.EnableStatus; +import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; import com.azure.resourcemanager.devcenter.models.ScheduledType; import com.fasterxml.jackson.annotation.JsonProperty; @@ -41,7 +41,7 @@ public class ScheduleUpdateProperties { * Indicates whether or not this scheduled task is enabled. */ @JsonProperty(value = "state") - private EnableStatus state; + private ScheduleEnableStatus state; /** Creates an instance of ScheduleUpdateProperties class. */ public ScheduleUpdateProperties() { @@ -132,7 +132,7 @@ public ScheduleUpdateProperties withTimeZone(String timeZone) { * * @return the state value. */ - public EnableStatus state() { + public ScheduleEnableStatus state() { return this.state; } @@ -142,7 +142,7 @@ public EnableStatus state() { * @param state the state value to set. * @return the ScheduleUpdateProperties object itself. */ - public ScheduleUpdateProperties withState(EnableStatus state) { + public ScheduleUpdateProperties withState(ScheduleEnableStatus state) { this.state = state; return this; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/UsageInner.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/UsageInner.java deleted file mode 100644 index 96fd7eb8ebdfd..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/fluent/models/UsageInner.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.devcenter.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.devcenter.models.UsageName; -import com.azure.resourcemanager.devcenter.models.UsageUnit; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The core usage details. */ -@Fluent -public final class UsageInner { - /* - * The current usage. - */ - @JsonProperty(value = "currentValue") - private Long currentValue; - - /* - * The limit integer. - */ - @JsonProperty(value = "limit") - private Long limit; - - /* - * The unit details. - */ - @JsonProperty(value = "unit") - private UsageUnit unit; - - /* - * The name. - */ - @JsonProperty(value = "name") - private UsageName name; - - /** Creates an instance of UsageInner class. */ - public UsageInner() { - } - - /** - * Get the currentValue property: The current usage. - * - * @return the currentValue value. - */ - public Long currentValue() { - return this.currentValue; - } - - /** - * Set the currentValue property: The current usage. - * - * @param currentValue the currentValue value to set. - * @return the UsageInner object itself. - */ - public UsageInner withCurrentValue(Long currentValue) { - this.currentValue = currentValue; - return this; - } - - /** - * Get the limit property: The limit integer. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit property: The limit integer. - * - * @param limit the limit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withLimit(Long limit) { - this.limit = limit; - return this; - } - - /** - * Get the unit property: The unit details. - * - * @return the unit value. - */ - public UsageUnit unit() { - return this.unit; - } - - /** - * Set the unit property: The unit details. - * - * @param unit the unit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withUnit(UsageUnit unit) { - this.unit = unit; - return this; - } - - /** - * Get the name property: The name. - * - * @return the name value. - */ - public UsageName name() { - return this.name; - } - - /** - * Set the name property: The name. - * - * @param name the name value to set. - * @return the UsageInner object itself. - */ - public UsageInner withName(UsageName name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/AttachedNetworksClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/AttachedNetworksClientImpl.java index cdbfaa721e759..2aa007d9bb64e 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/AttachedNetworksClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/AttachedNetworksClientImpl.java @@ -1149,7 +1149,8 @@ public SyncPoller, AttachedNetworkCon String devCenterName, String attachedNetworkConnectionName, AttachedNetworkConnectionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName, body) + return this + .beginCreateOrUpdateAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName, body) .getSyncPoller(); } @@ -1173,7 +1174,8 @@ public SyncPoller, AttachedNetworkCon String attachedNetworkConnectionName, AttachedNetworkConnectionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName, body, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName, body, context) .getSyncPoller(); } @@ -1439,7 +1441,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String attachedNetworkConnectionName) { - return beginDeleteAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName).getSyncPoller(); } /** @@ -1457,7 +1459,8 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String attachedNetworkConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName, context) + return this + .beginDeleteAsync(resourceGroupName, devCenterName, attachedNetworkConnectionName, context) .getSyncPoller(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java index befead8172caa..3031da74cdbbf 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/CatalogsClientImpl.java @@ -719,7 +719,7 @@ private PollerFlux, CatalogInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CatalogInner> beginCreateOrUpdate( String resourceGroupName, String devCenterName, String catalogName, CatalogInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, catalogName, body).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, devCenterName, catalogName, body).getSyncPoller(); } /** @@ -738,7 +738,9 @@ public SyncPoller, CatalogInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CatalogInner> beginCreateOrUpdate( String resourceGroupName, String devCenterName, String catalogName, CatalogInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, catalogName, body, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, devCenterName, catalogName, body, context) + .getSyncPoller(); } /** @@ -1000,7 +1002,7 @@ private PollerFlux, CatalogInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CatalogInner> beginUpdate( String resourceGroupName, String devCenterName, String catalogName, CatalogUpdate body) { - return beginUpdateAsync(resourceGroupName, devCenterName, catalogName, body).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, devCenterName, catalogName, body).getSyncPoller(); } /** @@ -1019,7 +1021,7 @@ public SyncPoller, CatalogInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, CatalogInner> beginUpdate( String resourceGroupName, String devCenterName, String catalogName, CatalogUpdate body, Context context) { - return beginUpdateAsync(resourceGroupName, devCenterName, catalogName, body, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, devCenterName, catalogName, body, context).getSyncPoller(); } /** @@ -1261,7 +1263,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String catalogName) { - return beginDeleteAsync(resourceGroupName, devCenterName, catalogName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, catalogName).getSyncPoller(); } /** @@ -1279,7 +1281,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String catalogName, Context context) { - return beginDeleteAsync(resourceGroupName, devCenterName, catalogName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, catalogName, context).getSyncPoller(); } /** @@ -1513,7 +1515,7 @@ private PollerFlux, Void> beginSyncAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSync( String resourceGroupName, String devCenterName, String catalogName) { - return beginSyncAsync(resourceGroupName, devCenterName, catalogName).getSyncPoller(); + return this.beginSyncAsync(resourceGroupName, devCenterName, catalogName).getSyncPoller(); } /** @@ -1531,7 +1533,7 @@ public SyncPoller, Void> beginSync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginSync( String resourceGroupName, String devCenterName, String catalogName, Context context) { - return beginSyncAsync(resourceGroupName, devCenterName, catalogName, context).getSyncPoller(); + return this.beginSyncAsync(resourceGroupName, devCenterName, catalogName, context).getSyncPoller(); } /** diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionsClientImpl.java index 5544447e52417..158af80f420c3 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionsClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevBoxDefinitionsClientImpl.java @@ -765,7 +765,9 @@ private PollerFlux, DevBoxDefinitionInner> beg @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DevBoxDefinitionInner> beginCreateOrUpdate( String resourceGroupName, String devCenterName, String devBoxDefinitionName, DevBoxDefinitionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body) + .getSyncPoller(); } /** @@ -788,7 +790,8 @@ public SyncPoller, DevBoxDefinitionInner> begi String devBoxDefinitionName, DevBoxDefinitionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body, context) .getSyncPoller(); } @@ -1075,7 +1078,7 @@ private PollerFlux, DevBoxDefinitionInner> beg @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DevBoxDefinitionInner> beginUpdate( String resourceGroupName, String devCenterName, String devBoxDefinitionName, DevBoxDefinitionUpdate body) { - return beginUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body).getSyncPoller(); } /** @@ -1098,7 +1101,9 @@ public SyncPoller, DevBoxDefinitionInner> begi String devBoxDefinitionName, DevBoxDefinitionUpdate body, Context context) { - return beginUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body, context).getSyncPoller(); + return this + .beginUpdateAsync(resourceGroupName, devCenterName, devBoxDefinitionName, body, context) + .getSyncPoller(); } /** @@ -1352,7 +1357,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String devBoxDefinitionName) { - return beginDeleteAsync(resourceGroupName, devCenterName, devBoxDefinitionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, devBoxDefinitionName).getSyncPoller(); } /** @@ -1370,7 +1375,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String devBoxDefinitionName, Context context) { - return beginDeleteAsync(resourceGroupName, devCenterName, devBoxDefinitionName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, devBoxDefinitionName, context).getSyncPoller(); } /** diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java index 8faad4847e3b8..7510c34a4187d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCenterManagementClientImpl.java @@ -41,7 +41,6 @@ import com.azure.resourcemanager.devcenter.fluent.ProjectsClient; import com.azure.resourcemanager.devcenter.fluent.SchedulesClient; import com.azure.resourcemanager.devcenter.fluent.SkusClient; -import com.azure.resourcemanager.devcenter.fluent.UsagesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -282,18 +281,6 @@ public OperationStatusesClient getOperationStatuses() { return this.operationStatuses; } - /** The UsagesClient object to access its operations. */ - private final UsagesClient usages; - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - public UsagesClient getUsages() { - return this.usages; - } - /** The CheckNameAvailabilitiesClient object to access its operations. */ private final CheckNameAvailabilitiesClient checkNameAvailabilities; @@ -376,7 +363,7 @@ public NetworkConnectionsClient getNetworkConnections() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-11-11-preview"; + this.apiVersion = "2023-01-01-preview"; this.devCenters = new DevCentersClientImpl(this); this.projects = new ProjectsClientImpl(this); this.attachedNetworks = new AttachedNetworksClientImpl(this); @@ -390,7 +377,6 @@ public NetworkConnectionsClient getNetworkConnections() { this.devBoxDefinitions = new DevBoxDefinitionsClientImpl(this); this.operations = new OperationsClientImpl(this); this.operationStatuses = new OperationStatusesClientImpl(this); - this.usages = new UsagesClientImpl(this); this.checkNameAvailabilities = new CheckNameAvailabilitiesClientImpl(this); this.skus = new SkusClientImpl(this); this.pools = new PoolsClientImpl(this); diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCentersClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCentersClientImpl.java index 5464719b513d1..63273f4c40d20 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCentersClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/DevCentersClientImpl.java @@ -848,7 +848,7 @@ private PollerFlux, DevCenterInner> beginCreateOrUpda @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DevCenterInner> beginCreateOrUpdate( String resourceGroupName, String devCenterName, DevCenterInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, body).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, devCenterName, body).getSyncPoller(); } /** @@ -866,7 +866,7 @@ public SyncPoller, DevCenterInner> beginCreateOrUpdat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DevCenterInner> beginCreateOrUpdate( String resourceGroupName, String devCenterName, DevCenterInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, body, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, devCenterName, body, context).getSyncPoller(); } /** @@ -1113,7 +1113,7 @@ private PollerFlux, DevCenterInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DevCenterInner> beginUpdate( String resourceGroupName, String devCenterName, DevCenterUpdate body) { - return beginUpdateAsync(resourceGroupName, devCenterName, body).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, devCenterName, body).getSyncPoller(); } /** @@ -1131,7 +1131,7 @@ public SyncPoller, DevCenterInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DevCenterInner> beginUpdate( String resourceGroupName, String devCenterName, DevCenterUpdate body, Context context) { - return beginUpdateAsync(resourceGroupName, devCenterName, body, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, devCenterName, body, context).getSyncPoller(); } /** @@ -1351,7 +1351,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String devCenterName) { - return beginDeleteAsync(resourceGroupName, devCenterName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName).getSyncPoller(); } /** @@ -1368,7 +1368,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, Context context) { - return beginDeleteAsync(resourceGroupName, devCenterName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, context).getSyncPoller(); } /** diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/GalleriesClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/GalleriesClientImpl.java index 3f7b3e7f64b58..001eec03860e4 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/GalleriesClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/GalleriesClientImpl.java @@ -684,7 +684,7 @@ private PollerFlux, GalleryInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, GalleryInner> beginCreateOrUpdate( String resourceGroupName, String devCenterName, String galleryName, GalleryInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, galleryName, body).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, devCenterName, galleryName, body).getSyncPoller(); } /** @@ -703,7 +703,9 @@ public SyncPoller, GalleryInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, GalleryInner> beginCreateOrUpdate( String resourceGroupName, String devCenterName, String galleryName, GalleryInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, devCenterName, galleryName, body, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, devCenterName, galleryName, body, context) + .getSyncPoller(); } /** @@ -946,7 +948,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String galleryName) { - return beginDeleteAsync(resourceGroupName, devCenterName, galleryName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, galleryName).getSyncPoller(); } /** @@ -964,7 +966,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String devCenterName, String galleryName, Context context) { - return beginDeleteAsync(resourceGroupName, devCenterName, galleryName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, devCenterName, galleryName, context).getSyncPoller(); } /** diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ImageImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ImageImpl.java index f93374185213c..bb9b4ded18e78 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ImageImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ImageImpl.java @@ -6,6 +6,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.devcenter.fluent.models.ImageInner; +import com.azure.resourcemanager.devcenter.models.HibernateSupport; import com.azure.resourcemanager.devcenter.models.Image; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import com.azure.resourcemanager.devcenter.models.RecommendedMachineConfiguration; @@ -60,6 +61,10 @@ public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public HibernateSupport hibernateSupport() { + return this.innerModel().hibernateSupport(); + } + public ImageInner innerModel() { return this.innerObject; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsClientImpl.java index 785dbbd603347..93f4f5fc6b02f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsClientImpl.java @@ -36,9 +36,11 @@ import com.azure.resourcemanager.devcenter.fluent.NetworkConnectionsClient; import com.azure.resourcemanager.devcenter.fluent.models.HealthCheckStatusDetailsInner; import com.azure.resourcemanager.devcenter.fluent.models.NetworkConnectionInner; +import com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetailsListResult; import com.azure.resourcemanager.devcenter.models.NetworkConnectionListResult; import com.azure.resourcemanager.devcenter.models.NetworkConnectionUpdate; +import com.azure.resourcemanager.devcenter.models.OutboundEnvironmentEndpointCollection; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -204,6 +206,22 @@ Mono>> runHealthChecks( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter" + + "/networkConnections/{networkConnectionName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpoints( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("$top") Integer top, + @PathParam("networkConnectionName") String networkConnectionName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -233,6 +251,16 @@ Mono> listHealthDetailsNext( @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpointsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -919,7 +947,7 @@ private PollerFlux, NetworkConnectionInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkConnectionInner> beginCreateOrUpdate( String resourceGroupName, String networkConnectionName, NetworkConnectionInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, networkConnectionName, body).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, networkConnectionName, body).getSyncPoller(); } /** @@ -937,7 +965,7 @@ public SyncPoller, NetworkConnectionInner> be @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkConnectionInner> beginCreateOrUpdate( String resourceGroupName, String networkConnectionName, NetworkConnectionInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, networkConnectionName, body, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, networkConnectionName, body, context).getSyncPoller(); } /** @@ -1191,7 +1219,7 @@ private PollerFlux, NetworkConnectionInner> b @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkConnectionInner> beginUpdate( String resourceGroupName, String networkConnectionName, NetworkConnectionUpdate body) { - return beginUpdateAsync(resourceGroupName, networkConnectionName, body).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, networkConnectionName, body).getSyncPoller(); } /** @@ -1209,7 +1237,7 @@ public SyncPoller, NetworkConnectionInner> be @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, NetworkConnectionInner> beginUpdate( String resourceGroupName, String networkConnectionName, NetworkConnectionUpdate body, Context context) { - return beginUpdateAsync(resourceGroupName, networkConnectionName, body, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, networkConnectionName, body, context).getSyncPoller(); } /** @@ -1436,7 +1464,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String networkConnectionName) { - return beginDeleteAsync(resourceGroupName, networkConnectionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, networkConnectionName).getSyncPoller(); } /** @@ -1453,7 +1481,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String networkConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, networkConnectionName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, networkConnectionName, context).getSyncPoller(); } /** @@ -2035,7 +2063,7 @@ private PollerFlux, Void> beginRunHealthChecksAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRunHealthChecks( String resourceGroupName, String networkConnectionName) { - return beginRunHealthChecksAsync(resourceGroupName, networkConnectionName).getSyncPoller(); + return this.beginRunHealthChecksAsync(resourceGroupName, networkConnectionName).getSyncPoller(); } /** @@ -2053,7 +2081,7 @@ public SyncPoller, Void> beginRunHealthChecks( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRunHealthChecks( String resourceGroupName, String networkConnectionName, Context context) { - return beginRunHealthChecksAsync(resourceGroupName, networkConnectionName, context).getSyncPoller(); + return this.beginRunHealthChecksAsync(resourceGroupName, networkConnectionName, context).getSyncPoller(); } /** @@ -2124,6 +2152,234 @@ public void runHealthChecks(String resourceGroupName, String networkConnectionNa runHealthChecksAsync(resourceGroupName, networkConnectionName, context).block(); } + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync( + String resourceGroupName, String networkConnectionName, Integer top) { + 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 (networkConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + networkConnectionName, + 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())); + } + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync( + String resourceGroupName, String networkConnectionName, Integer top, 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 (networkConnectionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter networkConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + top, + networkConnectionName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String networkConnectionName, Integer top) { + return new PagedFlux<>( + () -> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, networkConnectionName, top), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + } + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a 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 values returned by the List operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String networkConnectionName) { + final Integer top = null; + return new PagedFlux<>( + () -> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, networkConnectionName, top), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + } + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String networkConnectionName, Integer top, Context context) { + return new PagedFlux<>( + () -> + listOutboundNetworkDependenciesEndpointsSinglePageAsync( + resourceGroupName, networkConnectionName, top, context), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + } + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a 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 values returned by the List operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName) { + final Integer top = null; + return new PagedIterable<>( + listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, networkConnectionName, top)); + } + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName, Integer top, Context context) { + return new PagedIterable<>( + listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, networkConnectionName, top, context)); + } + /** * Get the next page of items. * @@ -2353,4 +2609,85 @@ private Mono> listHealthDetailsNext 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 values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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 + .listOutboundNetworkDependenciesEndpointsNext( + 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 values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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 + .listOutboundNetworkDependenciesEndpointsNext(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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsImpl.java index ebb5165335a9d..637910c25d68a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/NetworkConnectionsImpl.java @@ -12,9 +12,11 @@ import com.azure.resourcemanager.devcenter.fluent.NetworkConnectionsClient; import com.azure.resourcemanager.devcenter.fluent.models.HealthCheckStatusDetailsInner; import com.azure.resourcemanager.devcenter.fluent.models.NetworkConnectionInner; +import com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetails; import com.azure.resourcemanager.devcenter.models.NetworkConnection; import com.azure.resourcemanager.devcenter.models.NetworkConnections; +import com.azure.resourcemanager.devcenter.models.OutboundEnvironmentEndpoint; public final class NetworkConnectionsImpl implements NetworkConnections { private static final ClientLogger LOGGER = new ClientLogger(NetworkConnectionsImpl.class); @@ -131,6 +133,22 @@ public void runHealthChecks(String resourceGroupName, String networkConnectionNa this.serviceClient().runHealthChecks(resourceGroupName, networkConnectionName, context); } + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName) { + PagedIterable inner = + this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, networkConnectionName); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName, Integer top, Context context) { + PagedIterable inner = + this + .serviceClient() + .listOutboundNetworkDependenciesEndpoints(resourceGroupName, networkConnectionName, top, context); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + public NetworkConnection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/OutboundEnvironmentEndpointImpl.java new file mode 100644 index 0000000000000..56f1611c99b7e --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/OutboundEnvironmentEndpointImpl.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.devcenter.implementation; + +import com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.devcenter.models.EndpointDependency; +import com.azure.resourcemanager.devcenter.models.OutboundEnvironmentEndpoint; +import java.util.Collections; +import java.util.List; + +public final class OutboundEnvironmentEndpointImpl implements OutboundEnvironmentEndpoint { + private OutboundEnvironmentEndpointInner innerObject; + + private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; + + OutboundEnvironmentEndpointImpl( + OutboundEnvironmentEndpointInner innerObject, + com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String category() { + return this.innerModel().category(); + } + + public List endpoints() { + List inner = this.innerModel().endpoints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OutboundEnvironmentEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.devcenter.DevCenterManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java index a701f6e5a91b6..3ae57248240ba 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolImpl.java @@ -8,12 +8,16 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.fluent.models.PoolInner; +import com.azure.resourcemanager.devcenter.models.HealthStatus; +import com.azure.resourcemanager.devcenter.models.HealthStatusDetail; import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; import com.azure.resourcemanager.devcenter.models.Pool; import com.azure.resourcemanager.devcenter.models.PoolUpdate; import com.azure.resourcemanager.devcenter.models.ProvisioningState; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; import java.util.Collections; +import java.util.List; import java.util.Map; public final class PoolImpl implements Pool, Pool.Definition, Pool.Update { @@ -50,6 +54,19 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public HealthStatus healthStatus() { + return this.innerModel().healthStatus(); + } + + public List healthStatusDetails() { + List inner = this.innerModel().healthStatusDetails(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -70,6 +87,10 @@ public LocalAdminStatus localAdministrator() { return this.innerModel().localAdministrator(); } + public StopOnDisconnectConfiguration stopOnDisconnect() { + return this.innerModel().stopOnDisconnect(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -179,6 +200,14 @@ public Pool refresh(Context context) { return this; } + public void runHealthChecks() { + serviceManager.pools().runHealthChecks(resourceGroupName, projectName, poolName); + } + + public void runHealthChecks(Context context) { + serviceManager.pools().runHealthChecks(resourceGroupName, projectName, poolName, context); + } + public PoolImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -239,6 +268,16 @@ public PoolImpl withLocalAdministrator(LocalAdminStatus localAdministrator) { } } + public PoolImpl withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect) { + if (isInCreateMode()) { + this.innerModel().withStopOnDisconnect(stopOnDisconnect); + return this; + } else { + this.updateBody.withStopOnDisconnect(stopOnDisconnect); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsClientImpl.java index 4e95ce4416c1f..19516143f518d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -147,6 +148,22 @@ Mono>> delete( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects" + + "/{projectName}/pools/{poolName}/runHealthChecks") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> runHealthChecks( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("projectName") String projectName, + @PathParam("poolName") String poolName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -702,7 +719,7 @@ private PollerFlux, PoolInner> beginCreateOrUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PoolInner> beginCreateOrUpdate( String resourceGroupName, String projectName, String poolName, PoolInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, body).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, body).getSyncPoller(); } /** @@ -721,7 +738,7 @@ public SyncPoller, PoolInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PoolInner> beginCreateOrUpdate( String resourceGroupName, String projectName, String poolName, PoolInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, body, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, body, context).getSyncPoller(); } /** @@ -981,7 +998,7 @@ private PollerFlux, PoolInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PoolInner> beginUpdate( String resourceGroupName, String projectName, String poolName, PoolUpdate body) { - return beginUpdateAsync(resourceGroupName, projectName, poolName, body).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, projectName, poolName, body).getSyncPoller(); } /** @@ -1000,7 +1017,7 @@ public SyncPoller, PoolInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PoolInner> beginUpdate( String resourceGroupName, String projectName, String poolName, PoolUpdate body, Context context) { - return beginUpdateAsync(resourceGroupName, projectName, poolName, body, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, projectName, poolName, body, context).getSyncPoller(); } /** @@ -1242,7 +1259,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String projectName, String poolName) { - return beginDeleteAsync(resourceGroupName, projectName, poolName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, projectName, poolName).getSyncPoller(); } /** @@ -1260,7 +1277,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String projectName, String poolName, Context context) { - return beginDeleteAsync(resourceGroupName, projectName, poolName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, projectName, poolName, context).getSyncPoller(); } /** @@ -1331,6 +1348,259 @@ public void delete(String resourceGroupName, String projectName, String poolName deleteAsync(resourceGroupName, projectName, poolName, context).block(); } + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> runHealthChecksWithResponseAsync( + String resourceGroupName, String projectName, String poolName) { + 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 (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .runHealthChecks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + projectName, + poolName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> runHealthChecksWithResponseAsync( + String resourceGroupName, String projectName, String poolName, 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 (projectName == null) { + return Mono.error(new IllegalArgumentException("Parameter projectName is required and cannot be null.")); + } + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .runHealthChecks( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + projectName, + poolName, + accept, + context); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRunHealthChecksAsync( + String resourceGroupName, String projectName, String poolName) { + Mono>> mono = + runHealthChecksWithResponseAsync(resourceGroupName, projectName, poolName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRunHealthChecksAsync( + String resourceGroupName, String projectName, String poolName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + runHealthChecksWithResponseAsync(resourceGroupName, projectName, poolName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRunHealthChecks( + String resourceGroupName, String projectName, String poolName) { + return this.beginRunHealthChecksAsync(resourceGroupName, projectName, poolName).getSyncPoller(); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRunHealthChecks( + String resourceGroupName, String projectName, String poolName, Context context) { + return this.beginRunHealthChecksAsync(resourceGroupName, projectName, poolName, context).getSyncPoller(); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runHealthChecksAsync(String resourceGroupName, String projectName, String poolName) { + return beginRunHealthChecksAsync(resourceGroupName, projectName, poolName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runHealthChecksAsync( + String resourceGroupName, String projectName, String poolName, Context context) { + return beginRunHealthChecksAsync(resourceGroupName, projectName, poolName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void runHealthChecks(String resourceGroupName, String projectName, String poolName) { + runHealthChecksAsync(resourceGroupName, projectName, poolName).block(); + } + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void runHealthChecks(String resourceGroupName, String projectName, String poolName, Context context) { + runHealthChecksAsync(resourceGroupName, projectName, poolName, context).block(); + } + /** * Get the next page of items. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsImpl.java index 81c1a04208aff..456bef1090664 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/PoolsImpl.java @@ -70,6 +70,14 @@ public void delete(String resourceGroupName, String projectName, String poolName this.serviceClient().delete(resourceGroupName, projectName, poolName, context); } + public void runHealthChecks(String resourceGroupName, String projectName, String poolName) { + this.serviceClient().runHealthChecks(resourceGroupName, projectName, poolName); + } + + public void runHealthChecks(String resourceGroupName, String projectName, String poolName, Context context) { + this.serviceClient().runHealthChecks(resourceGroupName, projectName, poolName, context); + } + public Pool getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectEnvironmentTypeImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectEnvironmentTypeImpl.java index 18bab97e2fea1..f8d3e81c4cffb 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectEnvironmentTypeImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectEnvironmentTypeImpl.java @@ -8,7 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.fluent.models.ProjectEnvironmentTypeInner; -import com.azure.resourcemanager.devcenter.models.EnableStatus; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdate; @@ -65,7 +65,7 @@ public String deploymentTargetId() { return this.innerModel().deploymentTargetId(); } - public EnableStatus status() { + public EnvironmentTypeEnableStatus status() { return this.innerModel().status(); } @@ -238,7 +238,7 @@ public ProjectEnvironmentTypeImpl withDeploymentTargetId(String deploymentTarget } } - public ProjectEnvironmentTypeImpl withStatus(EnableStatus status) { + public ProjectEnvironmentTypeImpl withStatus(EnvironmentTypeEnableStatus status) { if (isInCreateMode()) { this.innerModel().withStatus(status); return this; diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectImpl.java index bb3954bab0824..aa28e29861f3f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectImpl.java @@ -64,6 +64,10 @@ public String description() { return this.innerModel().description(); } + public Integer maxDevBoxesPerUser() { + return this.innerModel().maxDevBoxesPerUser(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -206,6 +210,16 @@ public ProjectImpl withDescription(String description) { } } + public ProjectImpl withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser) { + if (isInCreateMode()) { + this.innerModel().withMaxDevBoxesPerUser(maxDevBoxesPerUser); + return this; + } else { + this.updateBody.withMaxDevBoxesPerUser(maxDevBoxesPerUser); + return this; + } + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectsClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectsClientImpl.java index 2dcf8b6b0ac82..358d2b8d32dd9 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectsClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ProjectsClientImpl.java @@ -842,7 +842,7 @@ private PollerFlux, ProjectInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ProjectInner> beginCreateOrUpdate( String resourceGroupName, String projectName, ProjectInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, projectName, body).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, projectName, body).getSyncPoller(); } /** @@ -860,7 +860,7 @@ public SyncPoller, ProjectInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ProjectInner> beginCreateOrUpdate( String resourceGroupName, String projectName, ProjectInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, projectName, body, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, projectName, body, context).getSyncPoller(); } /** @@ -1101,7 +1101,7 @@ private PollerFlux, ProjectInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ProjectInner> beginUpdate( String resourceGroupName, String projectName, ProjectUpdate body) { - return beginUpdateAsync(resourceGroupName, projectName, body).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, projectName, body).getSyncPoller(); } /** @@ -1119,7 +1119,7 @@ public SyncPoller, ProjectInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ProjectInner> beginUpdate( String resourceGroupName, String projectName, ProjectUpdate body, Context context) { - return beginUpdateAsync(resourceGroupName, projectName, body, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, projectName, body, context).getSyncPoller(); } /** @@ -1338,7 +1338,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String projectName) { - return beginDeleteAsync(resourceGroupName, projectName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, projectName).getSyncPoller(); } /** @@ -1355,7 +1355,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String projectName, Context context) { - return beginDeleteAsync(resourceGroupName, projectName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, projectName, context).getSyncPoller(); } /** diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ScheduleImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ScheduleImpl.java index bae3cab45f2ed..37d0cb9916847 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ScheduleImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/ScheduleImpl.java @@ -7,9 +7,9 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.fluent.models.ScheduleInner; -import com.azure.resourcemanager.devcenter.models.EnableStatus; import com.azure.resourcemanager.devcenter.models.ProvisioningState; import com.azure.resourcemanager.devcenter.models.Schedule; +import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; import com.azure.resourcemanager.devcenter.models.ScheduleUpdate; import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; import com.azure.resourcemanager.devcenter.models.ScheduledType; @@ -56,7 +56,7 @@ public String timeZone() { return this.innerModel().timeZone(); } - public EnableStatus state() { + public ScheduleEnableStatus state() { return this.innerModel().state(); } @@ -210,7 +210,7 @@ public ScheduleImpl withTimeZone(String timeZone) { } } - public ScheduleImpl withState(EnableStatus state) { + public ScheduleImpl withState(ScheduleEnableStatus state) { if (isInCreateMode()) { this.innerModel().withState(state); return this; diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SchedulesClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SchedulesClientImpl.java index f7224428e4ee7..456b92ac91c30 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SchedulesClientImpl.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/SchedulesClientImpl.java @@ -836,7 +836,8 @@ private PollerFlux, ScheduleInner> beginCreateOrUpdate public SyncPoller, ScheduleInner> beginCreateOrUpdate( String resourceGroupName, String projectName, String poolName, String scheduleName, ScheduleInner body) { final Integer top = null; - return beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top) + return this + .beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top) .getSyncPoller(); } @@ -864,7 +865,8 @@ public SyncPoller, ScheduleInner> beginCreateOrUpdate( ScheduleInner body, Integer top, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top, context) .getSyncPoller(); } @@ -1251,7 +1253,7 @@ private PollerFlux, ScheduleInner> beginUpdateAsync( public SyncPoller, ScheduleInner> beginUpdate( String resourceGroupName, String projectName, String poolName, String scheduleName, ScheduleUpdate body) { final Integer top = null; - return beginUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top).getSyncPoller(); } /** @@ -1278,7 +1280,8 @@ public SyncPoller, ScheduleInner> beginUpdate( ScheduleUpdate body, Integer top, Context context) { - return beginUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top, context) + return this + .beginUpdateAsync(resourceGroupName, projectName, poolName, scheduleName, body, top, context) .getSyncPoller(); } @@ -1624,7 +1627,7 @@ private PollerFlux, Void> beginDeleteAsync( public SyncPoller, Void> beginDelete( String resourceGroupName, String projectName, String poolName, String scheduleName) { final Integer top = null; - return beginDeleteAsync(resourceGroupName, projectName, poolName, scheduleName, top).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, projectName, poolName, scheduleName, top).getSyncPoller(); } /** @@ -1649,7 +1652,9 @@ public SyncPoller, Void> beginDelete( String scheduleName, Integer top, Context context) { - return beginDeleteAsync(resourceGroupName, projectName, poolName, scheduleName, top, context).getSyncPoller(); + return this + .beginDeleteAsync(resourceGroupName, projectName, poolName, scheduleName, top, context) + .getSyncPoller(); } /** diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsageImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsageImpl.java deleted file mode 100644 index 7f566ad645c0d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsageImpl.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.devcenter.implementation; - -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; -import com.azure.resourcemanager.devcenter.models.Usage; -import com.azure.resourcemanager.devcenter.models.UsageName; -import com.azure.resourcemanager.devcenter.models.UsageUnit; - -public final class UsageImpl implements Usage { - private UsageInner innerObject; - - private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; - - UsageImpl(UsageInner innerObject, com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Long currentValue() { - return this.innerModel().currentValue(); - } - - public Long limit() { - return this.innerModel().limit(); - } - - public UsageUnit unit() { - return this.innerModel().unit(); - } - - public UsageName name() { - return this.innerModel().name(); - } - - public UsageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.devcenter.DevCenterManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsagesClientImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsagesClientImpl.java deleted file mode 100644 index c5d1a3e7582ab..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsagesClientImpl.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.devcenter.fluent.UsagesClient; -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; -import com.azure.resourcemanager.devcenter.models.ListUsagesResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public final class UsagesClientImpl implements UsagesClient { - /** The proxy service used to perform REST calls. */ - private final UsagesService service; - - /** The service client containing this operation class. */ - private final DevCenterManagementClientImpl client; - - /** - * Initializes an instance of UsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - UsagesClientImpl(DevCenterManagementClientImpl client) { - this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DevCenterManagementClientUsages to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DevCenterManagementC") - public interface UsagesService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DevCenter/locations/{location}/usages") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - 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())); - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync(String location, 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByLocation( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(location), nextLink -> listByLocationNextSinglePageAsync(nextLink)); - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(location, context), - nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location) { - return new PagedIterable<>(listByLocationAsync(location)); - } - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByLocation(String location, Context context) { - return new PagedIterable<>(listByLocationAsync(location, 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 list of Core Usages along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(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.listByLocationNext(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 list of Core Usages along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync(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 - .listByLocationNext(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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsagesImpl.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsagesImpl.java deleted file mode 100644 index 11887db84f98a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/implementation/UsagesImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.fluent.UsagesClient; -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; -import com.azure.resourcemanager.devcenter.models.Usage; -import com.azure.resourcemanager.devcenter.models.Usages; - -public final class UsagesImpl implements Usages { - private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); - - private final UsagesClient innerClient; - - private final com.azure.resourcemanager.devcenter.DevCenterManager serviceManager; - - public UsagesImpl(UsagesClient innerClient, com.azure.resourcemanager.devcenter.DevCenterManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByLocation(String location) { - PagedIterable inner = this.serviceClient().listByLocation(location); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - public PagedIterable listByLocation(String location, Context context) { - PagedIterable inner = this.serviceClient().listByLocation(location, context); - return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - private UsagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.devcenter.DevCenterManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ActionType.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ActionType.java index 36b4c2dac19af..974c5019c3a46 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ActionType.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ActionType.java @@ -13,6 +13,15 @@ public final class ActionType extends ExpandableStringEnum { /** Static value Internal for ActionType. */ public static final ActionType INTERNAL = fromString("Internal"); + /** + * Creates a new instance of ActionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncState.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncState.java index ce1ddf2868cd7..b6126a4e56795 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncState.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/CatalogSyncState.java @@ -22,6 +22,15 @@ public final class CatalogSyncState extends ExpandableStringEnum { /** Static value AzureADJoin for DomainJoinType. */ public static final DomainJoinType AZURE_ADJOIN = fromString("AzureADJoin"); + /** + * Creates a new instance of DomainJoinType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DomainJoinType() { + } + /** * Creates or finds a DomainJoinType from its string representation. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnableStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnableStatus.java deleted file mode 100644 index 5cd40cbfefea1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnableStatus.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.devcenter.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Enable or disable status. Indicates whether the property applied to is either enabled or disabled. */ -public final class EnableStatus extends ExpandableStringEnum { - /** Static value Enabled for EnableStatus. */ - public static final EnableStatus ENABLED = fromString("Enabled"); - - /** Static value Disabled for EnableStatus. */ - public static final EnableStatus DISABLED = fromString("Disabled"); - - /** - * Creates or finds a EnableStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnableStatus. - */ - @JsonCreator - public static EnableStatus fromString(String name) { - return fromString(name, EnableStatus.class); - } - - /** - * Gets known EnableStatus values. - * - * @return known EnableStatus values. - */ - public static Collection values() { - return values(EnableStatus.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EndpointDependency.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EndpointDependency.java new file mode 100644 index 0000000000000..5e03354b42adf --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EndpointDependency.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A domain name and connection details used to access a dependency. */ +@Immutable +public final class EndpointDependency { + /* + * The domain name of the dependency. Domain names may be fully qualified or may contain a * wildcard. + */ + @JsonProperty(value = "domainName", access = JsonProperty.Access.WRITE_ONLY) + private String domainName; + + /* + * Human-readable supplemental information about the dependency and when it is applicable. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * The list of connection details for this endpoint. + */ + @JsonProperty(value = "endpointDetails", access = JsonProperty.Access.WRITE_ONLY) + private List endpointDetails; + + /** Creates an instance of EndpointDependency class. */ + public EndpointDependency() { + } + + /** + * Get the domainName property: The domain name of the dependency. Domain names may be fully qualified or may + * contain a * wildcard. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Get the description property: Human-readable supplemental information about the dependency and when it is + * applicable. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the endpointDetails property: The list of connection details for this endpoint. + * + * @return the endpointDetails value. + */ + public List endpointDetails() { + return this.endpointDetails; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpointDetails() != null) { + endpointDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EndpointDetail.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EndpointDetail.java new file mode 100644 index 0000000000000..a5fee9e11c03d --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EndpointDetail.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details about the connection between the Batch service and the endpoint. */ +@Immutable +public final class EndpointDetail { + /* + * The port an endpoint is connected to. + */ + @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) + private Integer port; + + /** Creates an instance of EndpointDetail class. */ + public EndpointDetail() { + } + + /** + * Get the port property: The port an endpoint is connected to. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentTypeEnableStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentTypeEnableStatus.java new file mode 100644 index 0000000000000..beba5c0c548ec --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/EnvironmentTypeEnableStatus.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.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Indicates whether the environment type is either enabled or disabled. */ +public final class EnvironmentTypeEnableStatus extends ExpandableStringEnum { + /** Static value Enabled for EnvironmentTypeEnableStatus. */ + public static final EnvironmentTypeEnableStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for EnvironmentTypeEnableStatus. */ + public static final EnvironmentTypeEnableStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of EnvironmentTypeEnableStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EnvironmentTypeEnableStatus() { + } + + /** + * Creates or finds a EnvironmentTypeEnableStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnvironmentTypeEnableStatus. + */ + @JsonCreator + public static EnvironmentTypeEnableStatus fromString(String name) { + return fromString(name, EnvironmentTypeEnableStatus.class); + } + + /** + * Gets known EnvironmentTypeEnableStatus values. + * + * @return known EnvironmentTypeEnableStatus values. + */ + public static Collection values() { + return values(EnvironmentTypeEnableStatus.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HealthCheckStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HealthCheckStatus.java index c40ec0404134b..717d139ebe817 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HealthCheckStatus.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HealthCheckStatus.java @@ -10,6 +10,9 @@ /** Health check status values. */ public final class HealthCheckStatus extends ExpandableStringEnum { + /** Static value Unknown for HealthCheckStatus. */ + public static final HealthCheckStatus UNKNOWN = fromString("Unknown"); + /** Static value Pending for HealthCheckStatus. */ public static final HealthCheckStatus PENDING = fromString("Pending"); @@ -19,14 +22,20 @@ public final class HealthCheckStatus extends ExpandableStringEnum { + /** Static value Unknown for HealthStatus. */ + public static final HealthStatus UNKNOWN = fromString("Unknown"); + + /** Static value Pending for HealthStatus. */ + public static final HealthStatus PENDING = fromString("Pending"); + + /** Static value Healthy for HealthStatus. */ + public static final HealthStatus HEALTHY = fromString("Healthy"); + + /** Static value Warning for HealthStatus. */ + public static final HealthStatus WARNING = fromString("Warning"); + + /** Static value Unhealthy for HealthStatus. */ + public static final HealthStatus UNHEALTHY = fromString("Unhealthy"); + + /** + * Creates a new instance of HealthStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HealthStatus() { + } + + /** + * Creates or finds a HealthStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding HealthStatus. + */ + @JsonCreator + public static HealthStatus fromString(String name) { + return fromString(name, HealthStatus.class); + } + + /** + * Gets known HealthStatus values. + * + * @return known HealthStatus values. + */ + public static Collection values() { + return values(HealthStatus.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HealthStatusDetail.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HealthStatusDetail.java new file mode 100644 index 0000000000000..510b7bf8fbb2d --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HealthStatusDetail.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Pool health status detail. */ +@Immutable +public final class HealthStatusDetail { + /* + * An identifier for the issue. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * A message describing the issue, intended to be suitable for display in a user interface + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** Creates an instance of HealthStatusDetail class. */ + public HealthStatusDetail() { + } + + /** + * Get the code property: An identifier for the issue. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: A message describing the issue, intended to be suitable for display in a user + * interface. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HibernateSupport.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HibernateSupport.java index c3892a3d6cafa..800b6dee0a9b9 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HibernateSupport.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/HibernateSupport.java @@ -16,6 +16,15 @@ public final class HibernateSupport extends ExpandableStringEnum { /** Static value Windows_Client for LicenseType. */ public static final LicenseType WINDOWS_CLIENT = fromString("Windows_Client"); + /** + * Creates a new instance of LicenseType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LicenseType() { + } + /** * Creates or finds a LicenseType from its string representation. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ListUsagesResult.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ListUsagesResult.java deleted file mode 100644 index b7f1d5d2239c7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ListUsagesResult.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of Core Usages. */ -@Immutable -public final class ListUsagesResult { - /* - * The array page of Usages. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /* - * The link to get the next page of Usage result. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of ListUsagesResult class. */ - public ListUsagesResult() { - } - - /** - * Get the value property: The array page of Usages. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The link to get the next page of Usage result. - * - * @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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java index efd76551e7b0e..84a67cdd92ab0 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/LocalAdminStatus.java @@ -16,6 +16,15 @@ public final class LocalAdminStatus extends ExpandableStringEnum getHealthDetailsWithResponse( */ void runHealthChecks(String resourceGroupName, String networkConnectionName, Context context); + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a 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 values returned by the List operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName); + + /** + * Lists the endpoints that agents may call as part of Dev Box service administration. These FQDNs should be allowed + * for outbound access in order for the Dev Box service to function. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param networkConnectionName Name of the Network Connection that can be applied to a Pool. + * @param top The maximum number of resources to return from the operation. Example: '$top=10'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String networkConnectionName, Integer top, Context context); + /** * Gets a network connection resource. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Origin.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Origin.java index 920555085b39f..9e5fee8f49ce4 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Origin.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Origin.java @@ -22,6 +22,15 @@ public final class Origin extends ExpandableStringEnum { /** Static value user,system for Origin. */ public static final Origin USER_SYSTEM = fromString("user,system"); + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + /** * Creates or finds a Origin from its string representation. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/OutboundEnvironmentEndpoint.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/OutboundEnvironmentEndpoint.java new file mode 100644 index 0000000000000..71243e340c3ba --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/OutboundEnvironmentEndpoint.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.devcenter.models; + +import com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner; +import java.util.List; + +/** An immutable client-side representation of OutboundEnvironmentEndpoint. */ +public interface OutboundEnvironmentEndpoint { + /** + * Gets the category property: The type of service that the agent connects to. + * + * @return the category value. + */ + String category(); + + /** + * Gets the endpoints property: The endpoints for this service for which the agent requires outbound access. + * + * @return the endpoints value. + */ + List endpoints(); + + /** + * Gets the inner com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner object. + * + * @return the inner object. + */ + OutboundEnvironmentEndpointInner innerModel(); +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/OutboundEnvironmentEndpointCollection.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/OutboundEnvironmentEndpointCollection.java new file mode 100644 index 0000000000000..43ef06d296825 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/OutboundEnvironmentEndpointCollection.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.devcenter.fluent.models.OutboundEnvironmentEndpointInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Values returned by the List operation. */ +@Fluent +public final class OutboundEnvironmentEndpointCollection { + /* + * The collection of outbound network dependency endpoints returned by the listing operation. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * The continuation token. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of OutboundEnvironmentEndpointCollection class. */ + public OutboundEnvironmentEndpointCollection() { + } + + /** + * Get the value property: The collection of outbound network dependency endpoints returned by the listing + * operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The continuation token. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The continuation token. + * + * @param nextLink the nextLink value to set. + * @return the OutboundEnvironmentEndpointCollection object itself. + */ + public OutboundEnvironmentEndpointCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * 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/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java index b2766c0e2c628..6d73afd35564b 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pool.java @@ -8,6 +8,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.fluent.models.PoolInner; +import java.util.List; import java.util.Map; /** An immutable client-side representation of Pool. */ @@ -54,6 +55,22 @@ public interface Pool { */ SystemData systemData(); + /** + * Gets the healthStatus property: Overall health status of the Pool. Indicates whether or not the Pool is available + * to create Dev Boxes. + * + * @return the healthStatus value. + */ + HealthStatus healthStatus(); + + /** + * Gets the healthStatusDetails property: Details on the Pool health status to help diagnose issues. This is only + * populated when the pool status indicates the pool is in a non-healthy state. + * + * @return the healthStatusDetails value. + */ + List healthStatusDetails(); + /** * Gets the provisioningState property: The provisioning state of the resource. * @@ -91,6 +108,13 @@ public interface Pool { */ LocalAdminStatus localAdministrator(); + /** + * Gets the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created in this pool. + * + * @return the stopOnDisconnect value. + */ + StopOnDisconnectConfiguration stopOnDisconnect(); + /** * Gets the region of the resource. * @@ -169,7 +193,8 @@ interface WithCreate DefinitionStages.WithDevBoxDefinitionName, DefinitionStages.WithNetworkConnectionName, DefinitionStages.WithLicenseType, - DefinitionStages.WithLocalAdministrator { + DefinitionStages.WithLocalAdministrator, + DefinitionStages.WithStopOnDisconnect { /** * Executes the create request. * @@ -240,6 +265,17 @@ interface WithLocalAdministrator { */ WithCreate withLocalAdministrator(LocalAdminStatus localAdministrator); } + /** The stage of the Pool definition allowing to specify stopOnDisconnect. */ + interface WithStopOnDisconnect { + /** + * Specifies the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created + * in this pool.. + * + * @param stopOnDisconnect Stop on disconnect configuration settings for Dev Boxes created in this pool. + * @return the next definition stage. + */ + WithCreate withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect); + } } /** * Begins update for the Pool resource. @@ -254,7 +290,8 @@ interface Update UpdateStages.WithDevBoxDefinitionName, UpdateStages.WithNetworkConnectionName, UpdateStages.WithLicenseType, - UpdateStages.WithLocalAdministrator { + UpdateStages.WithLocalAdministrator, + UpdateStages.WithStopOnDisconnect { /** * Executes the update request. * @@ -327,6 +364,17 @@ interface WithLocalAdministrator { */ Update withLocalAdministrator(LocalAdminStatus localAdministrator); } + /** The stage of the Pool update allowing to specify stopOnDisconnect. */ + interface WithStopOnDisconnect { + /** + * Specifies the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created + * in this pool.. + * + * @param stopOnDisconnect Stop on disconnect configuration settings for Dev Boxes created in this pool. + * @return the next definition stage. + */ + Update withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect); + } } /** * Refreshes the resource to sync with Azure. @@ -342,4 +390,22 @@ interface WithLocalAdministrator { * @return the refreshed resource. */ Pool refresh(Context context); + + /** + * Triggers a refresh of the pool status. + * + * @throws com.azure.core.management.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 runHealthChecks(); + + /** + * Triggers a refresh of the pool status. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.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 runHealthChecks(Context context); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java index 3a0465d2a56d2..468422a3aeb7e 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/PoolUpdate.java @@ -141,6 +141,29 @@ public PoolUpdate withLocalAdministrator(LocalAdminStatus localAdministrator) { return this; } + /** + * Get the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created in this pool. + * + * @return the stopOnDisconnect value. + */ + public StopOnDisconnectConfiguration stopOnDisconnect() { + return this.innerProperties() == null ? null : this.innerProperties().stopOnDisconnect(); + } + + /** + * Set the stopOnDisconnect property: Stop on disconnect configuration settings for Dev Boxes created in this pool. + * + * @param stopOnDisconnect the stopOnDisconnect value to set. + * @return the PoolUpdate object itself. + */ + public PoolUpdate withStopOnDisconnect(StopOnDisconnectConfiguration stopOnDisconnect) { + if (this.innerProperties() == null) { + this.innerProperties = new PoolUpdateProperties(); + } + this.innerProperties().withStopOnDisconnect(stopOnDisconnect); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pools.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pools.java index 0a1677969b161..d684a4d78b6d3 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pools.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Pools.java @@ -88,6 +88,31 @@ public interface Pools { */ void delete(String resourceGroupName, String projectName, String poolName, Context context); + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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. + */ + void runHealthChecks(String resourceGroupName, String projectName, String poolName); + + /** + * Triggers a refresh of the pool status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param projectName The name of the project. + * @param poolName Name of the 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. + */ + void runHealthChecks(String resourceGroupName, String projectName, String poolName, Context context); + /** * Gets a machine pool. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java index 39b0b17a4a57a..c91e6ab942d58 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Project.java @@ -82,6 +82,14 @@ public interface Project { */ String description(); + /** + * Gets the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a single user can + * create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * + * @return the maxDevBoxesPerUser value. + */ + Integer maxDevBoxesPerUser(); + /** * Gets the region of the resource. * @@ -155,7 +163,10 @@ interface WithResourceGroup { * created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithDevCenterId, DefinitionStages.WithDescription { + extends DefinitionStages.WithTags, + DefinitionStages.WithDevCenterId, + DefinitionStages.WithDescription, + DefinitionStages.WithMaxDevBoxesPerUser { /** * Executes the create request. * @@ -201,6 +212,19 @@ interface WithDescription { */ WithCreate withDescription(String description); } + /** The stage of the Project definition allowing to specify maxDevBoxesPerUser. */ + interface WithMaxDevBoxesPerUser { + /** + * Specifies the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a + * single user can create across all pools in the project. This will have no effect on existing Dev Boxes + * when reduced.. + * + * @param maxDevBoxesPerUser When specified, limits the maximum number of Dev Boxes a single user can create + * across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * @return the next definition stage. + */ + WithCreate withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser); + } } /** * Begins update for the Project resource. @@ -210,7 +234,11 @@ interface WithDescription { Project.Update update(); /** The template for Project update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithDevCenterId, UpdateStages.WithDescription { + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithDevCenterId, + UpdateStages.WithDescription, + UpdateStages.WithMaxDevBoxesPerUser { /** * Executes the update request. * @@ -258,6 +286,19 @@ interface WithDescription { */ Update withDescription(String description); } + /** The stage of the Project update allowing to specify maxDevBoxesPerUser. */ + interface WithMaxDevBoxesPerUser { + /** + * Specifies the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a + * single user can create across all pools in the project. This will have no effect on existing Dev Boxes + * when reduced.. + * + * @param maxDevBoxesPerUser When specified, limits the maximum number of Dev Boxes a single user can create + * across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * @return the next definition stage. + */ + Update withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser); + } } /** * Refreshes the resource to sync with Azure. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java index 74530f76f5867..13035c09bd079 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentType.java @@ -81,7 +81,7 @@ public interface ProjectEnvironmentType { * * @return the status value. */ - EnableStatus status(); + EnvironmentTypeEnableStatus status(); /** * Gets the creatorRoleAssignment property: The role definition assigned to the environment creator on backing @@ -232,7 +232,7 @@ interface WithStatus { * @param status Defines whether this Environment Type can be used in this Project. * @return the next definition stage. */ - WithCreate withStatus(EnableStatus status); + WithCreate withStatus(EnvironmentTypeEnableStatus status); } /** The stage of the ProjectEnvironmentType definition allowing to specify creatorRoleAssignment. */ interface WithCreatorRoleAssignment { @@ -332,7 +332,7 @@ interface WithStatus { * @param status Defines whether this Environment Type can be used in this Project. * @return the next definition stage. */ - Update withStatus(EnableStatus status); + Update withStatus(EnvironmentTypeEnableStatus status); } /** The stage of the ProjectEnvironmentType update allowing to specify creatorRoleAssignment. */ interface WithCreatorRoleAssignment { diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentTypeUpdate.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentTypeUpdate.java index e0f33d59a3e7e..34c49d139ffbf 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentTypeUpdate.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectEnvironmentTypeUpdate.java @@ -117,7 +117,7 @@ public ProjectEnvironmentTypeUpdate withDeploymentTargetId(String deploymentTarg * * @return the status value. */ - public EnableStatus status() { + public EnvironmentTypeEnableStatus status() { return this.innerProperties() == null ? null : this.innerProperties().status(); } @@ -127,7 +127,7 @@ public EnableStatus status() { * @param status the status value to set. * @return the ProjectEnvironmentTypeUpdate object itself. */ - public ProjectEnvironmentTypeUpdate withStatus(EnableStatus status) { + public ProjectEnvironmentTypeUpdate withStatus(EnvironmentTypeEnableStatus status) { if (this.innerProperties() == null) { this.innerProperties = new ProjectEnvironmentTypeUpdateProperties(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectUpdate.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectUpdate.java index c64fdc153b76c..b3dc76cd969aa 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectUpdate.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProjectUpdate.java @@ -91,6 +91,31 @@ public ProjectUpdate withDescription(String description) { return this; } + /** + * Get the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a single user can + * create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * + * @return the maxDevBoxesPerUser value. + */ + public Integer maxDevBoxesPerUser() { + return this.innerProperties() == null ? null : this.innerProperties().maxDevBoxesPerUser(); + } + + /** + * Set the maxDevBoxesPerUser property: When specified, limits the maximum number of Dev Boxes a single user can + * create across all pools in the project. This will have no effect on existing Dev Boxes when reduced. + * + * @param maxDevBoxesPerUser the maxDevBoxesPerUser value to set. + * @return the ProjectUpdate object itself. + */ + public ProjectUpdate withMaxDevBoxesPerUser(Integer maxDevBoxesPerUser) { + if (this.innerProperties() == null) { + this.innerProperties = new ProjectUpdateProperties(); + } + this.innerProperties().withMaxDevBoxesPerUser(maxDevBoxesPerUser); + return this; + } + /** * Validates the instance. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProvisioningState.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProvisioningState.java index 06b356108723f..49b29e7992627 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProvisioningState.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ProvisioningState.java @@ -58,6 +58,15 @@ public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Enabled for ScheduleEnableStatus. */ + public static final ScheduleEnableStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for ScheduleEnableStatus. */ + public static final ScheduleEnableStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of ScheduleEnableStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScheduleEnableStatus() { + } + + /** + * Creates or finds a ScheduleEnableStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScheduleEnableStatus. + */ + @JsonCreator + public static ScheduleEnableStatus fromString(String name) { + return fromString(name, ScheduleEnableStatus.class); + } + + /** + * Gets known ScheduleEnableStatus values. + * + * @return known ScheduleEnableStatus values. + */ + public static Collection values() { + return values(ScheduleEnableStatus.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduleUpdate.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduleUpdate.java index eff249617e439..600b781d9db3e 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduleUpdate.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduleUpdate.java @@ -142,7 +142,7 @@ public ScheduleUpdate withTimeZone(String timeZone) { * * @return the state value. */ - public EnableStatus state() { + public ScheduleEnableStatus state() { return this.innerProperties() == null ? null : this.innerProperties().state(); } @@ -152,7 +152,7 @@ public EnableStatus state() { * @param state the state value to set. * @return the ScheduleUpdate object itself. */ - public ScheduleUpdate withState(EnableStatus state) { + public ScheduleUpdate withState(ScheduleEnableStatus state) { if (this.innerProperties() == null) { this.innerProperties = new ScheduleUpdateProperties(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduledFrequency.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduledFrequency.java index 364d70b2e15a3..05848f9a1bf02 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduledFrequency.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/ScheduledFrequency.java @@ -13,6 +13,15 @@ public final class ScheduledFrequency extends ExpandableStringEnum { /** Static value StopDevBox for ScheduledType. */ public static final ScheduledType STOP_DEV_BOX = fromString("StopDevBox"); + /** + * Creates a new instance of ScheduledType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScheduledType() { + } + /** * Creates or finds a ScheduledType from its string representation. * diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/StopOnDisconnectConfiguration.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/StopOnDisconnectConfiguration.java new file mode 100644 index 0000000000000..300710d056d0b --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/StopOnDisconnectConfiguration.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Stop on disconnect configuration settings for Dev Boxes created in this pool. */ +@Fluent +public final class StopOnDisconnectConfiguration { + /* + * Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled. + */ + @JsonProperty(value = "status") + private StopOnDisconnectEnableStatus status; + + /* + * The specified time in minutes to wait before stopping a Dev Box once disconnect is detected. + */ + @JsonProperty(value = "gracePeriodMinutes") + private Integer gracePeriodMinutes; + + /** Creates an instance of StopOnDisconnectConfiguration class. */ + public StopOnDisconnectConfiguration() { + } + + /** + * Get the status property: Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed + * is enabled. + * + * @return the status value. + */ + public StopOnDisconnectEnableStatus status() { + return this.status; + } + + /** + * Set the status property: Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed + * is enabled. + * + * @param status the status value to set. + * @return the StopOnDisconnectConfiguration object itself. + */ + public StopOnDisconnectConfiguration withStatus(StopOnDisconnectEnableStatus status) { + this.status = status; + return this; + } + + /** + * Get the gracePeriodMinutes property: The specified time in minutes to wait before stopping a Dev Box once + * disconnect is detected. + * + * @return the gracePeriodMinutes value. + */ + public Integer gracePeriodMinutes() { + return this.gracePeriodMinutes; + } + + /** + * Set the gracePeriodMinutes property: The specified time in minutes to wait before stopping a Dev Box once + * disconnect is detected. + * + * @param gracePeriodMinutes the gracePeriodMinutes value to set. + * @return the StopOnDisconnectConfiguration object itself. + */ + public StopOnDisconnectConfiguration withGracePeriodMinutes(Integer gracePeriodMinutes) { + this.gracePeriodMinutes = gracePeriodMinutes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/StopOnDisconnectEnableStatus.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/StopOnDisconnectEnableStatus.java new file mode 100644 index 0000000000000..61ccb235c1556 --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/StopOnDisconnectEnableStatus.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Stop on disconnect enable or disable status. Indicates whether stop on disconnect to is either enabled or disabled. + */ +public final class StopOnDisconnectEnableStatus extends ExpandableStringEnum { + /** Static value Enabled for StopOnDisconnectEnableStatus. */ + public static final StopOnDisconnectEnableStatus ENABLED = fromString("Enabled"); + + /** Static value Disabled for StopOnDisconnectEnableStatus. */ + public static final StopOnDisconnectEnableStatus DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of StopOnDisconnectEnableStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StopOnDisconnectEnableStatus() { + } + + /** + * Creates or finds a StopOnDisconnectEnableStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding StopOnDisconnectEnableStatus. + */ + @JsonCreator + public static StopOnDisconnectEnableStatus fromString(String name) { + return fromString(name, StopOnDisconnectEnableStatus.class); + } + + /** + * Gets known StopOnDisconnectEnableStatus values. + * + * @return known StopOnDisconnectEnableStatus values. + */ + public static Collection values() { + return values(StopOnDisconnectEnableStatus.class); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Usage.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Usage.java deleted file mode 100644 index 4c9eba99c7a85..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Usage.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.devcenter.models; - -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; - -/** An immutable client-side representation of Usage. */ -public interface Usage { - /** - * Gets the currentValue property: The current usage. - * - * @return the currentValue value. - */ - Long currentValue(); - - /** - * Gets the limit property: The limit integer. - * - * @return the limit value. - */ - Long limit(); - - /** - * Gets the unit property: The unit details. - * - * @return the unit value. - */ - UsageUnit unit(); - - /** - * Gets the name property: The name. - * - * @return the name value. - */ - UsageName name(); - - /** - * Gets the inner com.azure.resourcemanager.devcenter.fluent.models.UsageInner object. - * - * @return the inner object. - */ - UsageInner innerModel(); -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/UsageName.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/UsageName.java deleted file mode 100644 index fa8fea48115d7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/UsageName.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.devcenter.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Usage Names. */ -@Fluent -public final class UsageName { - /* - * The localized name of the resource. - */ - @JsonProperty(value = "localizedValue") - private String localizedValue; - - /* - * The name of the resource. - */ - @JsonProperty(value = "value") - private String value; - - /** Creates an instance of UsageName class. */ - public UsageName() { - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Set the localizedValue property: The localized name of the resource. - * - * @param localizedValue the localizedValue value to set. - * @return the UsageName object itself. - */ - public UsageName withLocalizedValue(String localizedValue) { - this.localizedValue = localizedValue; - return this; - } - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The name of the resource. - * - * @param value the value value to set. - * @return the UsageName object itself. - */ - public UsageName withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/UsageUnit.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/UsageUnit.java deleted file mode 100644 index df58e5b95bf19..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/UsageUnit.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.devcenter.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The unit details. */ -public final class UsageUnit extends ExpandableStringEnum { - /** Static value Count for UsageUnit. */ - public static final UsageUnit COUNT = fromString("Count"); - - /** - * Creates or finds a UsageUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding UsageUnit. - */ - @JsonCreator - public static UsageUnit fromString(String name) { - return fromString(name, UsageUnit.class); - } - - /** - * Gets known UsageUnit values. - * - * @return known UsageUnit values. - */ - public static Collection values() { - return values(UsageUnit.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Usages.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Usages.java deleted file mode 100644 index 21c8ec9ab14e4..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/main/java/com/azure/resourcemanager/devcenter/models/Usages.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Usages. */ -public interface Usages { - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedIterable}. - */ - PagedIterable listByLocation(String location); - - /** - * Lists the current usages and limits in this location for the provided subscription. - * - * @param location The Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of Core Usages as paginated response with {@link PagedIterable}. - */ - PagedIterable listByLocation(String location, Context context); -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java index 70475da0ad00c..46c04c374e2a1 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for AttachedNetworks CreateOrUpdate. */ public final class AttachedNetworksCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_Create.json */ /** * Sample code: AttachedNetworks_Create. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java index 8b152b6b597b0..f44c6cdf575b6 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for AttachedNetworks Delete. */ public final class AttachedNetworksDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_Delete.json */ /** * Sample code: AttachedNetworks_Delete. @@ -17,6 +15,6 @@ public final class AttachedNetworksDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().delete("rg1", "Contoso", "network-uswest3", Context.NONE); + manager.attachedNetworks().delete("rg1", "Contoso", "network-uswest3", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java index 6d9a5c5be523f..22f783a686a85 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for AttachedNetworks GetByDevCenter. */ public final class AttachedNetworksGetByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_GetByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_GetByDevCenter.json */ /** * Sample code: AttachedNetworks_GetByDevCenter. @@ -17,6 +15,8 @@ public final class AttachedNetworksGetByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksGetByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().getByDevCenterWithResponse("rg1", "Contoso", "network-uswest3", Context.NONE); + manager + .attachedNetworks() + .getByDevCenterWithResponse("rg1", "Contoso", "network-uswest3", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java index 10c0ca0349a67..1dd8f3e1623f7 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for AttachedNetworks GetByProject. */ public final class AttachedNetworksGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_GetByProject.json */ /** * Sample code: AttachedNetworks_GetByProject. @@ -17,6 +15,8 @@ public final class AttachedNetworksGetByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksGetByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().getByProjectWithResponse("rg1", "DevProject", "network-uswest3", Context.NONE); + manager + .attachedNetworks() + .getByProjectWithResponse("rg1", "DevProject", "network-uswest3", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java index 204b6b94d6aa6..61bde13f10806 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for AttachedNetworks ListByDevCenter. */ public final class AttachedNetworksListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_ListByDevCenter.json */ /** * Sample code: AttachedNetworks_ListByDevCenter. @@ -17,6 +15,6 @@ public final class AttachedNetworksListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.attachedNetworks().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java index 50dfb4fea4df9..65b9950909539 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for AttachedNetworks ListByProject. */ public final class AttachedNetworksListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/AttachedNetworks_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/AttachedNetworks_ListByProject.json */ /** * Sample code: AttachedNetworks_ListByProject. @@ -17,6 +15,6 @@ public final class AttachedNetworksListByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void attachedNetworksListByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.attachedNetworks().listByProject("rg1", "DevProject", null, Context.NONE); + manager.attachedNetworks().listByProject("rg1", "DevProject", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java index 1a7223773ed76..d8978d7607c94 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for Catalogs CreateOrUpdate. */ public final class CatalogsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_CreateAdo.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_CreateAdo.json */ /** * Sample code: Catalogs_CreateOrUpdateAdo. @@ -31,7 +31,7 @@ public static void catalogsCreateOrUpdateAdo(com.azure.resourcemanager.devcenter } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_CreateGitHub.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_CreateGitHub.json */ /** * Sample code: Catalogs_CreateOrUpdateGitHub. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java index 24c776b3677e3..3f307a2d492b3 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Catalogs Delete. */ public final class CatalogsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Delete.json */ /** * Sample code: Catalogs_Delete. @@ -17,6 +15,6 @@ public final class CatalogsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().delete("rg1", "Contoso", "CentralCatalog", Context.NONE); + manager.catalogs().delete("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java index b000d470b9ea1..e59b560e172ff 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Catalogs Get. */ public final class CatalogsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Get.json */ /** * Sample code: Catalogs_Get. @@ -17,6 +15,6 @@ public final class CatalogsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().getWithResponse("rg1", "Contoso", "CentralCatalog", Context.NONE); + manager.catalogs().getWithResponse("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java index 563a78338e273..cc28783feacbb 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsListByDevCenterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Catalogs ListByDevCenter. */ public final class CatalogsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_List.json */ /** * Sample code: Catalogs_ListByDevCenter. @@ -17,6 +15,6 @@ public final class CatalogsListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.catalogs().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java index 00a3c4dfb5933..57041809b3782 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsSyncSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Catalogs Sync. */ public final class CatalogsSyncSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Sync.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Sync.json */ /** * Sample code: Catalogs_Sync. @@ -17,6 +15,6 @@ public final class CatalogsSyncSamples { * @param manager Entry point to DevCenterManager. */ public static void catalogsSync(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.catalogs().sync("rg1", "Contoso", "CentralCatalog", Context.NONE); + manager.catalogs().sync("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java index 410c8102acc72..8e250f5296ef9 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CatalogsUpdateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Catalog; import com.azure.resourcemanager.devcenter.models.GitCatalog; /** Samples for Catalogs Update. */ public final class CatalogsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Catalogs_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Catalogs_Patch.json */ /** * Sample code: Catalogs_Update. @@ -20,7 +19,10 @@ public final class CatalogsUpdateSamples { */ public static void catalogsUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { Catalog resource = - manager.catalogs().getWithResponse("rg1", "Contoso", "CentralCatalog", Context.NONE).getValue(); + manager + .catalogs() + .getWithResponse("rg1", "Contoso", "CentralCatalog", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withGitHub(new GitCatalog().withPath("/environments")).apply(); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java index 4eab0893ad51b..dc4fa2fdd5aee 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityExecuteSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityRequest; /** Samples for CheckNameAvailability Execute. */ public final class CheckNameAvailabilityExecuteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/CheckNameAvailability.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/CheckNameAvailability.json */ /** * Sample code: NameAvailability. @@ -22,6 +21,6 @@ public static void nameAvailability(com.azure.resourcemanager.devcenter.DevCente .checkNameAvailabilities() .executeWithResponse( new CheckNameAvailabilityRequest().withName("name1").withType("Microsoft.DevCenter/devcenters"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java index 5ff4f0ba5a1be..dfc130e7382f3 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for DevBoxDefinitions CreateOrUpdate. */ public final class DevBoxDefinitionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Create.json */ /** * Sample code: DevBoxDefinitions_Create. @@ -29,7 +29,6 @@ public static void devBoxDefinitionsCreate(com.azure.resourcemanager.devcenter.D .withId( "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/Example/providers/Microsoft.DevCenter/devcenters/Contoso/galleries/contosogallery/images/exampleImage/version/1.0.0")) .withSku(new Sku().withName("Preview")) - .withOsStorageType("SSD_1024") .withHibernateSupport(HibernateSupport.ENABLED) .create(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java index e858e3362b518..ea4911b7a84fc 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions Delete. */ public final class DevBoxDefinitionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Delete.json */ /** * Sample code: DevBoxDefinitions_Delete. @@ -17,6 +15,6 @@ public final class DevBoxDefinitionsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().delete("rg1", "Contoso", "WebDevBox", Context.NONE); + manager.devBoxDefinitions().delete("rg1", "Contoso", "WebDevBox", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java index d9f12444ad615..17703bd6fc808 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetByProjectSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions GetByProject. */ public final class DevBoxDefinitionsGetByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_GetByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_GetByProject.json */ /** * Sample code: DevBoxDefinitions_GetByProject. @@ -17,6 +15,8 @@ public final class DevBoxDefinitionsGetByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsGetByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().getByProjectWithResponse("rg1", "ContosoProject", "WebDevBox", Context.NONE); + manager + .devBoxDefinitions() + .getByProjectWithResponse("rg1", "ContosoProject", "WebDevBox", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java index 7887a729e7643..b1a9356242cc0 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions Get. */ public final class DevBoxDefinitionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Get.json */ /** * Sample code: DevBoxDefinitions_Get. @@ -17,6 +15,6 @@ public final class DevBoxDefinitionsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().getWithResponse("rg1", "Contoso", "WebDevBox", Context.NONE); + manager.devBoxDefinitions().getWithResponse("rg1", "Contoso", "WebDevBox", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java index 848da61e46310..917d9a85b337b 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByDevCenterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions ListByDevCenter. */ public final class DevBoxDefinitionsListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_ListByDevCenter.json */ /** * Sample code: DevBoxDefinitions_ListByDevCenter. @@ -17,6 +15,6 @@ public final class DevBoxDefinitionsListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.devBoxDefinitions().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java index 257b575c76414..0556690d73f5f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsListByProjectSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevBoxDefinitions ListByProject. */ public final class DevBoxDefinitionsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_ListByProject.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_ListByProject.json */ /** * Sample code: DevBoxDefinitions_ListByProject. @@ -17,6 +15,6 @@ public final class DevBoxDefinitionsListByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void devBoxDefinitionsListByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devBoxDefinitions().listByProject("rg1", "ContosoProject", null, Context.NONE); + manager.devBoxDefinitions().listByProject("rg1", "ContosoProject", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java index 9275a8be5015c..4074442965f56 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsUpdateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.DevBoxDefinition; import com.azure.resourcemanager.devcenter.models.ImageReference; /** Samples for DevBoxDefinitions Update. */ public final class DevBoxDefinitionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevBoxDefinitions_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevBoxDefinitions_Patch.json */ /** * Sample code: DevBoxDefinitions_Patch. @@ -20,7 +19,10 @@ public final class DevBoxDefinitionsUpdateSamples { */ public static void devBoxDefinitionsPatch(com.azure.resourcemanager.devcenter.DevCenterManager manager) { DevBoxDefinition resource = - manager.devBoxDefinitions().getWithResponse("rg1", "Contoso", "WebDevBox", Context.NONE).getValue(); + manager + .devBoxDefinitions() + .getWithResponse("rg1", "Contoso", "WebDevBox", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withImageReference( diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java index a2e33a6821e04..fbbb4a1f0b3c4 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ /** Samples for DevCenters CreateOrUpdate. */ public final class DevCentersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Create.json */ /** * Sample code: DevCenters_Create. @@ -31,7 +31,7 @@ public static void devCentersCreate(com.azure.resourcemanager.devcenter.DevCente } /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_CreateWithUserIdentity.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_CreateWithUserIdentity.json */ /** * Sample code: DevCenters_CreateWithUserIdentity. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java index cb1c5c2f734d8..ed69e66a3e47f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevCenters Delete. */ public final class DevCentersDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Delete.json */ /** * Sample code: DevCenters_Delete. @@ -17,6 +15,6 @@ public final class DevCentersDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().delete("rg1", "Contoso", Context.NONE); + manager.devCenters().delete("rg1", "Contoso", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java index 72c6209bb2a90..4a7c9c9750f79 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevCenters GetByResourceGroup. */ public final class DevCentersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Get.json */ /** * Sample code: DevCenters_Get. @@ -17,6 +15,6 @@ public final class DevCentersGetByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().getByResourceGroupWithResponse("rg1", "Contoso", Context.NONE); + manager.devCenters().getByResourceGroupWithResponse("rg1", "Contoso", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java index 27717262c18f6..79a223fb5a353 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevCenters ListByResourceGroup. */ public final class DevCentersListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_ListByResourceGroup.json */ /** * Sample code: DevCenters_ListByResourceGroup. @@ -17,6 +15,6 @@ public final class DevCentersListByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersListByResourceGroup(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().listByResourceGroup("rg1", null, Context.NONE); + manager.devCenters().listByResourceGroup("rg1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java index 923107ccb6127..8abf40e221e30 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for DevCenters List. */ public final class DevCentersListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_ListBySubscription.json */ /** * Sample code: DevCenters_ListBySubscription. @@ -17,6 +15,6 @@ public final class DevCentersListSamples { * @param manager Entry point to DevCenterManager. */ public static void devCentersListBySubscription(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.devCenters().list(null, Context.NONE); + manager.devCenters().list(null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java index d9a05ec9cbda6..350fe4b80f27f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/DevCentersUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.DevCenter; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for DevCenters Update. */ public final class DevCentersUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/DevCenters_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/DevCenters_Patch.json */ /** * Sample code: DevCenters_Update. @@ -21,7 +20,10 @@ public final class DevCentersUpdateSamples { */ public static void devCentersUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { DevCenter resource = - manager.devCenters().getByResourceGroupWithResponse("rg1", "Contoso", Context.NONE).getValue(); + manager + .devCenters() + .getByResourceGroupWithResponse("rg1", "Contoso", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("CostCode", "12345")).apply(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java index d8b07e899244b..02beb84237884 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for EnvironmentTypes CreateOrUpdate. */ public final class EnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Put.json */ /** * Sample code: EnvironmentTypes_CreateOrUpdate. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java index 9ef39f621b1c8..2677c84483be5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for EnvironmentTypes Delete. */ public final class EnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Delete.json */ /** * Sample code: EnvironmentTypes_Delete. @@ -17,6 +15,6 @@ public final class EnvironmentTypesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void environmentTypesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.environmentTypes().deleteWithResponse("rg1", "Contoso", "DevTest", Context.NONE); + manager.environmentTypes().deleteWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java index 7a7ad9d854f1a..a2448be057bb8 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for EnvironmentTypes Get. */ public final class EnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Get.json */ /** * Sample code: EnvironmentTypes_Get. @@ -17,6 +15,6 @@ public final class EnvironmentTypesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void environmentTypesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.environmentTypes().getWithResponse("rg1", "Contoso", "DevTest", Context.NONE); + manager.environmentTypes().getWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java index ef4ea4122411a..03741f5143e87 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for EnvironmentTypes ListByDevCenter. */ public final class EnvironmentTypesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_List.json */ /** * Sample code: EnvironmentTypes_ListByDevCenter. @@ -17,6 +15,6 @@ public final class EnvironmentTypesListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void environmentTypesListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.environmentTypes().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.environmentTypes().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java index 0cf4bb8f9c870..208e9513b6601 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.EnvironmentType; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for EnvironmentTypes Update. */ public final class EnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/EnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/EnvironmentTypes_Patch.json */ /** * Sample code: EnvironmentTypes_Update. @@ -21,7 +20,10 @@ public final class EnvironmentTypesUpdateSamples { */ public static void environmentTypesUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { EnvironmentType resource = - manager.environmentTypes().getWithResponse("rg1", "Contoso", "DevTest", Context.NONE).getValue(); + manager + .environmentTypes() + .getWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("Owner", "superuser")).apply(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java index 5dda2395b250b..0847b20e6589e 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesCreateOrUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for Galleries CreateOrUpdate. */ public final class GalleriesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Create.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_Create.json */ /** * Sample code: Galleries_CreateOrUpdate. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java index 52d04bc5854d6..f9ec3f67f6926 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Galleries Delete. */ public final class GalleriesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_Delete.json */ /** * Sample code: Galleries_Delete. @@ -17,6 +15,6 @@ public final class GalleriesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void galleriesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.galleries().delete("rg1", "Contoso", "StandardGallery", Context.NONE); + manager.galleries().delete("rg1", "Contoso", "StandardGallery", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java index 4b36877571e92..7456745e076b6 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Galleries Get. */ public final class GalleriesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_Get.json */ /** * Sample code: Galleries_Get. @@ -17,6 +15,6 @@ public final class GalleriesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void galleriesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.galleries().getWithResponse("rg1", "Contoso", "StandardGallery", Context.NONE); + manager.galleries().getWithResponse("rg1", "Contoso", "StandardGallery", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java index cdbc742c1a55b..42362ab2cbbde 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Galleries ListByDevCenter. */ public final class GalleriesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Galleries_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Galleries_List.json */ /** * Sample code: Galleries_ListByDevCenter. @@ -17,6 +15,6 @@ public final class GalleriesListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void galleriesListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.galleries().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.galleries().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java index ee09f51b4787b..d695eae1aefad 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for ImageVersions Get. */ public final class ImageVersionsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ImageVersions_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ImageVersions_Get.json */ /** * Sample code: Versions_Get. @@ -17,6 +15,8 @@ public final class ImageVersionsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void versionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.imageVersions().getWithResponse("rg1", "Contoso", "DefaultDevGallery", "Win11", "1.0.0", Context.NONE); + manager + .imageVersions() + .getWithResponse("rg1", "Contoso", "DefaultDevGallery", "Win11", "1.0.0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java index 6d5c7e4789117..3c5a4be3e6633 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for ImageVersions ListByImage. */ public final class ImageVersionsListByImageSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ImageVersions_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ImageVersions_List.json */ /** * Sample code: ImageVersions_ListByImage. @@ -17,6 +15,8 @@ public final class ImageVersionsListByImageSamples { * @param manager Entry point to DevCenterManager. */ public static void imageVersionsListByImage(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.imageVersions().listByImage("rg1", "Contoso", "DefaultDevGallery", "Win11", Context.NONE); + manager + .imageVersions() + .listByImage("rg1", "Contoso", "DefaultDevGallery", "Win11", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java index 32cfd1cefd90c..9c99a72bc8aed 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Images Get. */ public final class ImagesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Images_Get.json */ /** * Sample code: Images_Get. @@ -17,6 +15,9 @@ public final class ImagesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void imagesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.images().getWithResponse("rg1", "Contoso", "DefaultDevGallery", "ContosoBaseImage", Context.NONE); + manager + .images() + .getWithResponse( + "rg1", "Contoso", "DefaultDevGallery", "ContosoBaseImage", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java index 13eba19b193e0..1206b04664240 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Images ListByDevCenter. */ public final class ImagesListByDevCenterSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_ListByDevCenter.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Images_ListByDevCenter.json */ /** * Sample code: Images_ListByDevCenter. @@ -17,6 +15,6 @@ public final class ImagesListByDevCenterSamples { * @param manager Entry point to DevCenterManager. */ public static void imagesListByDevCenter(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.images().listByDevCenter("rg1", "Contoso", null, Context.NONE); + manager.images().listByDevCenter("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java index 0e7d8f10fdb2b..1a620e83c0c10 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGallerySamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Images ListByGallery. */ public final class ImagesListByGallerySamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Images_ListByGallery.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Images_ListByGallery.json */ /** * Sample code: Images_ListByGallery. @@ -17,6 +15,6 @@ public final class ImagesListByGallerySamples { * @param manager Entry point to DevCenterManager. */ public static void imagesListByGallery(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.images().listByGallery("rg1", "Contoso", "DevGallery", null, Context.NONE); + manager.images().listByGallery("rg1", "Contoso", "DevGallery", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java index 5cd53874021c4..fd2d96aa582e7 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for NetworkConnections CreateOrUpdate. */ public final class NetworkConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Put.json */ /** * Sample code: NetworkConnections_CreateOrUpdate. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java index e7a638c94ff1f..1077fe1d00205 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for NetworkConnections Delete. */ public final class NetworkConnectionsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Delete.json */ /** * Sample code: NetworkConnections_Delete. @@ -17,6 +15,6 @@ public final class NetworkConnectionsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void networkConnectionsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().delete("rg1", "eastusnetwork", Context.NONE); + manager.networkConnections().delete("rg1", "eastusnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java index 306088f5c6a3d..2d75ae1a525c7 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for NetworkConnections GetByResourceGroup. */ public final class NetworkConnectionsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Get.json */ /** * Sample code: NetworkConnections_Get. @@ -17,6 +15,8 @@ public final class NetworkConnectionsGetByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void networkConnectionsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().getByResourceGroupWithResponse("rg1", "uswest3network", Context.NONE); + manager + .networkConnections() + .getByResourceGroupWithResponse("rg1", "uswest3network", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java index 2acca08c8ac1b..a20364b0c89f5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for NetworkConnections GetHealthDetails. */ public final class NetworkConnectionsGetHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_GetHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_GetHealthDetails.json */ /** * Sample code: NetworkConnections_GetHealthDetails. @@ -18,6 +16,8 @@ public final class NetworkConnectionsGetHealthDetailsSamples { */ public static void networkConnectionsGetHealthDetails( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().getHealthDetailsWithResponse("rg1", "eastusnetwork", Context.NONE); + manager + .networkConnections() + .getHealthDetailsWithResponse("rg1", "eastusnetwork", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java index 33d44740b3f77..de958e75c0587 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for NetworkConnections ListByResourceGroup. */ public final class NetworkConnectionsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListByResourceGroup.json */ /** * Sample code: NetworkConnections_ListByResourceGroup. @@ -18,6 +16,6 @@ public final class NetworkConnectionsListByResourceGroupSamples { */ public static void networkConnectionsListByResourceGroup( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().listByResourceGroup("rg1", null, Context.NONE); + manager.networkConnections().listByResourceGroup("rg1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java index aa5de4aa6f473..14aaf14f18e1a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for NetworkConnections ListHealthDetails. */ public final class NetworkConnectionsListHealthDetailsSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListHealthDetails.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListHealthDetails.json */ /** * Sample code: NetworkConnections_ListHealthDetails. @@ -18,6 +16,6 @@ public final class NetworkConnectionsListHealthDetailsSamples { */ public static void networkConnectionsListHealthDetails( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().listHealthDetails("rg1", "uswest3network", null, Context.NONE); + manager.networkConnections().listHealthDetails("rg1", "uswest3network", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples.java new file mode 100644 index 0000000000000..386d1a98931cd --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for NetworkConnections ListOutboundNetworkDependenciesEndpoints. */ +public final class NetworkConnectionsListOutboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListOutboundNetworkDependenciesEndpoints.json + */ + /** + * Sample code: ListOutboundNetworkDependencies. + * + * @param manager Entry point to DevCenterManager. + */ + public static void listOutboundNetworkDependencies(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .networkConnections() + .listOutboundNetworkDependenciesEndpoints("rg1", "uswest3network", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java index 19b412af4bd1e..1b67acf57f1e6 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for NetworkConnections List. */ public final class NetworkConnectionsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_ListBySubscription.json */ /** * Sample code: NetworkConnections_ListBySubscription. @@ -18,6 +16,6 @@ public final class NetworkConnectionsListSamples { */ public static void networkConnectionsListBySubscription( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().list(null, Context.NONE); + manager.networkConnections().list(null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java index c45218936b8c9..2361d35d4575d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for NetworkConnections RunHealthChecks. */ public final class NetworkConnectionsRunHealthChecksSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_RunHealthChecks.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_RunHealthChecks.json */ /** * Sample code: NetworkConnections_RunHealthChecks. @@ -17,6 +15,6 @@ public final class NetworkConnectionsRunHealthChecksSamples { * @param manager Entry point to DevCenterManager. */ public static void networkConnectionsRunHealthChecks(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.networkConnections().runHealthChecks("rg1", "uswest3network", Context.NONE); + manager.networkConnections().runHealthChecks("rg1", "uswest3network", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java index ccd509dcb7418..f891c2990196a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsUpdateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.NetworkConnection; /** Samples for NetworkConnections Update. */ public final class NetworkConnectionsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/NetworkConnections_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/NetworkConnections_Patch.json */ /** * Sample code: NetworkConnections_Update. @@ -21,7 +20,7 @@ public static void networkConnectionsUpdate(com.azure.resourcemanager.devcenter. NetworkConnection resource = manager .networkConnections() - .getByResourceGroupWithResponse("rg1", "uswest3network", Context.NONE) + .getByResourceGroupWithResponse("rg1", "uswest3network", com.azure.core.util.Context.NONE) .getValue(); resource.update().withDomainPassword("New Password value for user").apply(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java index 959eb0662d53b..b209945496961 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for OperationStatuses Get. */ public final class OperationStatusesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/OperationStatus_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/OperationStatus_Get.json */ /** * Sample code: Get OperationStatus. @@ -17,6 +15,8 @@ public final class OperationStatusesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void getOperationStatus(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.operationStatuses().getWithResponse("westus3", "3fa1a29d-e807-488d-81d1-f1c5456a08cd", Context.NONE); + manager + .operationStatuses() + .getWithResponse("westus3", "3fa1a29d-e807-488d-81d1-f1c5456a08cd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java index 28fe1f66f1467..97b05250d2c18 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Operations_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Operations_Get.json */ /** * Sample code: Operations_Get. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to DevCenterManager. */ public static void operationsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java index 3d2393d287570..90e4520cd4497 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateSamples.java @@ -6,11 +6,13 @@ import com.azure.resourcemanager.devcenter.models.LicenseType; import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectConfiguration; +import com.azure.resourcemanager.devcenter.models.StopOnDisconnectEnableStatus; /** Samples for Pools CreateOrUpdate. */ public final class PoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Put.json */ /** * Sample code: Pools_CreateOrUpdate. @@ -27,6 +29,10 @@ public static void poolsCreateOrUpdate(com.azure.resourcemanager.devcenter.DevCe .withNetworkConnectionName("Network1-westus2") .withLicenseType(LicenseType.WINDOWS_CLIENT) .withLocalAdministrator(LocalAdminStatus.ENABLED) + .withStopOnDisconnect( + new StopOnDisconnectConfiguration() + .withStatus(StopOnDisconnectEnableStatus.ENABLED) + .withGracePeriodMinutes(60)) .create(); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java index 21894e7f6e569..a2ddc983f3ea0 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Pools Delete. */ public final class PoolsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Delete.json */ /** * Sample code: Pools_Delete. @@ -17,6 +15,6 @@ public final class PoolsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.pools().delete("rg1", "DevProject", "poolName", Context.NONE); + manager.pools().delete("rg1", "DevProject", "poolName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java index ec52504c6449a..2bfa54a954418 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsGetSamples.java @@ -4,12 +4,22 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Pools Get. */ public final class PoolsGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_GetUnhealthyStatus.json + */ + /** + * Sample code: Pools_GetUnhealthyStatus. + * + * @param manager Entry point to DevCenterManager. + */ + public static void poolsGetUnhealthyStatus(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager.pools().getWithResponse("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Get.json */ /** * Sample code: Pools_Get. @@ -17,6 +27,6 @@ public final class PoolsGetSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.pools().getWithResponse("rg1", "DevProject", "DevPool", Context.NONE); + manager.pools().getWithResponse("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java index e318f25f0c28a..35975e82c0e5d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Pools ListByProject. */ public final class PoolsListByProjectSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_List.json */ /** * Sample code: Pools_ListByProject. @@ -17,6 +15,6 @@ public final class PoolsListByProjectSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsListByProject(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.pools().listByProject("rg1", "DevProject", null, Context.NONE); + manager.pools().listByProject("rg1", "DevProject", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksSamples.java new file mode 100644 index 0000000000000..dde47b79284bb --- /dev/null +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsRunHealthChecksSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.devcenter.generated; + +/** Samples for Pools RunHealthChecks. */ +public final class PoolsRunHealthChecksSamples { + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_RunHealthChecks.json + */ + /** + * Sample code: Pools_RefreshStatus. + * + * @param manager Entry point to DevCenterManager. + */ + public static void poolsRefreshStatus(com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager.pools().runHealthChecks("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java index 5dd15c93597f2..8fc33fda579df 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/PoolsUpdateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Pool; /** Samples for Pools Update. */ public final class PoolsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Pools_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Pools_Patch.json */ /** * Sample code: Pools_Update. @@ -18,7 +17,11 @@ public final class PoolsUpdateSamples { * @param manager Entry point to DevCenterManager. */ public static void poolsUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - Pool resource = manager.pools().getWithResponse("rg1", "DevProject", "DevPool", Context.NONE).getValue(); + Pool resource = + manager + .pools() + .getWithResponse("rg1", "DevProject", "DevPool", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withDevBoxDefinitionName("WebDevBox2").apply(); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java index 783c3c59c926a..b550f90488027 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for ProjectAllowedEnvironmentTypes Get. */ public final class ProjectAllowedEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectAllowedEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectAllowedEnvironmentTypes_Get.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_Get. @@ -17,6 +15,8 @@ public final class ProjectAllowedEnvironmentTypesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void projectAllowedEnvironmentTypesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectAllowedEnvironmentTypes().getWithResponse("rg1", "Contoso", "DevTest", Context.NONE); + manager + .projectAllowedEnvironmentTypes() + .getWithResponse("rg1", "Contoso", "DevTest", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java index 0c4ff46201881..d5dd6ed0d8522 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for ProjectAllowedEnvironmentTypes List. */ public final class ProjectAllowedEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectAllowedEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectAllowedEnvironmentTypes_List.json */ /** * Sample code: ProjectAllowedEnvironmentTypes_List. @@ -18,6 +16,6 @@ public final class ProjectAllowedEnvironmentTypesListSamples { */ public static void projectAllowedEnvironmentTypesList( com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectAllowedEnvironmentTypes().list("rg1", "Contoso", null, Context.NONE); + manager.projectAllowedEnvironmentTypes().list("rg1", "Contoso", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java index fe50d41037c39..4445e59bc7d5f 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateSamples.java @@ -4,8 +4,8 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.resourcemanager.devcenter.models.EnableStatus; import com.azure.resourcemanager.devcenter.models.EnvironmentRole; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; @@ -17,7 +17,7 @@ /** Samples for ProjectEnvironmentTypes CreateOrUpdate. */ public final class ProjectEnvironmentTypesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Put.json */ /** * Sample code: ProjectEnvironmentTypes_CreateOrUpdate. @@ -39,7 +39,7 @@ public static void projectEnvironmentTypesCreateOrUpdate( "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", new UserAssignedIdentity()))) .withDeploymentTargetId("/subscriptions/00000000-0000-0000-0000-000000000000") - .withStatus(EnableStatus.ENABLED) + .withStatus(EnvironmentTypeEnableStatus.ENABLED) .withCreatorRoleAssignment( new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() .withRoles(mapOf("4cbf0b6c-e750-441c-98a7-10da8387e4d6", new EnvironmentRole()))) diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java index 7bd18e6fe6782..bbe3db7a9933a 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for ProjectEnvironmentTypes Delete. */ public final class ProjectEnvironmentTypesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Delete.json */ /** * Sample code: ProjectEnvironmentTypes_Delete. @@ -17,6 +15,8 @@ public final class ProjectEnvironmentTypesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void projectEnvironmentTypesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectEnvironmentTypes().deleteWithResponse("rg1", "ContosoProj", "DevTest", Context.NONE); + manager + .projectEnvironmentTypes() + .deleteWithResponse("rg1", "ContosoProj", "DevTest", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java index 1ae51f2526585..7fb70ff384c98 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for ProjectEnvironmentTypes Get. */ public final class ProjectEnvironmentTypesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Get.json */ /** * Sample code: ProjectEnvironmentTypes_Get. @@ -17,6 +15,8 @@ public final class ProjectEnvironmentTypesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void projectEnvironmentTypesGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectEnvironmentTypes().getWithResponse("rg1", "ContosoProj", "DevTest", Context.NONE); + manager + .projectEnvironmentTypes() + .getWithResponse("rg1", "ContosoProj", "DevTest", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java index 93e3a7287d940..53b300ab83bda 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for ProjectEnvironmentTypes List. */ public final class ProjectEnvironmentTypesListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_List.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_List.json */ /** * Sample code: ProjectEnvironmentTypes_List. @@ -17,6 +15,6 @@ public final class ProjectEnvironmentTypesListSamples { * @param manager Entry point to DevCenterManager. */ public static void projectEnvironmentTypesList(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projectEnvironmentTypes().list("rg1", "ContosoProj", null, Context.NONE); + manager.projectEnvironmentTypes().list("rg1", "ContosoProj", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java index 66418e0691b03..763a2b49daadc 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesUpdateSamples.java @@ -4,9 +4,8 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.devcenter.models.EnableStatus; import com.azure.resourcemanager.devcenter.models.EnvironmentRole; +import com.azure.resourcemanager.devcenter.models.EnvironmentTypeEnableStatus; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; @@ -18,7 +17,7 @@ /** Samples for ProjectEnvironmentTypes Update. */ public final class ProjectEnvironmentTypesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/ProjectEnvironmentTypes_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/ProjectEnvironmentTypes_Patch.json */ /** * Sample code: ProjectEnvironmentTypes_Update. @@ -27,7 +26,10 @@ public final class ProjectEnvironmentTypesUpdateSamples { */ public static void projectEnvironmentTypesUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { ProjectEnvironmentType resource = - manager.projectEnvironmentTypes().getWithResponse("rg1", "ContosoProj", "DevTest", Context.NONE).getValue(); + manager + .projectEnvironmentTypes() + .getWithResponse("rg1", "ContosoProj", "DevTest", com.azure.core.util.Context.NONE) + .getValue(); resource .update() .withTags(mapOf("CostCenter", "RnD")) @@ -39,7 +41,7 @@ public static void projectEnvironmentTypesUpdate(com.azure.resourcemanager.devce "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/identityGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testidentity1", new UserAssignedIdentity()))) .withDeploymentTargetId("/subscriptions/00000000-0000-0000-0000-000000000000") - .withStatus(EnableStatus.ENABLED) + .withStatus(EnvironmentTypeEnableStatus.ENABLED) .withUserRoleAssignments( mapOf( "e45e3m7c-176e-416a-b466-0c5ec8298f8a", diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java index f9a12578c9b0c..6c85fb99a7ec0 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateSamples.java @@ -10,7 +10,30 @@ /** Samples for Projects CreateOrUpdate. */ public final class ProjectsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Put.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_PutWithMaxDevBoxPerUser.json + */ + /** + * Sample code: Projects_CreateOrUpdateWithLimitsPerDev. + * + * @param manager Entry point to DevCenterManager. + */ + public static void projectsCreateOrUpdateWithLimitsPerDev( + com.azure.resourcemanager.devcenter.DevCenterManager manager) { + manager + .projects() + .define("DevProject") + .withRegion("centralus") + .withExistingResourceGroup("rg1") + .withTags(mapOf("CostCenter", "R&D")) + .withDevCenterId( + "/subscriptions/0ac520ee-14c0-480f-b6c9-0a90c58ffff/resourceGroups/rg1/providers/Microsoft.DevCenter/devcenters/Contoso") + .withDescription("This is my first project.") + .withMaxDevBoxesPerUser(3) + .create(); + } + + /* + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Put.json */ /** * Sample code: Projects_CreateOrUpdate. diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java index a9b944947ed5f..bfb6374f828ba 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Projects Delete. */ public final class ProjectsDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Delete.json */ /** * Sample code: Projects_Delete. @@ -17,6 +15,6 @@ public final class ProjectsDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().delete("rg1", "DevProject", Context.NONE); + manager.projects().delete("rg1", "DevProject", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java index 3a2c1ec2fe7d8..e84a816d2fd9d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Projects GetByResourceGroup. */ public final class ProjectsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Get.json */ /** * Sample code: Projects_Get. @@ -17,6 +15,6 @@ public final class ProjectsGetByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsGet(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().getByResourceGroupWithResponse("rg1", "DevProject", Context.NONE); + manager.projects().getByResourceGroupWithResponse("rg1", "DevProject", com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java index 89e1e28fcf766..e6738cec3bee5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Projects ListByResourceGroup. */ public final class ProjectsListByResourceGroupSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_ListByResourceGroup.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_ListByResourceGroup.json */ /** * Sample code: Projects_ListByResourceGroup. @@ -17,6 +15,6 @@ public final class ProjectsListByResourceGroupSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsListByResourceGroup(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().listByResourceGroup("rg1", null, Context.NONE); + manager.projects().listByResourceGroup("rg1", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java index 5b7b06b93d6be..10da2d3cca4fc 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Projects List. */ public final class ProjectsListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_ListBySubscription.json */ /** * Sample code: Projects_ListBySubscription. @@ -17,6 +15,6 @@ public final class ProjectsListSamples { * @param manager Entry point to DevCenterManager. */ public static void projectsListBySubscription(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.projects().list(null, Context.NONE); + manager.projects().list(null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java index 0d8b3fc5824ed..d7528c44a22ca 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/ProjectsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Project; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for Projects Update. */ public final class ProjectsUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Projects_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Projects_Patch.json */ /** * Sample code: Projects_Update. @@ -21,7 +20,10 @@ public final class ProjectsUpdateSamples { */ public static void projectsUpdate(com.azure.resourcemanager.devcenter.DevCenterManager manager) { Project resource = - manager.projects().getByResourceGroupWithResponse("rg1", "DevProject", Context.NONE).getValue(); + manager + .projects() + .getByResourceGroupWithResponse("rg1", "DevProject", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("CostCenter", "R&D")).withDescription("This is my first project.").apply(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java index a5892875e9911..8a3f1cb8a9285 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateSamples.java @@ -4,14 +4,14 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.resourcemanager.devcenter.models.EnableStatus; +import com.azure.resourcemanager.devcenter.models.ScheduleEnableStatus; import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; import com.azure.resourcemanager.devcenter.models.ScheduledType; /** Samples for Schedules CreateOrUpdate. */ public final class SchedulesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_CreateDailyShutdownPoolSchedule.json */ /** * Sample code: Schedules_CreateDailyShutdownPoolSchedule. @@ -28,7 +28,7 @@ public static void schedulesCreateDailyShutdownPoolSchedule( .withFrequency(ScheduledFrequency.DAILY) .withTime("17:30") .withTimeZone("America/Los_Angeles") - .withState(EnableStatus.ENABLED) + .withState(ScheduleEnableStatus.ENABLED) .create(); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java index 587d26eb97431..aea9308cfc8dd 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Schedules Delete. */ public final class SchedulesDeleteSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Delete.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_Delete.json */ /** * Sample code: Schedules_Delete. @@ -17,6 +15,8 @@ public final class SchedulesDeleteSamples { * @param manager Entry point to DevCenterManager. */ public static void schedulesDelete(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.schedules().delete("rg1", "TestProject", "DevPool", "autoShutdown", null, Context.NONE); + manager + .schedules() + .delete("rg1", "TestProject", "DevPool", "autoShutdown", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java index 5da8da70b36c8..9f4ae0615aeb2 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Schedules Get. */ public final class SchedulesGetSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Get.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_Get.json */ /** * Sample code: Schedules_GetByPool. @@ -17,6 +15,8 @@ public final class SchedulesGetSamples { * @param manager Entry point to DevCenterManager. */ public static void schedulesGetByPool(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.schedules().getWithResponse("rg1", "TestProject", "DevPool", "autoShutdown", null, Context.NONE); + manager + .schedules() + .getWithResponse("rg1", "TestProject", "DevPool", "autoShutdown", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java index be36a6efa0f30..daf39ba96327d 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Schedules ListByPool. */ public final class SchedulesListByPoolSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_ListByPool.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_ListByPool.json */ /** * Sample code: Schedules_ListByPool. @@ -17,6 +15,6 @@ public final class SchedulesListByPoolSamples { * @param manager Entry point to DevCenterManager. */ public static void schedulesListByPool(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.schedules().listByPool("rg1", "TestProject", "DevPool", null, Context.NONE); + manager.schedules().listByPool("rg1", "TestProject", "DevPool", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java index 6d54c2925fda7..9f7269ee2bec1 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SchedulesUpdateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.devcenter.models.Schedule; /** Samples for Schedules Update. */ public final class SchedulesUpdateSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Schedules_Patch.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Schedules_Patch.json */ /** * Sample code: Schedules_Update. @@ -21,7 +20,8 @@ public static void schedulesUpdate(com.azure.resourcemanager.devcenter.DevCenter Schedule resource = manager .schedules() - .getWithResponse("rg1", "TestProject", "DevPool", "autoShutdown", null, Context.NONE) + .getWithResponse( + "rg1", "TestProject", "DevPool", "autoShutdown", null, com.azure.core.util.Context.NONE) .getValue(); resource.update().withTime("18:00").apply(); } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java index bca1bcd65cedd..42d54e37991f5 100644 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java +++ b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/SkusListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.devcenter.generated; -import com.azure.core.util.Context; - /** Samples for Skus List. */ public final class SkusListSamples { /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Skus_ListBySubscription.json + * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2023-01-01-preview/examples/Skus_ListBySubscription.json */ /** * Sample code: Skus_ListBySubscription. @@ -17,6 +15,6 @@ public final class SkusListSamples { * @param manager Entry point to DevCenterManager. */ public static void skusListBySubscription(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.skus().list(null, Context.NONE); + manager.skus().list(null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationSamples.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationSamples.java deleted file mode 100644 index d3d4be5958482..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/samples/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.Context; - -/** Samples for Usages ListByLocation. */ -public final class UsagesListByLocationSamples { - /* - * x-ms-original-file: specification/devcenter/resource-manager/Microsoft.DevCenter/preview/2022-11-11-preview/examples/Usages_ListByLocation.json - */ - /** - * Sample code: listUsages. - * - * @param manager Entry point to DevCenterManager. - */ - public static void listUsages(com.azure.resourcemanager.devcenter.DevCenterManager manager) { - manager.usages().listByLocation("westus", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeInnerTests.java deleted file mode 100644 index 3a44e966a4c01..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AllowedEnvironmentTypeInner; -import org.junit.jupiter.api.Test; - -public final class AllowedEnvironmentTypeInnerTests { - @Test - public void testDeserialize() { - AllowedEnvironmentTypeInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\"},\"id\":\"eun\",\"name\":\"mqhgyxzkonocuk\",\"type\":\"klyaxuconu\"}") - .toObject(AllowedEnvironmentTypeInner.class); - } - - @Test - public void testSerialize() { - AllowedEnvironmentTypeInner model = new AllowedEnvironmentTypeInner(); - model = BinaryData.fromObject(model).toObject(AllowedEnvironmentTypeInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeListResultTests.java deleted file mode 100644 index 7100d7990908a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypeListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.AllowedEnvironmentTypeListResult; -import org.junit.jupiter.api.Test; - -public final class AllowedEnvironmentTypeListResultTests { - @Test - public void testDeserialize() { - AllowedEnvironmentTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Created\"},\"id\":\"rywn\",\"name\":\"zoqftiyqzrnkcqvy\",\"type\":\"lwh\"}],\"nextLink\":\"sicohoqqnwvlry\"}") - .toObject(AllowedEnvironmentTypeListResult.class); - } - - @Test - public void testSerialize() { - AllowedEnvironmentTypeListResult model = new AllowedEnvironmentTypeListResult(); - model = BinaryData.fromObject(model).toObject(AllowedEnvironmentTypeListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypePropertiesTests.java deleted file mode 100644 index 7ac2828d21102..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AllowedEnvironmentTypePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AllowedEnvironmentTypeProperties; -import org.junit.jupiter.api.Test; - -public final class AllowedEnvironmentTypePropertiesTests { - @Test - public void testDeserialize() { - AllowedEnvironmentTypeProperties model = - BinaryData - .fromString("{\"provisioningState\":\"Accepted\"}") - .toObject(AllowedEnvironmentTypeProperties.class); - } - - @Test - public void testSerialize() { - AllowedEnvironmentTypeProperties model = new AllowedEnvironmentTypeProperties(); - model = BinaryData.fromObject(model).toObject(AllowedEnvironmentTypeProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionInnerTests.java deleted file mode 100644 index 7bdde727d675c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AttachedNetworkConnectionInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AttachedNetworkConnectionInnerTests { - @Test - public void testDeserialize() { - AttachedNetworkConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Deleted\",\"networkConnectionId\":\"od\",\"networkConnectionLocation\":\"hc\",\"healthCheckStatus\":\"Passed\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"t\",\"name\":\"kwh\",\"type\":\"soifiyipjxsqw\"}") - .toObject(AttachedNetworkConnectionInner.class); - Assertions.assertEquals("od", model.networkConnectionId()); - } - - @Test - public void testSerialize() { - AttachedNetworkConnectionInner model = new AttachedNetworkConnectionInner().withNetworkConnectionId("od"); - model = BinaryData.fromObject(model).toObject(AttachedNetworkConnectionInner.class); - Assertions.assertEquals("od", model.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionPropertiesTests.java deleted file mode 100644 index 74ee23b97fadc..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkConnectionPropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.AttachedNetworkConnectionProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AttachedNetworkConnectionPropertiesTests { - @Test - public void testDeserialize() { - AttachedNetworkConnectionProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Running\",\"networkConnectionId\":\"jbznorc\",\"networkConnectionLocation\":\"vsnb\",\"healthCheckStatus\":\"Failed\",\"domainJoinType\":\"HybridAzureADJoin\"}") - .toObject(AttachedNetworkConnectionProperties.class); - Assertions.assertEquals("jbznorc", model.networkConnectionId()); - } - - @Test - public void testSerialize() { - AttachedNetworkConnectionProperties model = - new AttachedNetworkConnectionProperties().withNetworkConnectionId("jbznorc"); - model = BinaryData.fromObject(model).toObject(AttachedNetworkConnectionProperties.class); - Assertions.assertEquals("jbznorc", model.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkListResultTests.java deleted file mode 100644 index c15677bafc7cb..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworkListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkListResult; -import org.junit.jupiter.api.Test; - -public final class AttachedNetworkListResultTests { - @Test - public void testDeserialize() { - AttachedNetworkListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"networkConnectionId\":\"i\",\"networkConnectionLocation\":\"fidfvzw\",\"healthCheckStatus\":\"Failed\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"mwisdkfthwxmnt\",\"name\":\"i\",\"type\":\"aop\"},{\"properties\":{\"provisioningState\":\"Updating\",\"networkConnectionId\":\"jcmmxdcufufsrp\",\"networkConnectionLocation\":\"zidnsezcxtbzsgfy\",\"healthCheckStatus\":\"Pending\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"mdwzjeiachboo\",\"name\":\"flnrosfqpteehzz\",\"type\":\"ypyqrimzinp\"}],\"nextLink\":\"wjdk\"}") - .toObject(AttachedNetworkListResult.class); - } - - @Test - public void testSerialize() { - AttachedNetworkListResult model = new AttachedNetworkListResult(); - model = BinaryData.fromObject(model).toObject(AttachedNetworkListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteMockTests.java deleted file mode 100644 index 1ff1cd554bb91..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 AttachedNetworksDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.attachedNetworks().delete("uxzejntpsew", "ioilqukrydxtq", "ieoxorggufhyaomt", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterWithResponseMockTests.java deleted file mode 100644 index 1dcddac12b7b3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByDevCenterWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksGetByDevCenterWithResponseMockTests { - @Test - public void testGetByDevCenterWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Updating\",\"networkConnectionId\":\"kgthrrghxjbd\",\"networkConnectionLocation\":\"xvcxgfrpdsofbshr\",\"healthCheckStatus\":\"Passed\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"wdvzyy\",\"name\":\"ycnunvjsrtk\",\"type\":\"awnopqgikyzirtxd\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedNetworkConnection response = - manager - .attachedNetworks() - .getByDevCenterWithResponse("tw", "sgogczhonnxk", "lgnyhmo", Context.NONE) - .getValue(); - - Assertions.assertEquals("kgthrrghxjbd", response.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectWithResponseMockTests.java deleted file mode 100644 index 88aa5fcdadef3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksGetByProjectWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksGetByProjectWithResponseMockTests { - @Test - public void testGetByProjectWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Updating\",\"networkConnectionId\":\"twjchrdg\",\"networkConnectionLocation\":\"hxumwctondzj\",\"healthCheckStatus\":\"Warning\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"lwg\",\"name\":\"ytsbwtovv\",\"type\":\"gseinq\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedNetworkConnection response = - manager - .attachedNetworks() - .getByProjectWithResponse("fpncurdo", "wiithtywub", "cbihwqk", Context.NONE) - .getValue(); - - Assertions.assertEquals("twjchrdg", response.networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterMockTests.java deleted file mode 100644 index 084e622e351be..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByDevCenterMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"MovingResources\",\"networkConnectionId\":\"qnrojlpijnkrxfrd\",\"networkConnectionLocation\":\"c\",\"healthCheckStatus\":\"Warning\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"ronasxift\",\"name\":\"zq\",\"type\":\"zh\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.attachedNetworks().listByDevCenter("iufxqknpir", "nepttwqmsni", 1579066306, Context.NONE); - - Assertions.assertEquals("qnrojlpijnkrxfrd", response.iterator().next().networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectMockTests.java deleted file mode 100644 index 8012e680da6cf..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/AttachedNetworksListByProjectMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AttachedNetworkConnection; -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 AttachedNetworksListByProjectMockTests { - @Test - public void testListByProject() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"networkConnectionId\":\"otxhojujby\",\"networkConnectionLocation\":\"lmcuvhixb\",\"healthCheckStatus\":\"Unknown\",\"domainJoinType\":\"HybridAzureADJoin\"},\"id\":\"yl\",\"name\":\"coolsttpkiwkkb\",\"type\":\"ujrywvtyl\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.attachedNetworks().listByProject("qncygupkvi", "mdscwxqupev", 1875273166, Context.NONE); - - Assertions.assertEquals("otxhojujby", response.iterator().next().networkConnectionId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CapabilityTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CapabilityTests.java deleted file mode 100644 index db3c2747cf1d5..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CapabilityTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.Capability; -import org.junit.jupiter.api.Test; - -public final class CapabilityTests { - @Test - public void testDeserialize() { - Capability model = - BinaryData.fromString("{\"name\":\"nqxwbp\",\"value\":\"ulpiuj\"}").toObject(Capability.class); - } - - @Test - public void testSerialize() { - Capability model = new Capability(); - model = BinaryData.fromObject(model).toObject(Capability.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogListResultTests.java deleted file mode 100644 index 9cbc301095d89..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.CatalogListResult; -import org.junit.jupiter.api.Test; - -public final class CatalogListResultTests { - @Test - public void testDeserialize() { - CatalogListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"syncState\":\"Failed\",\"lastSyncTime\":\"2021-07-19T22:57:03Z\"},\"id\":\"tynnaamdectehfi\",\"name\":\"scjeypv\",\"type\":\"ezrkgqhcjrefo\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"syncState\":\"Succeeded\",\"lastSyncTime\":\"2021-09-05T10:33:45Z\"},\"id\":\"xyqj\",\"name\":\"k\",\"type\":\"attpngjcrcczsq\"},{\"properties\":{\"provisioningState\":\"Failed\",\"syncState\":\"Succeeded\",\"lastSyncTime\":\"2021-03-30T22:07:42Z\"},\"id\":\"sounqecanoaeu\",\"name\":\"fhyhltrpmopjmcma\",\"type\":\"u\"},{\"properties\":{\"provisioningState\":\"Failed\",\"syncState\":\"Canceled\",\"lastSyncTime\":\"2021-07-12T12:37:48Z\"},\"id\":\"sfcpkvxodpuozm\",\"name\":\"zydagfuaxbezyiuo\",\"type\":\"ktwh\"}],\"nextLink\":\"xw\"}") - .toObject(CatalogListResult.class); - } - - @Test - public void testSerialize() { - CatalogListResult model = new CatalogListResult(); - model = BinaryData.fromObject(model).toObject(CatalogListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteMockTests.java deleted file mode 100644 index a8afbc3456d67..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CatalogsDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 CatalogsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.catalogs().delete("uvwpklvxwmyg", "xpgpq", "hiszepnnbjcrxgib", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.java deleted file mode 100644 index 938ff2617cb44..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilitiesExecuteWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityResponse; -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 CheckNameAvailabilitiesExecuteWithResponseMockTests { - @Test - public void testExecuteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"ft\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = - manager - .checkNameAvailabilities() - .executeWithResponse( - new CheckNameAvailabilityRequest().withName("jj").withType("oqbeitpkxzt"), Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("ft", response.message()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityRequestTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 11ce0e407e7d1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityRequestTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityRequestTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"sjnkal\",\"type\":\"tiiswacffg\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("sjnkal", model.name()); - Assertions.assertEquals("tiiswacffg", model.type()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityRequest model = - new CheckNameAvailabilityRequest().withName("sjnkal").withType("tiiswacffg"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("sjnkal", model.name()); - Assertions.assertEquals("tiiswacffg", model.type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 68a3516f24c86..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/CheckNameAvailabilityResponseInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.devcenter.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityResponseInnerTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"kfvhqcrailvpn\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kfvhqcrailvpn", model.message()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) - .withMessage("kfvhqcrailvpn"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kfvhqcrailvpn", model.message()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionListResultTests.java deleted file mode 100644 index 1bdc302cd0083..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevBoxDefinitionListResult; -import org.junit.jupiter.api.Test; - -public final class DevBoxDefinitionListResultTests { - @Test - public void testDeserialize() { - DevBoxDefinitionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"RolloutInProgress\",\"imageValidationStatus\":\"Succeeded\",\"osStorageType\":\"gklwn\",\"hibernateSupport\":\"Enabled\"},\"location\":\"dauwhvylwzbtd\",\"tags\":{\"pow\":\"jznb\",\"qlveualupjmkh\":\"wpr\"},\"id\":\"xobbcswsrt\",\"name\":\"riplrbpbewtg\",\"type\":\"fgb\"}],\"nextLink\":\"gw\"}") - .toObject(DevBoxDefinitionListResult.class); - } - - @Test - public void testSerialize() { - DevBoxDefinitionListResult model = new DevBoxDefinitionListResult(); - model = BinaryData.fromObject(model).toObject(DevBoxDefinitionListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdatePropertiesTests.java deleted file mode 100644 index 9c817480a2ea5..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdatePropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevBoxDefinitionUpdateProperties; -import com.azure.resourcemanager.devcenter.models.HibernateSupport; -import com.azure.resourcemanager.devcenter.models.ImageReference; -import com.azure.resourcemanager.devcenter.models.Sku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DevBoxDefinitionUpdatePropertiesTests { - @Test - public void testDeserialize() { - DevBoxDefinitionUpdateProperties model = - BinaryData - .fromString( - "{\"imageReference\":{\"id\":\"e\",\"exactVersion\":\"sgzvahapjyzhpv\",\"publisher\":\"zcjrvxdjzlmwlx\",\"offer\":\"ug\",\"sku\":\"zovawjvz\"},\"sku\":{\"name\":\"luthn\",\"tier\":\"Basic\",\"size\":\"xipeilpjzuaejx\",\"family\":\"ltskzbbtd\",\"capacity\":369228588},\"osStorageType\":\"e\",\"hibernateSupport\":\"Disabled\"}") - .toObject(DevBoxDefinitionUpdateProperties.class); - Assertions.assertEquals("e", model.imageReference().id()); - Assertions.assertEquals("zcjrvxdjzlmwlx", model.imageReference().publisher()); - Assertions.assertEquals("ug", model.imageReference().offer()); - Assertions.assertEquals("zovawjvz", model.imageReference().sku()); - Assertions.assertEquals("luthn", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("xipeilpjzuaejx", model.sku().size()); - Assertions.assertEquals("ltskzbbtd", model.sku().family()); - Assertions.assertEquals(369228588, model.sku().capacity()); - Assertions.assertEquals("e", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.DISABLED, model.hibernateSupport()); - } - - @Test - public void testSerialize() { - DevBoxDefinitionUpdateProperties model = - new DevBoxDefinitionUpdateProperties() - .withImageReference( - new ImageReference() - .withId("e") - .withPublisher("zcjrvxdjzlmwlx") - .withOffer("ug") - .withSku("zovawjvz")) - .withSku( - new Sku() - .withName("luthn") - .withTier(SkuTier.BASIC) - .withSize("xipeilpjzuaejx") - .withFamily("ltskzbbtd") - .withCapacity(369228588)) - .withOsStorageType("e") - .withHibernateSupport(HibernateSupport.DISABLED); - model = BinaryData.fromObject(model).toObject(DevBoxDefinitionUpdateProperties.class); - Assertions.assertEquals("e", model.imageReference().id()); - Assertions.assertEquals("zcjrvxdjzlmwlx", model.imageReference().publisher()); - Assertions.assertEquals("ug", model.imageReference().offer()); - Assertions.assertEquals("zovawjvz", model.imageReference().sku()); - Assertions.assertEquals("luthn", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("xipeilpjzuaejx", model.sku().size()); - Assertions.assertEquals("ltskzbbtd", model.sku().family()); - Assertions.assertEquals(369228588, model.sku().capacity()); - Assertions.assertEquals("e", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.DISABLED, model.hibernateSupport()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdateTests.java deleted file mode 100644 index 606fb15fd76b5..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionUpdateTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevBoxDefinitionUpdate; -import com.azure.resourcemanager.devcenter.models.HibernateSupport; -import com.azure.resourcemanager.devcenter.models.ImageReference; -import com.azure.resourcemanager.devcenter.models.Sku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DevBoxDefinitionUpdateTests { - @Test - public void testDeserialize() { - DevBoxDefinitionUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"imageReference\":{\"id\":\"boekqvkel\",\"exactVersion\":\"mvb\",\"publisher\":\"yjsflhhcaalnji\",\"offer\":\"sxyawjoyaqcs\",\"sku\":\"jpkiidzyexznelix\"},\"sku\":{\"name\":\"rzt\",\"tier\":\"Basic\",\"size\":\"bnxknalaulppg\",\"family\":\"tpnapnyiropuhpig\",\"capacity\":2140009722},\"osStorageType\":\"lgqg\",\"hibernateSupport\":\"Enabled\"},\"tags\":{\"n\":\"djvcsl\",\"rmgucnap\":\"wwncwzzhxgk\",\"oellwp\":\"t\"},\"location\":\"d\"}") - .toObject(DevBoxDefinitionUpdate.class); - Assertions.assertEquals("djvcsl", model.tags().get("n")); - Assertions.assertEquals("d", model.location()); - Assertions.assertEquals("boekqvkel", model.imageReference().id()); - Assertions.assertEquals("yjsflhhcaalnji", model.imageReference().publisher()); - Assertions.assertEquals("sxyawjoyaqcs", model.imageReference().offer()); - Assertions.assertEquals("jpkiidzyexznelix", model.imageReference().sku()); - Assertions.assertEquals("rzt", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("bnxknalaulppg", model.sku().size()); - Assertions.assertEquals("tpnapnyiropuhpig", model.sku().family()); - Assertions.assertEquals(2140009722, model.sku().capacity()); - Assertions.assertEquals("lgqg", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.ENABLED, model.hibernateSupport()); - } - - @Test - public void testSerialize() { - DevBoxDefinitionUpdate model = - new DevBoxDefinitionUpdate() - .withTags(mapOf("n", "djvcsl", "rmgucnap", "wwncwzzhxgk", "oellwp", "t")) - .withLocation("d") - .withImageReference( - new ImageReference() - .withId("boekqvkel") - .withPublisher("yjsflhhcaalnji") - .withOffer("sxyawjoyaqcs") - .withSku("jpkiidzyexznelix")) - .withSku( - new Sku() - .withName("rzt") - .withTier(SkuTier.BASIC) - .withSize("bnxknalaulppg") - .withFamily("tpnapnyiropuhpig") - .withCapacity(2140009722)) - .withOsStorageType("lgqg") - .withHibernateSupport(HibernateSupport.ENABLED); - model = BinaryData.fromObject(model).toObject(DevBoxDefinitionUpdate.class); - Assertions.assertEquals("djvcsl", model.tags().get("n")); - Assertions.assertEquals("d", model.location()); - Assertions.assertEquals("boekqvkel", model.imageReference().id()); - Assertions.assertEquals("yjsflhhcaalnji", model.imageReference().publisher()); - Assertions.assertEquals("sxyawjoyaqcs", model.imageReference().offer()); - Assertions.assertEquals("jpkiidzyexznelix", model.imageReference().sku()); - Assertions.assertEquals("rzt", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("bnxknalaulppg", model.sku().size()); - Assertions.assertEquals("tpnapnyiropuhpig", model.sku().family()); - Assertions.assertEquals(2140009722, model.sku().capacity()); - Assertions.assertEquals("lgqg", model.osStorageType()); - Assertions.assertEquals(HibernateSupport.ENABLED, model.hibernateSupport()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteMockTests.java deleted file mode 100644 index ac38e6c5a2c17..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevBoxDefinitionsDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 DevBoxDefinitionsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devBoxDefinitions().delete("agtltdhlfkqoj", "ykvgtrdcnifmz", "sdymbrn", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterInnerTests.java deleted file mode 100644 index c4f7d53648ad7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterInnerTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevCenterInner; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DevCenterInnerTests { - @Test - public void testDeserialize() { - DevCenterInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"MovingResources\",\"devCenterUri\":\"pzvgnwzsymglzufc\"},\"identity\":{\"principalId\":\"3198e8cd-958c-4a35-824c-10bb7c932ddd\",\"tenantId\":\"614ac35e-6862-4675-a406-842c8163db35\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"anufhfcbjysag\":{\"principalId\":\"ecaf0ce5-f5d4-465c-a52f-e56df92b6e65\",\"clientId\":\"5441a2e3-e3d4-4652-9f0b-7dbd0cd692c1\"},\"xqhabi\":{\"principalId\":\"1d861053-93f8-4042-9089-513f85ea841a\",\"clientId\":\"c1e5cc6e-d197-4ab0-97da-392ac5c345d5\"}}},\"location\":\"ikxwc\",\"tags\":{\"n\":\"scnpqxuhivy\",\"rkxvdum\":\"wby\"},\"id\":\"grtfwvu\",\"name\":\"xgaudccs\",\"type\":\"h\"}") - .toObject(DevCenterInner.class); - Assertions.assertEquals("ikxwc", model.location()); - Assertions.assertEquals("scnpqxuhivy", model.tags().get("n")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @Test - public void testSerialize() { - DevCenterInner model = - new DevCenterInner() - .withLocation("ikxwc") - .withTags(mapOf("n", "scnpqxuhivy", "rkxvdum", "wby")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf("anufhfcbjysag", new UserAssignedIdentity(), "xqhabi", new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(DevCenterInner.class); - Assertions.assertEquals("ikxwc", model.location()); - Assertions.assertEquals("scnpqxuhivy", model.tags().get("n")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterListResultTests.java deleted file mode 100644 index e6a0112654767..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevCenterListResult; -import org.junit.jupiter.api.Test; - -public final class DevCenterListResultTests { - @Test - public void testDeserialize() { - DevCenterListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"devCenterUri\":\"gjxpybczmehmt\"},\"identity\":{\"principalId\":\"084be245-8a2b-45fc-82bb-bd6db1eb398a\",\"tenantId\":\"f3b48b54-e277-4901-981d-cf0bb4267060\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"rupidgsyb\",\"tags\":{\"xaobhdxbmtqioqjz\":\"hphoycm\",\"ownoizhw\":\"htbmuf\"},\"id\":\"rxybqsoq\",\"name\":\"jgkdmbpazlobcu\",\"type\":\"pdznrbtcqqjnqgl\"},{\"properties\":{\"provisioningState\":\"Creating\",\"devCenterUri\":\"foooj\"},\"identity\":{\"principalId\":\"03475844-5760-4648-9ca8-465bbab16ebd\",\"tenantId\":\"fe49a613-19e9-4d6c-96f1-d652ec462cc0\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"saagdf\",\"tags\":{\"izntocipao\":\"zlhjxrifkwmrvkt\"},\"id\":\"ajpsquc\",\"name\":\"poyfdkfogkn\",\"type\":\"gjofjd\"},{\"properties\":{\"provisioningState\":\"NotSpecified\",\"devCenterUri\":\"deupewnwrei\"},\"identity\":{\"principalId\":\"ce989883-7976-4a7e-9a50-f7969f5764bd\",\"tenantId\":\"413da7af-7575-47cf-bf21-15a5ccc86186\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"sarhmofc\",\"tags\":{\"rkdtmlxh\":\"my\"},\"id\":\"kuksjtxukcdm\",\"name\":\"arcryuanzwuxzdxt\",\"type\":\"yrlhmwhfpmrqobm\"}],\"nextLink\":\"kknryrtihf\"}") - .toObject(DevCenterListResult.class); - } - - @Test - public void testSerialize() { - DevCenterListResult model = new DevCenterListResult(); - model = BinaryData.fromObject(model).toObject(DevCenterListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterPropertiesTests.java deleted file mode 100644 index 0f98e73ffe6a9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevCenterProperties; -import org.junit.jupiter.api.Test; - -public final class DevCenterPropertiesTests { - @Test - public void testDeserialize() { - DevCenterProperties model = - BinaryData - .fromString("{\"provisioningState\":\"StorageProvisioningFailed\",\"devCenterUri\":\"yejhk\"}") - .toObject(DevCenterProperties.class); - } - - @Test - public void testSerialize() { - DevCenterProperties model = new DevCenterProperties(); - model = BinaryData.fromObject(model).toObject(DevCenterProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterSkuInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterSkuInnerTests.java deleted file mode 100644 index dc08d03466d61..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterSkuInnerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.DevCenterSkuInner; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DevCenterSkuInnerTests { - @Test - public void testDeserialize() { - DevCenterSkuInner model = - BinaryData - .fromString( - "{\"resourceType\":\"zapvhelx\",\"locations\":[\"lya\",\"dd\",\"kcbcue\",\"rjxgciqib\"],\"capabilities\":[{\"name\":\"xsdqrhzoymibmrqy\",\"value\":\"ahwfluszdtmhrk\"}],\"name\":\"ofyyvoqacpi\",\"tier\":\"Free\",\"size\":\"tg\",\"family\":\"bwoenwashrt\",\"capacity\":268126054}") - .toObject(DevCenterSkuInner.class); - Assertions.assertEquals("ofyyvoqacpi", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("tg", model.size()); - Assertions.assertEquals("bwoenwashrt", model.family()); - Assertions.assertEquals(268126054, model.capacity()); - } - - @Test - public void testSerialize() { - DevCenterSkuInner model = - new DevCenterSkuInner() - .withName("ofyyvoqacpi") - .withTier(SkuTier.FREE) - .withSize("tg") - .withFamily("bwoenwashrt") - .withCapacity(268126054); - model = BinaryData.fromObject(model).toObject(DevCenterSkuInner.class); - Assertions.assertEquals("ofyyvoqacpi", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("tg", model.size()); - Assertions.assertEquals("bwoenwashrt", model.family()); - Assertions.assertEquals(268126054, model.capacity()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterUpdateTests.java deleted file mode 100644 index 7538f04fc1562..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCenterUpdateTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.DevCenterUpdate; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DevCenterUpdateTests { - @Test - public void testDeserialize() { - DevCenterUpdate model = - BinaryData - .fromString( - "{\"identity\":{\"principalId\":\"0218f7cb-1973-4891-b7a7-b7e7bf835cc1\",\"tenantId\":\"c007f053-ec3c-4a7e-bb6e-e6547fdd282e\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ipjoxzjnchgejs\":{\"principalId\":\"46b87a21-c120-405e-aa71-751626bf8229\",\"clientId\":\"28bd133f-32bd-473d-bd8f-5068af5ba9da\"},\"mailzydehojw\":{\"principalId\":\"844c7466-6256-47ac-b865-cb907bed5c93\",\"clientId\":\"07144762-8153-450d-9688-dafe1f7ccd63\"},\"uxinpmqnjaq\":{\"principalId\":\"edc06086-f8b5-44c4-bf6d-fc586b42a36c\",\"clientId\":\"ffe278c5-9a31-43c5-97b5-ec3ca3c776d1\"}}},\"tags\":{\"jvwmfda\":\"jsprozvcpute\"},\"location\":\"cmdv\"}") - .toObject(DevCenterUpdate.class); - Assertions.assertEquals("jsprozvcpute", model.tags().get("jvwmfda")); - Assertions.assertEquals("cmdv", model.location()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @Test - public void testSerialize() { - DevCenterUpdate model = - new DevCenterUpdate() - .withTags(mapOf("jvwmfda", "jsprozvcpute")) - .withLocation("cmdv") - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "ipjoxzjnchgejs", - new UserAssignedIdentity(), - "mailzydehojw", - new UserAssignedIdentity(), - "uxinpmqnjaq", - new UserAssignedIdentity()))); - model = BinaryData.fromObject(model).toObject(DevCenterUpdate.class); - Assertions.assertEquals("jsprozvcpute", model.tags().get("jvwmfda")); - Assertions.assertEquals("cmdv", model.location()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateMockTests.java deleted file mode 100644 index b5e24e2826a5b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersCreateOrUpdateMockTests.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.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"devCenterUri\":\"dhszfjv\"},\"identity\":{\"principalId\":\"76a1a0f6-be18-4551-8ef6-bc4e975f65a0\",\"tenantId\":\"b25e406a-3f34-476b-bbb3-7743a40acae4\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"a\",\"tags\":{\"ojnal\":\"mqhldvrii\",\"qhhahhxvrhmzkwpj\":\"hfkvtvsexsowuel\",\"ughftqsx\":\"wws\"},\"id\":\"qxujxukndxd\",\"name\":\"grjguufzd\",\"type\":\"syqtfi\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DevCenter response = - manager - .devCenters() - .define("hneuyowqkd") - .withRegion("zimejzanlfzx") - .withExistingResourceGroup("smwutwbdsrezpd") - .withTags(mapOf("okixrjqcir", "rmbzo", "szrnwo", "zpfrla")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .create(); - - Assertions.assertEquals("a", response.location()); - Assertions.assertEquals("mqhldvrii", response.tags().get("ojnal")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteMockTests.java deleted file mode 100644 index a72e50049699a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 DevCentersDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.devCenters().delete("slthaq", "x", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 407ed38607f71..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersGetByResourceGroupWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Creating\",\"devCenterUri\":\"mkrefajpjorwkq\"},\"identity\":{\"principalId\":\"ec08b2b1-d1de-4f3f-a07c-23b1c306fcf6\",\"tenantId\":\"71bd909a-1f26-427f-84ce-b46ae805950a\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"jivfxzsjabib\",\"tags\":{\"jxbkzbzkdvn\":\"tawfsdjpvkvp\",\"zhjjklffhmouwq\":\"jabudurgkakmo\",\"eeyebi\":\"gzrf\"},\"id\":\"ikayuhqlbjbsybb\",\"name\":\"wrv\",\"type\":\"ldgmfpgvmpip\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DevCenter response = manager.devCenters().getByResourceGroupWithResponse("p", "kghv", Context.NONE).getValue(); - - Assertions.assertEquals("jivfxzsjabib", response.location()); - Assertions.assertEquals("tawfsdjpvkvp", response.tags().get("jxbkzbzkdvn")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupMockTests.java deleted file mode 100644 index 6f83c7b9adf1f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListByResourceGroupMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\",\"devCenterUri\":\"hfwpracstwit\"},\"identity\":{\"principalId\":\"4158bb19-2a5e-4ace-8f80-ae7740871014\",\"tenantId\":\"b3be5ba5-4938-487f-b793-6fb806b904c1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"edcpnmdyodnwzxl\",\"tags\":{\"avvwxqi\":\"vnhltiugcx\",\"unyowxwl\":\"y\",\"odacizs\":\"djrkvfgbvfvpd\"},\"id\":\"q\",\"name\":\"hkr\",\"type\":\"ibdeibq\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.devCenters().listByResourceGroup("swibyr", 403427600, Context.NONE); - - Assertions.assertEquals("edcpnmdyodnwzxl", response.iterator().next().location()); - Assertions.assertEquals("vnhltiugcx", response.iterator().next().tags().get("avvwxqi")); - Assertions - .assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListMockTests.java deleted file mode 100644 index fc29e5cbd4ae3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/DevCentersListMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenter; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -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 DevCentersListMockTests { - @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\":{\"provisioningState\":\"Deleted\",\"devCenterUri\":\"itqscywuggwoluhc\"},\"identity\":{\"principalId\":\"dae60f8d-942d-4891-a014-8e17b8d0913f\",\"tenantId\":\"89e07989-e019-4e2b-be67-ed9dba459180\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"rsbrgzdwm\",\"tags\":{\"xqhuexm\":\"ypqwdxggiccc\",\"ncsdtclusiyp\":\"ttlstvlzywemhz\",\"ygqukyhejh\":\"sfgytguslfead\",\"lolp\":\"isxgfp\"},\"id\":\"vk\",\"name\":\"r\",\"type\":\"qvujzraehtwdwrf\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.devCenters().list(1791253895, Context.NONE); - - Assertions.assertEquals("rsbrgzdwm", response.iterator().next().location()); - Assertions.assertEquals("ypqwdxggiccc", response.iterator().next().tags().get("xqhuexm")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentRoleTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentRoleTests.java deleted file mode 100644 index af104b03168fd..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentRoleTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import org.junit.jupiter.api.Test; - -public final class EnvironmentRoleTests { - @Test - public void testDeserialize() { - EnvironmentRole model = - BinaryData - .fromString("{\"roleName\":\"vwfudwpzntxhd\",\"description\":\"lrqjbhckfr\"}") - .toObject(EnvironmentRole.class); - } - - @Test - public void testSerialize() { - EnvironmentRole model = new EnvironmentRole(); - model = BinaryData.fromObject(model).toObject(EnvironmentRole.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeInnerTests.java deleted file mode 100644 index 3cd2a2cd630f3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentTypeInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentTypeInnerTests { - @Test - public void testDeserialize() { - EnvironmentTypeInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"NotSpecified\"},\"tags\":{\"grxwbu\":\"xmzsbbzogg\",\"dptkoenkouk\":\"vjxxjnsp\",\"pocipazyxoegu\":\"vudwtiukbldng\",\"npiucgygevqznty\":\"g\"},\"id\":\"rbpizc\",\"name\":\"r\",\"type\":\"j\"}") - .toObject(EnvironmentTypeInner.class); - Assertions.assertEquals("xmzsbbzogg", model.tags().get("grxwbu")); - } - - @Test - public void testSerialize() { - EnvironmentTypeInner model = - new EnvironmentTypeInner() - .withTags( - mapOf( - "grxwbu", - "xmzsbbzogg", - "dptkoenkouk", - "vjxxjnsp", - "pocipazyxoegu", - "vudwtiukbldng", - "npiucgygevqznty", - "g")); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeInner.class); - Assertions.assertEquals("xmzsbbzogg", model.tags().get("grxwbu")); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeListResultTests.java deleted file mode 100644 index cb7d9bc7d535b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeListResult; -import org.junit.jupiter.api.Test; - -public final class EnvironmentTypeListResultTests { - @Test - public void testDeserialize() { - EnvironmentTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"RolloutInProgress\"},\"tags\":{\"onpc\":\"xc\"},\"id\":\"ocohslkevleg\",\"name\":\"zfbuhf\",\"type\":\"vfaxkffeiith\"}],\"nextLink\":\"m\"}") - .toObject(EnvironmentTypeListResult.class); - } - - @Test - public void testSerialize() { - EnvironmentTypeListResult model = new EnvironmentTypeListResult(); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypePropertiesTests.java deleted file mode 100644 index b5d21fab196b0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypePropertiesTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.EnvironmentTypeProperties; -import org.junit.jupiter.api.Test; - -public final class EnvironmentTypePropertiesTests { - @Test - public void testDeserialize() { - EnvironmentTypeProperties model = - BinaryData.fromString("{\"provisioningState\":\"Running\"}").toObject(EnvironmentTypeProperties.class); - } - - @Test - public void testSerialize() { - EnvironmentTypeProperties model = new EnvironmentTypeProperties(); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeUpdateTests.java deleted file mode 100644 index 91321de5c4721..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypeUpdateTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentTypeUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentTypeUpdateTests { - @Test - public void testDeserialize() { - EnvironmentTypeUpdate model = - BinaryData - .fromString( - "{\"tags\":{\"eoejzic\":\"nfyhx\",\"hajdeyeamdpha\":\"ifsjttgzfbishcb\",\"wkgshwa\":\"alpbuxwgipwhon\",\"bin\":\"kix\"}}") - .toObject(EnvironmentTypeUpdate.class); - Assertions.assertEquals("nfyhx", model.tags().get("eoejzic")); - } - - @Test - public void testSerialize() { - EnvironmentTypeUpdate model = - new EnvironmentTypeUpdate() - .withTags( - mapOf( - "eoejzic", - "nfyhx", - "hajdeyeamdpha", - "ifsjttgzfbishcb", - "wkgshwa", - "alpbuxwgipwhon", - "bin", - "kix")); - model = BinaryData.fromObject(model).toObject(EnvironmentTypeUpdate.class); - Assertions.assertEquals("nfyhx", model.tags().get("eoejzic")); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index ee4f4308d1796..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentType; -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 EnvironmentTypesCreateOrUpdateWithResponseMockTests { - @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\":{\"provisioningState\":\"Updating\"},\"tags\":{\"atnwxyiopi\":\"azivjlfrqttbajl\",\"vscx\":\"kqqfk\",\"mloazuru\":\"dmligovibrxk\"},\"id\":\"bgo\",\"name\":\"rb\",\"type\":\"eoybfhjxakvvjgs\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentType response = - manager - .environmentTypes() - .define("cgxxlxs") - .withExistingDevcenter("msksbp", "mlqoljx") - .withTags(mapOf("vwlyoup", "zqzdw", "kfm", "gfbkjubdyh", "ktlahbqa", "nsgowzfttst", "gzukxitmm", "tx")) - .create(); - - Assertions.assertEquals("azivjlfrqttbajl", response.tags().get("atnwxyiopi")); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteWithResponseMockTests.java deleted file mode 100644 index 74e7e622a2459..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesDeleteWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 EnvironmentTypesDeleteWithResponseMockTests { - @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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.environmentTypes().deleteWithResponse("ytibyow", "blgyavutpthj", "xoi", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetWithResponseMockTests.java deleted file mode 100644 index b178c3084044d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesGetWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentType; -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 EnvironmentTypesGetWithResponseMockTests { - @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\":{\"provisioningState\":\"Created\"},\"tags\":{\"nizshqvcim\":\"cje\",\"gmblrri\":\"ev\"},\"id\":\"ywdxsmic\",\"name\":\"wrwfscjfnyns\",\"type\":\"qujizdvo\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentType response = - manager - .environmentTypes() - .getWithResponse("ufiqndieuzaof", "chvcyyysfgdo", "cubiipuipw", Context.NONE) - .getValue(); - - Assertions.assertEquals("cje", response.tags().get("nizshqvcim")); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterMockTests.java deleted file mode 100644 index 1b20fccf546bd..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/EnvironmentTypesListByDevCenterMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnvironmentType; -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 EnvironmentTypesListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"NotSpecified\"},\"tags\":{\"nnrwrbiork\":\"wzsoldweyuqdunv\"},\"id\":\"lywjhh\",\"name\":\"dnhxmsi\",\"type\":\"fomiloxgg\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.environmentTypes().listByDevCenter("daxconfozauorsuk", "kwbqplhlvnuu", 1643083529, Context.NONE); - - Assertions.assertEquals("wzsoldweyuqdunv", response.iterator().next().tags().get("nnrwrbiork")); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteMockTests.java deleted file mode 100644 index 0dcf4103f4898..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 GalleriesDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.galleries().delete("x", "lucvpam", "sreuzvxurisjnh", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetWithResponseMockTests.java deleted file mode 100644 index 1766f7ef0f49c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Gallery; -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 GalleriesGetWithResponseMockTests { - @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\":{\"provisioningState\":\"Running\",\"galleryResourceId\":\"mrfhirctymox\"},\"id\":\"tpipiwyczuhx\",\"name\":\"cpqjlihhyu\",\"type\":\"pskasdvlmfwdg\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Gallery response = manager.galleries().getWithResponse("n", "bgye", "rymsgaojfmw", Context.NONE).getValue(); - - Assertions.assertEquals("mrfhirctymox", response.galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterMockTests.java deleted file mode 100644 index 04ed237564287..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleriesListByDevCenterMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Gallery; -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 GalleriesListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"galleryResourceId\":\"luyovwxnbkfezzx\"},\"id\":\"yhwzdgiruj\",\"name\":\"zbomvzzbtdcqvpni\",\"type\":\"ujviylwdshfs\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.galleries().listByDevCenter("ghhavgrvkffo", "jzhpjbibgjmfx", 504672156, Context.NONE); - - Assertions.assertEquals("luyovwxnbkfezzx", response.iterator().next().galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryInnerTests.java deleted file mode 100644 index a861ad0d14e9a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.GalleryInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GalleryInnerTests { - @Test - public void testDeserialize() { - GalleryInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Creating\",\"galleryResourceId\":\"kajionpim\"},\"id\":\"gstxgcp\",\"name\":\"dg\",\"type\":\"aajrm\"}") - .toObject(GalleryInner.class); - Assertions.assertEquals("kajionpim", model.galleryResourceId()); - } - - @Test - public void testSerialize() { - GalleryInner model = new GalleryInner().withGalleryResourceId("kajionpim"); - model = BinaryData.fromObject(model).toObject(GalleryInner.class); - Assertions.assertEquals("kajionpim", model.galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryListResultTests.java deleted file mode 100644 index 29dd7952866be..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.GalleryListResult; -import org.junit.jupiter.api.Test; - -public final class GalleryListResultTests { - @Test - public void testDeserialize() { - GalleryListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"galleryResourceId\":\"cyshurzafbljjgp\"},\"id\":\"oq\",\"name\":\"jmkljavbqidtqajz\",\"type\":\"ulpkudjkrl\"},{\"properties\":{\"provisioningState\":\"NotSpecified\",\"galleryResourceId\":\"hfepgzgqex\"},\"id\":\"ocxscpaierhhbcs\",\"name\":\"l\",\"type\":\"mmajtjaodx\"}],\"nextLink\":\"nbdxk\"}") - .toObject(GalleryListResult.class); - } - - @Test - public void testSerialize() { - GalleryListResult model = new GalleryListResult(); - model = BinaryData.fromObject(model).toObject(GalleryListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryPropertiesTests.java deleted file mode 100644 index 11aa39bff7257..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/GalleryPropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.GalleryProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GalleryPropertiesTests { - @Test - public void testDeserialize() { - GalleryProperties model = - BinaryData - .fromString("{\"provisioningState\":\"Created\",\"galleryResourceId\":\"wzrlovmclwhij\"}") - .toObject(GalleryProperties.class); - Assertions.assertEquals("wzrlovmclwhij", model.galleryResourceId()); - } - - @Test - public void testSerialize() { - GalleryProperties model = new GalleryProperties().withGalleryResourceId("wzrlovmclwhij"); - model = BinaryData.fromObject(model).toObject(GalleryProperties.class); - Assertions.assertEquals("wzrlovmclwhij", model.galleryResourceId()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsInnerTests.java deleted file mode 100644 index 75313505075ad..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.HealthCheckStatusDetailsInner; -import org.junit.jupiter.api.Test; - -public final class HealthCheckStatusDetailsInnerTests { - @Test - public void testDeserialize() { - HealthCheckStatusDetailsInner model = - BinaryData - .fromString( - "{\"properties\":{\"startDateTime\":\"2021-01-15T20:49Z\",\"endDateTime\":\"2021-04-16T00:49:55Z\",\"healthChecks\":[{\"status\":\"Passed\",\"displayName\":\"ujitcjedftww\",\"startDateTime\":\"2021-04-17T00:18:26Z\",\"endDateTime\":\"2021-01-22T13:54:08Z\",\"errorType\":\"v\",\"recommendedAction\":\"pzfoqoui\",\"additionalDetails\":\"bxarzgszufoxci\"},{\"status\":\"Passed\",\"displayName\":\"doamciodhkha\",\"startDateTime\":\"2021-06-05T04:56:19Z\",\"endDateTime\":\"2021-11-22T06:47:21Z\",\"errorType\":\"bon\",\"recommendedAction\":\"ntoe\",\"additionalDetails\":\"kdwbwhkszz\"}]},\"id\":\"rvexztvb\",\"name\":\"qgsfraoyzkoow\",\"type\":\"lmnguxaw\"}") - .toObject(HealthCheckStatusDetailsInner.class); - } - - @Test - public void testSerialize() { - HealthCheckStatusDetailsInner model = new HealthCheckStatusDetailsInner(); - model = BinaryData.fromObject(model).toObject(HealthCheckStatusDetailsInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsListResultTests.java deleted file mode 100644 index 13d59b857922f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetailsListResult; -import org.junit.jupiter.api.Test; - -public final class HealthCheckStatusDetailsListResultTests { - @Test - public void testDeserialize() { - HealthCheckStatusDetailsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"startDateTime\":\"2021-11-30T02:44:30Z\",\"endDateTime\":\"2021-02-08T05:43:26Z\",\"healthChecks\":[]},\"id\":\"wcsdbnwdcfhucq\",\"name\":\"pfuvglsbjjca\",\"type\":\"vxb\"},{\"properties\":{\"startDateTime\":\"2021-05-11T02:00:05Z\",\"endDateTime\":\"2021-04-07T04:06:35Z\",\"healthChecks\":[]},\"id\":\"cormr\",\"name\":\"xqtvcofu\",\"type\":\"f\"},{\"properties\":{\"startDateTime\":\"2021-10-24T03:31:48Z\",\"endDateTime\":\"2021-04-04T17:02:59Z\",\"healthChecks\":[]},\"id\":\"dknnqvsazn\",\"name\":\"n\",\"type\":\"orudsgsa\"},{\"properties\":{\"startDateTime\":\"2021-05-15T08:27:32Z\",\"endDateTime\":\"2021-03-28T14:55:38Z\",\"healthChecks\":[]},\"id\":\"uwjuetaeburuvdmo\",\"name\":\"s\",\"type\":\"zlxwabmqoefkifr\"}],\"nextLink\":\"puqujmqlgkfbtn\"}") - .toObject(HealthCheckStatusDetailsListResult.class); - } - - @Test - public void testSerialize() { - HealthCheckStatusDetailsListResult model = new HealthCheckStatusDetailsListResult(); - model = BinaryData.fromObject(model).toObject(HealthCheckStatusDetailsListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsPropertiesTests.java deleted file mode 100644 index e9c9d287ef675..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckStatusDetailsPropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.HealthCheckStatusDetailsProperties; -import org.junit.jupiter.api.Test; - -public final class HealthCheckStatusDetailsPropertiesTests { - @Test - public void testDeserialize() { - HealthCheckStatusDetailsProperties model = - BinaryData - .fromString( - "{\"startDateTime\":\"2021-07-04T15:12:18Z\",\"endDateTime\":\"2021-08-31T00:24:47Z\",\"healthChecks\":[{\"status\":\"Passed\",\"displayName\":\"merqfobwyznkb\",\"startDateTime\":\"2021-09-01T21:16:52Z\",\"endDateTime\":\"2021-02-09T02:12:11Z\",\"errorType\":\"fhpagmhrskdsnf\",\"recommendedAction\":\"doakgtdlmkkzevdl\",\"additionalDetails\":\"wpusdsttwvogv\"},{\"status\":\"Failed\",\"displayName\":\"dcngqqmoakufgmj\",\"startDateTime\":\"2021-08-21T00:33:47Z\",\"endDateTime\":\"2021-10-15T18:34:13Z\",\"errorType\":\"rtwaenuuzko\",\"recommendedAction\":\"minrfdw\",\"additionalDetails\":\"uhhziuiefozbhdm\"}]}") - .toObject(HealthCheckStatusDetailsProperties.class); - } - - @Test - public void testSerialize() { - HealthCheckStatusDetailsProperties model = new HealthCheckStatusDetailsProperties(); - model = BinaryData.fromObject(model).toObject(HealthCheckStatusDetailsProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckTests.java deleted file mode 100644 index af139110155c9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/HealthCheckTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.HealthCheck; -import org.junit.jupiter.api.Test; - -public final class HealthCheckTests { - @Test - public void testDeserialize() { - HealthCheck model = - BinaryData - .fromString( - "{\"status\":\"Passed\",\"displayName\":\"zqhof\",\"startDateTime\":\"2021-05-05T04:42:21Z\",\"endDateTime\":\"2021-11-16T17:43:34Z\",\"errorType\":\"u\",\"recommendedAction\":\"hxicslfaoqz\",\"additionalDetails\":\"yylhalnswhccsp\"}") - .toObject(HealthCheck.class); - } - - @Test - public void testSerialize() { - HealthCheck model = new HealthCheck(); - model = BinaryData.fromObject(model).toObject(HealthCheck.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageInnerTests.java deleted file mode 100644 index f7f5d44184b2f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageInner; -import org.junit.jupiter.api.Test; - -public final class ImageInnerTests { - @Test - public void testDeserialize() { - ImageInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"fsxlzevgbmqjqa\",\"publisher\":\"y\",\"offer\":\"ivkwlzuvccfwnfnb\",\"sku\":\"fionl\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"Creating\"},\"id\":\"tzxdpnqbqqwx\",\"name\":\"jfeallnwsub\",\"type\":\"snjampmng\"}") - .toObject(ImageInner.class); - } - - @Test - public void testSerialize() { - ImageInner model = new ImageInner(); - model = BinaryData.fromObject(model).toObject(ImageInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageListResultTests.java deleted file mode 100644 index ce84aea09dea8..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ImageListResult; -import org.junit.jupiter.api.Test; - -public final class ImageListResultTests { - @Test - public void testDeserialize() { - ImageListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"tbzaqsqsycbkbfk\",\"publisher\":\"kdkexxp\",\"offer\":\"fmxa\",\"sku\":\"fjpgddtocjjxhvp\",\"provisioningState\":\"Creating\"},\"id\":\"hd\",\"name\":\"xibqeojnx\",\"type\":\"bzv\"},{\"properties\":{\"description\":\"t\",\"publisher\":\"deicbtwnpzao\",\"offer\":\"uhrhcffcyddgl\",\"sku\":\"t\",\"provisioningState\":\"Accepted\"},\"id\":\"pyeicxm\",\"name\":\"ciwqvhk\",\"type\":\"ixuigdtopbobj\"},{\"properties\":{\"description\":\"m\",\"publisher\":\"u\",\"offer\":\"a\",\"sku\":\"rzayv\",\"provisioningState\":\"TransientFailure\"},\"id\":\"dfgiot\",\"name\":\"ftutqxlngxlefgu\",\"type\":\"nxkrx\"},{\"properties\":{\"description\":\"i\",\"publisher\":\"thz\",\"offer\":\"qdrabhjybigehoqf\",\"sku\":\"wska\",\"provisioningState\":\"TransientFailure\"},\"id\":\"lcuiywgqywgndr\",\"name\":\"ynhz\",\"type\":\"pphrcgynco\"}],\"nextLink\":\"ecfvmm\"}") - .toObject(ImageListResult.class); - } - - @Test - public void testSerialize() { - ImageListResult model = new ImageListResult(); - model = BinaryData.fromObject(model).toObject(ImageListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagePropertiesTests.java deleted file mode 100644 index cc9e8dfdadec6..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagePropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageProperties; -import org.junit.jupiter.api.Test; - -public final class ImagePropertiesTests { - @Test - public void testDeserialize() { - ImageProperties model = - BinaryData - .fromString( - "{\"description\":\"scxaq\",\"publisher\":\"ochcbonqvpkvl\",\"offer\":\"njeaseipheofloke\",\"sku\":\"ienjbdlwtgr\",\"recommendedMachineConfiguration\":{\"memory\":{\"min\":469621378,\"max\":523400535},\"vCPUs\":{\"min\":1786348929,\"max\":2023668162}},\"provisioningState\":\"Updated\"}") - .toObject(ImageProperties.class); - } - - @Test - public void testSerialize() { - ImageProperties model = new ImageProperties(); - model = BinaryData.fromObject(model).toObject(ImageProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageReferenceTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageReferenceTests.java deleted file mode 100644 index 6ca0c34823c3a..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageReferenceTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ImageReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ImageReferenceTests { - @Test - public void testDeserialize() { - ImageReference model = - BinaryData - .fromString( - "{\"id\":\"gwyzm\",\"exactVersion\":\"xongmtsavjcbpwxq\",\"publisher\":\"rknftguvriuhprwm\",\"offer\":\"vxqtayriwwroyqbe\",\"sku\":\"mcqibycnojv\"}") - .toObject(ImageReference.class); - Assertions.assertEquals("gwyzm", model.id()); - Assertions.assertEquals("rknftguvriuhprwm", model.publisher()); - Assertions.assertEquals("vxqtayriwwroyqbe", model.offer()); - Assertions.assertEquals("mcqibycnojv", model.sku()); - } - - @Test - public void testSerialize() { - ImageReference model = - new ImageReference() - .withId("gwyzm") - .withPublisher("rknftguvriuhprwm") - .withOffer("vxqtayriwwroyqbe") - .withSku("mcqibycnojv"); - model = BinaryData.fromObject(model).toObject(ImageReference.class); - Assertions.assertEquals("gwyzm", model.id()); - Assertions.assertEquals("rknftguvriuhprwm", model.publisher()); - Assertions.assertEquals("vxqtayriwwroyqbe", model.offer()); - Assertions.assertEquals("mcqibycnojv", model.sku()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionInnerTests.java deleted file mode 100644 index dd368409253a6..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageVersionInner; -import org.junit.jupiter.api.Test; - -public final class ImageVersionInnerTests { - @Test - public void testDeserialize() { - ImageVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"name\":\"zj\",\"publishedDate\":\"2021-10-23T04:38:56Z\",\"excludeFromLatest\":false,\"osDiskImageSizeInGb\":1473301167,\"provisioningState\":\"Deleting\"},\"id\":\"b\",\"name\":\"uofqwe\",\"type\":\"kh\"}") - .toObject(ImageVersionInner.class); - } - - @Test - public void testSerialize() { - ImageVersionInner model = new ImageVersionInner(); - model = BinaryData.fromObject(model).toObject(ImageVersionInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionListResultTests.java deleted file mode 100644 index 57721ae2ae921..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ImageVersionListResult; -import org.junit.jupiter.api.Test; - -public final class ImageVersionListResultTests { - @Test - public void testDeserialize() { - ImageVersionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"name\":\"v\",\"publishedDate\":\"2021-10-15T07:07:10Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":1894973970,\"provisioningState\":\"Created\"},\"id\":\"otwmcyn\",\"name\":\"wlbjnpgacftade\",\"type\":\"xnltyfsoppu\"},{\"properties\":{\"name\":\"snzwd\",\"publishedDate\":\"2021-03-20T11:41:09Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":1996811861,\"provisioningState\":\"Failed\"},\"id\":\"mohctb\",\"name\":\"vudwx\",\"type\":\"ndnvo\"}],\"nextLink\":\"ujjugwdkcglh\"}") - .toObject(ImageVersionListResult.class); - } - - @Test - public void testSerialize() { - ImageVersionListResult model = new ImageVersionListResult(); - model = BinaryData.fromObject(model).toObject(ImageVersionListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionPropertiesTests.java deleted file mode 100644 index a33705f65b1b7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionPropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ImageVersionProperties; -import org.junit.jupiter.api.Test; - -public final class ImageVersionPropertiesTests { - @Test - public void testDeserialize() { - ImageVersionProperties model = - BinaryData - .fromString( - "{\"name\":\"n\",\"publishedDate\":\"2021-11-13T11:48:47Z\",\"excludeFromLatest\":false,\"osDiskImageSizeInGb\":393211595,\"provisioningState\":\"Updated\"}") - .toObject(ImageVersionProperties.class); - } - - @Test - public void testSerialize() { - ImageVersionProperties model = new ImageVersionProperties(); - model = BinaryData.fromObject(model).toObject(ImageVersionProperties.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetWithResponseMockTests.java deleted file mode 100644 index d7e294d3e38d1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsGetWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.ImageVersion; -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 ImageVersionsGetWithResponseMockTests { - @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\":{\"name\":\"ybar\",\"publishedDate\":\"2021-06-21T23:29Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":462603095,\"provisioningState\":\"MovingResources\"},\"id\":\"qgzsles\",\"name\":\"cbhernntiewdj\",\"type\":\"vbquwr\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ImageVersion response = - manager - .imageVersions() - .getWithResponse( - "mbtxhwgf", "srtawcoezbr", "ubskhudygoookkq", "qjbvleorfmlu", "qtqzfavyv", Context.NONE) - .getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageMockTests.java deleted file mode 100644 index 3f5f3135f6e52..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImageVersionsListByImageMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.ImageVersion; -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 ImageVersionsListByImageMockTests { - @Test - public void testListByImage() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"name\":\"dlgzibthostgkt\",\"publishedDate\":\"2021-09-21T04:56:25Z\",\"excludeFromLatest\":true,\"osDiskImageSizeInGb\":318971885,\"provisioningState\":\"TransientFailure\"},\"id\":\"dqbcvhzlhplod\",\"name\":\"kdl\",\"type\":\"wqfbumlkxtrqjfsm\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.imageVersions().listByImage("tbaxk", "xywr", "kpyklyhp", "uodpv", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesGetWithResponseMockTests.java deleted file mode 100644 index 6100b853bd50b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesGetWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Image; -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 ImagesGetWithResponseMockTests { - @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\":{\"description\":\"rvkwc\",\"publisher\":\"ql\",\"offer\":\"x\",\"sku\":\"czheyd\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"NotSpecified\"},\"id\":\"xmaehvbbxu\",\"name\":\"iplt\",\"type\":\"n\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Image response = - manager.images().getWithResponse("zuo", "ejwcwwqiok", "ssxmojms", "p", Context.NONE).getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterMockTests.java deleted file mode 100644 index 120f6c32131ce..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByDevCenterMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Image; -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 ImagesListByDevCenterMockTests { - @Test - public void testListByDevCenter() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"utpwoqhihejqgw\",\"publisher\":\"nfqn\",\"offer\":\"ypsxjvfoim\",\"sku\":\"slirciz\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"Canceled\"},\"id\":\"eacvl\",\"name\":\"vygdyft\",\"type\":\"mrtwna\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.images().listByDevCenter("ytxifqjzgxmrh", "blwpcesutrgj", 1785094261, Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGalleryMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGalleryMockTests.java deleted file mode 100644 index 6b66c017a5572..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ImagesListByGalleryMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Image; -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 ImagesListByGalleryMockTests { - @Test - public void testListByGallery() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"ehuwrykqgaifmvik\",\"publisher\":\"ydv\",\"offer\":\"bejdznxcv\",\"sku\":\"rhnj\",\"recommendedMachineConfiguration\":{},\"provisioningState\":\"StorageProvisioningFailed\"},\"id\":\"ovqfzge\",\"name\":\"jdftuljltd\",\"type\":\"ceamtm\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.images().listByGallery("jslb", "wkojgcyztsfmzn", "aeqphchqnr", 1219456707, Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ListUsagesResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ListUsagesResultTests.java deleted file mode 100644 index b83c6625bc92f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ListUsagesResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ListUsagesResult; -import org.junit.jupiter.api.Test; - -public final class ListUsagesResultTests { - @Test - public void testDeserialize() { - ListUsagesResult model = - BinaryData - .fromString( - "{\"value\":[{\"currentValue\":8612812378237184133,\"limit\":8060447161666090820,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"otgqrlltmu\",\"value\":\"auwzizxbmpgc\"}},{\"currentValue\":2032891691540283618,\"limit\":3898811101398882532,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"tdum\",\"value\":\"p\"}}],\"nextLink\":\"ebmnzbtbhjpglk\"}") - .toObject(ListUsagesResult.class); - } - - @Test - public void testSerialize() { - ListUsagesResult model = new ListUsagesResult(); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ManagedServiceIdentityTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 578debb160f62..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedServiceIdentityTests { - @Test - public void testDeserialize() { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"4c382a05-386b-4ad1-9ab7-9542f99f3605\",\"tenantId\":\"447037b8-c0b4-4e45-853f-7f9f92810a52\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{\"zw\":{\"principalId\":\"eee277a0-3e9d-4ce5-9f7b-fa8f8eb18c3a\",\"clientId\":\"7303041d-8a8e-4546-bd1c-c7a918421f5f\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @Test - public void testSerialize() { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("zw", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteMockTests.java deleted file mode 100644 index 0f5836a624c7d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 NetworkConnectionsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkConnections().delete("dzaapmudqme", "wig", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsWithResponseMockTests.java deleted file mode 100644 index cb960917315a6..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsGetHealthDetailsWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetails; -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 NetworkConnectionsGetHealthDetailsWithResponseMockTests { - @Test - public void testGetHealthDetailsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"startDateTime\":\"2021-11-14T21:04:41Z\",\"endDateTime\":\"2021-01-21T06:36:36Z\",\"healthChecks\":[]},\"id\":\"smjqfrddgam\",\"name\":\"uhiosrsju\",\"type\":\"vfcdisyirn\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - HealthCheckStatusDetails response = - manager.networkConnections().getHealthDetailsWithResponse("ioqaqhvs", "ufuqyrx", Context.NONE).getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsMockTests.java deleted file mode 100644 index adef6c935e79f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsListHealthDetailsMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.HealthCheckStatusDetails; -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 NetworkConnectionsListHealthDetailsMockTests { - @Test - public void testListHealthDetails() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"startDateTime\":\"2021-03-25T07:20:19Z\",\"endDateTime\":\"2021-09-19T04:29:07Z\",\"healthChecks\":[]},\"id\":\"ff\",\"name\":\"aqi\",\"type\":\"mhh\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.networkConnections().listHealthDetails("ibudqwy", "eb", 1568036168, Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksMockTests.java deleted file mode 100644 index 1c8df184e1563..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/NetworkConnectionsRunHealthChecksMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 NetworkConnectionsRunHealthChecksMockTests { - @Test - public void testRunHealthChecks() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.networkConnections().runHealthChecks("zhczexrxzbujrtrh", "vwrevkhgnlnzon", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationDisplayTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationDisplayTests.java deleted file mode 100644 index 0498ccf8a1857..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationDisplayTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.OperationDisplay; -import org.junit.jupiter.api.Test; - -public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"vwpm\",\"resource\":\"aruoujmkcjhwqyt\",\"operation\":\"ybn\",\"description\":\"ewgdrjervn\"}") - .toObject(OperationDisplay.class); - } - - @Test - public void testSerialize() { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationInnerTests.java deleted file mode 100644 index a92c92b625835..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.OperationInner; -import com.azure.resourcemanager.devcenter.models.OperationDisplay; -import org.junit.jupiter.api.Test; - -public final class OperationInnerTests { - @Test - public void testDeserialize() { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"v\",\"isDataAction\":true,\"display\":{\"provider\":\"fsubcgjbirxbpy\",\"resource\":\"rfbjf\",\"operation\":\"w\",\"description\":\"otftpvjzbexilz\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @Test - public void testSerialize() { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationListResultTests.java deleted file mode 100644 index 53bc7f5fb8020..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.OperationListResult; -import org.junit.jupiter.api.Test; - -public final class OperationListResultTests { - @Test - public void testDeserialize() { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"qbuaceopzfqr\",\"isDataAction\":true,\"display\":{\"provider\":\"pppcqeqxo\",\"resource\":\"dahzxctobg\",\"operation\":\"dmoizpostmg\",\"description\":\"fbunrmfqjhhk\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"mjh\",\"isDataAction\":false,\"display\":{\"provider\":\"gudivkrtswbxqz\",\"resource\":\"zjf\",\"operation\":\"vjfdx\",\"description\":\"vetvt\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"oqmcbxvwvxyslq\",\"isDataAction\":false,\"display\":{\"provider\":\"obl\",\"resource\":\"k\",\"operation\":\"mpew\",\"description\":\"fbkrvrnsvs\"},\"origin\":\"system\",\"actionType\":\"Internal\"}],\"nextLink\":\"crsbfovasr\"}") - .toObject(OperationListResult.class); - } - - @Test - public void testSerialize() { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusInnerTests.java deleted file mode 100644 index f53c07e361775..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusInnerTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.OperationStatusInner; -import com.azure.resourcemanager.devcenter.models.OperationStatusResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationStatusInnerTests { - @Test - public void testDeserialize() { - OperationStatusInner model = - BinaryData - .fromString( - "{\"resourceId\":\"nqpeh\",\"properties\":\"datadoy\",\"id\":\"ifthnz\",\"name\":\"dslgnayqigynduh\",\"status\":\"vhqlkthumaqo\",\"percentComplete\":30.626493,\"startTime\":\"2021-05-30T14:02:28Z\",\"endTime\":\"2021-04-25T18:04:33Z\",\"operations\":[{\"id\":\"tgccymvaolpss\",\"name\":\"lfmmdnbbglzpswi\",\"status\":\"d\",\"percentComplete\":37.165897,\"startTime\":\"2021-03-06T05:36:52Z\",\"endTime\":\"2021-08-29T22:47:03Z\",\"operations\":[]},{\"id\":\"dbzm\",\"name\":\"dfznudaodv\",\"status\":\"zbn\",\"percentComplete\":49.11586,\"startTime\":\"2021-10-03T10:48:30Z\",\"endTime\":\"2021-01-17T11:09:05Z\",\"operations\":[]},{\"id\":\"hxsrzdzucersc\",\"name\":\"t\",\"status\":\"evfiwjmygt\",\"percentComplete\":33.722137,\"startTime\":\"2021-11-02T04:29:59Z\",\"endTime\":\"2021-02-15T10:13:42Z\",\"operations\":[]}]}") - .toObject(OperationStatusInner.class); - Assertions.assertEquals("ifthnz", model.id()); - Assertions.assertEquals("dslgnayqigynduh", model.name()); - Assertions.assertEquals("vhqlkthumaqo", model.status()); - Assertions.assertEquals(30.626493F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-30T14:02:28Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T18:04:33Z"), model.endTime()); - Assertions.assertEquals("tgccymvaolpss", model.operations().get(0).id()); - Assertions.assertEquals("lfmmdnbbglzpswi", model.operations().get(0).name()); - Assertions.assertEquals("d", model.operations().get(0).status()); - Assertions.assertEquals(37.165897F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T05:36:52Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T22:47:03Z"), model.operations().get(0).endTime()); - } - - @Test - public void testSerialize() { - OperationStatusInner model = - new OperationStatusInner() - .withId("ifthnz") - .withName("dslgnayqigynduh") - .withStatus("vhqlkthumaqo") - .withPercentComplete(30.626493F) - .withStartTime(OffsetDateTime.parse("2021-05-30T14:02:28Z")) - .withEndTime(OffsetDateTime.parse("2021-04-25T18:04:33Z")) - .withOperations( - Arrays - .asList( - new OperationStatusResult() - .withId("tgccymvaolpss") - .withName("lfmmdnbbglzpswi") - .withStatus("d") - .withPercentComplete(37.165897F) - .withStartTime(OffsetDateTime.parse("2021-03-06T05:36:52Z")) - .withEndTime(OffsetDateTime.parse("2021-08-29T22:47:03Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("dbzm") - .withName("dfznudaodv") - .withStatus("zbn") - .withPercentComplete(49.11586F) - .withStartTime(OffsetDateTime.parse("2021-10-03T10:48:30Z")) - .withEndTime(OffsetDateTime.parse("2021-01-17T11:09:05Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("hxsrzdzucersc") - .withName("t") - .withStatus("evfiwjmygt") - .withPercentComplete(33.722137F) - .withStartTime(OffsetDateTime.parse("2021-11-02T04:29:59Z")) - .withEndTime(OffsetDateTime.parse("2021-02-15T10:13:42Z")) - .withOperations(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(OperationStatusInner.class); - Assertions.assertEquals("ifthnz", model.id()); - Assertions.assertEquals("dslgnayqigynduh", model.name()); - Assertions.assertEquals("vhqlkthumaqo", model.status()); - Assertions.assertEquals(30.626493F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-30T14:02:28Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-25T18:04:33Z"), model.endTime()); - Assertions.assertEquals("tgccymvaolpss", model.operations().get(0).id()); - Assertions.assertEquals("lfmmdnbbglzpswi", model.operations().get(0).name()); - Assertions.assertEquals("d", model.operations().get(0).status()); - Assertions.assertEquals(37.165897F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-06T05:36:52Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-29T22:47:03Z"), model.operations().get(0).endTime()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusResultTests.java deleted file mode 100644 index 99bbc711632b9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.OperationStatusResult; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationStatusResultTests { - @Test - public void testDeserialize() { - OperationStatusResult model = - BinaryData - .fromString( - "{\"id\":\"ofz\",\"name\":\"qsemwabne\",\"status\":\"shhszhedplvwiw\",\"percentComplete\":32.278084,\"startTime\":\"2021-05-24T21:25:26Z\",\"endTime\":\"2021-08-31T20:47:41Z\",\"operations\":[{\"id\":\"nkww\",\"name\":\"pjflcxogao\",\"status\":\"onz\",\"percentComplete\":92.21938,\"startTime\":\"2021-10-10T22:40:52Z\",\"endTime\":\"2021-11-27T21:17:05Z\",\"operations\":[]},{\"id\":\"qqkdltfzxmhhvhgu\",\"name\":\"odkwobd\",\"status\":\"gxtibqdxbxw\",\"percentComplete\":82.218605,\"startTime\":\"2021-01-16T00:33:56Z\",\"endTime\":\"2021-11-13T02:15:02Z\",\"operations\":[]},{\"id\":\"zgx\",\"name\":\"ripl\",\"status\":\"podxunkb\",\"percentComplete\":75.54857,\"startTime\":\"2021-07-12T07:57:48Z\",\"endTime\":\"2021-11-09T08:18:47Z\",\"operations\":[]}]}") - .toObject(OperationStatusResult.class); - Assertions.assertEquals("ofz", model.id()); - Assertions.assertEquals("qsemwabne", model.name()); - Assertions.assertEquals("shhszhedplvwiw", model.status()); - Assertions.assertEquals(32.278084F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T21:25:26Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T20:47:41Z"), model.endTime()); - Assertions.assertEquals("nkww", model.operations().get(0).id()); - Assertions.assertEquals("pjflcxogao", model.operations().get(0).name()); - Assertions.assertEquals("onz", model.operations().get(0).status()); - Assertions.assertEquals(92.21938F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T22:40:52Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T21:17:05Z"), model.operations().get(0).endTime()); - } - - @Test - public void testSerialize() { - OperationStatusResult model = - new OperationStatusResult() - .withId("ofz") - .withName("qsemwabne") - .withStatus("shhszhedplvwiw") - .withPercentComplete(32.278084F) - .withStartTime(OffsetDateTime.parse("2021-05-24T21:25:26Z")) - .withEndTime(OffsetDateTime.parse("2021-08-31T20:47:41Z")) - .withOperations( - Arrays - .asList( - new OperationStatusResult() - .withId("nkww") - .withName("pjflcxogao") - .withStatus("onz") - .withPercentComplete(92.21938F) - .withStartTime(OffsetDateTime.parse("2021-10-10T22:40:52Z")) - .withEndTime(OffsetDateTime.parse("2021-11-27T21:17:05Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("qqkdltfzxmhhvhgu") - .withName("odkwobd") - .withStatus("gxtibqdxbxw") - .withPercentComplete(82.218605F) - .withStartTime(OffsetDateTime.parse("2021-01-16T00:33:56Z")) - .withEndTime(OffsetDateTime.parse("2021-11-13T02:15:02Z")) - .withOperations(Arrays.asList()), - new OperationStatusResult() - .withId("zgx") - .withName("ripl") - .withStatus("podxunkb") - .withPercentComplete(75.54857F) - .withStartTime(OffsetDateTime.parse("2021-07-12T07:57:48Z")) - .withEndTime(OffsetDateTime.parse("2021-11-09T08:18:47Z")) - .withOperations(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(OperationStatusResult.class); - Assertions.assertEquals("ofz", model.id()); - Assertions.assertEquals("qsemwabne", model.name()); - Assertions.assertEquals("shhszhedplvwiw", model.status()); - Assertions.assertEquals(32.278084F, model.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-24T21:25:26Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T20:47:41Z"), model.endTime()); - Assertions.assertEquals("nkww", model.operations().get(0).id()); - Assertions.assertEquals("pjflcxogao", model.operations().get(0).name()); - Assertions.assertEquals("onz", model.operations().get(0).status()); - Assertions.assertEquals(92.21938F, model.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-10T22:40:52Z"), model.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-27T21:17:05Z"), model.operations().get(0).endTime()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetWithResponseMockTests.java deleted file mode 100644 index 5f5c7e9f9becb..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationStatusesGetWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.OperationStatus; -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 OperationStatusesGetWithResponseMockTests { - @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 = - "{\"resourceId\":\"ld\",\"properties\":\"datazuxylfsbtkadpyso\",\"id\":\"btgkbugrjqctoj\",\"name\":\"isofieypefojyqd\",\"status\":\"cuplcplcwkhih\",\"percentComplete\":54.289127,\"startTime\":\"2021-05-07T17:19:51Z\",\"endTime\":\"2020-12-21T12:31:23Z\",\"operations\":[{\"id\":\"bsrgnowc\",\"name\":\"fgmvecactxmwo\",\"status\":\"e\",\"percentComplete\":80.40437,\"startTime\":\"2021-04-20T13:37:10Z\",\"endTime\":\"2021-10-08T20:51:02Z\",\"operations\":[]},{\"id\":\"qvgqouw\",\"name\":\"zmpjwyiv\",\"status\":\"ikf\",\"percentComplete\":70.753624,\"startTime\":\"2021-06-21T15:40:21Z\",\"endTime\":\"2021-01-26T06:41:29Z\",\"operations\":[]},{\"id\":\"grttikteusqczk\",\"name\":\"klxubyja\",\"status\":\"fmmfblcqcu\",\"percentComplete\":81.51068,\"startTime\":\"2021-09-13T14:51:42Z\",\"endTime\":\"2021-03-05T16:25:57Z\",\"operations\":[]},{\"id\":\"etttwgdslqxihhr\",\"name\":\"oi\",\"status\":\"qseypxiutcxa\",\"percentComplete\":81.69838,\"startTime\":\"2021-04-18T15:14:52Z\",\"endTime\":\"2021-01-14T16:11:25Z\",\"operations\":[]}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationStatus response = - manager.operationStatuses().getWithResponse("giagtcojo", "qwogfnzjvus", Context.NONE).getValue(); - - Assertions.assertEquals("btgkbugrjqctoj", response.id()); - Assertions.assertEquals("isofieypefojyqd", response.name()); - Assertions.assertEquals("cuplcplcwkhih", response.status()); - Assertions.assertEquals(54.289127F, response.percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-07T17:19:51Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-21T12:31:23Z"), response.endTime()); - Assertions.assertEquals("bsrgnowc", response.operations().get(0).id()); - Assertions.assertEquals("fgmvecactxmwo", response.operations().get(0).name()); - Assertions.assertEquals("e", response.operations().get(0).status()); - Assertions.assertEquals(80.40437F, response.operations().get(0).percentComplete()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-20T13:37:10Z"), response.operations().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-08T20:51:02Z"), response.operations().get(0).endTime()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationsListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationsListMockTests.java deleted file mode 100644 index 0e0fbbbfa39b1..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/OperationsListMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Operation; -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 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\":\"tg\",\"isDataAction\":true,\"display\":{\"provider\":\"yqxtjjfzql\",\"resource\":\"ycavodggxdbees\",\"operation\":\"eknlra\",\"description\":\"aawiuagydwqfb\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolInnerTests.java deleted file mode 100644 index 097bba38f9469..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.PoolInner; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PoolInnerTests { - @Test - public void testDeserialize() { - PoolInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Creating\",\"devBoxDefinitionName\":\"sorgj\",\"networkConnectionName\":\"bldtlww\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\"},\"location\":\"ncvokotllxdyhg\",\"tags\":{\"hadoocrk\":\"cogjltdtbn\",\"amqgxqquezikyw\":\"cikhnv\"},\"id\":\"gxk\",\"name\":\"lla\",\"type\":\"melwuipiccjz\"}") - .toObject(PoolInner.class); - Assertions.assertEquals("ncvokotllxdyhg", model.location()); - Assertions.assertEquals("cogjltdtbn", model.tags().get("hadoocrk")); - Assertions.assertEquals("sorgj", model.devBoxDefinitionName()); - Assertions.assertEquals("bldtlww", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } - - @Test - public void testSerialize() { - PoolInner model = - new PoolInner() - .withLocation("ncvokotllxdyhg") - .withTags(mapOf("hadoocrk", "cogjltdtbn", "amqgxqquezikyw", "cikhnv")) - .withDevBoxDefinitionName("sorgj") - .withNetworkConnectionName("bldtlww") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(PoolInner.class); - Assertions.assertEquals("ncvokotllxdyhg", model.location()); - Assertions.assertEquals("cogjltdtbn", model.tags().get("hadoocrk")); - Assertions.assertEquals("sorgj", model.devBoxDefinitionName()); - Assertions.assertEquals("bldtlww", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolListResultTests.java deleted file mode 100644 index 71cc051007964..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.PoolListResult; -import org.junit.jupiter.api.Test; - -public final class PoolListResultTests { - @Test - public void testDeserialize() { - PoolListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"devBoxDefinitionName\":\"i\",\"networkConnectionName\":\"byuqerpqlp\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Enabled\"},\"location\":\"qgbdbuta\",\"tags\":{\"hykojoxafnndlpic\":\"btkuwhh\",\"h\":\"koymkcd\",\"reqnovvqfov\":\"pkkpw\"},\"id\":\"jxywsuws\",\"name\":\"rsndsytgadgvra\",\"type\":\"aeneqnzarrwl\"},{\"properties\":{\"provisioningState\":\"TransientFailure\",\"devBoxDefinitionName\":\"fqka\",\"networkConnectionName\":\"wiipfpub\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\"},\"location\":\"f\",\"tags\":{\"n\":\"qkvpuvksgplsakn\",\"iyntorzihle\":\"synljphuopxodl\",\"yzrpzbchckqqzq\":\"sjswsrms\",\"ysuiizynkedya\":\"ox\"},\"id\":\"rwyhqmibzyhwitsm\",\"name\":\"pyy\",\"type\":\"pcdpumnz\"}],\"nextLink\":\"wznm\"}") - .toObject(PoolListResult.class); - } - - @Test - public void testSerialize() { - PoolListResult model = new PoolListResult(); - model = BinaryData.fromObject(model).toObject(PoolListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolPropertiesTests.java deleted file mode 100644 index 835cf3ee09d5d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolPropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.PoolProperties; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PoolPropertiesTests { - @Test - public void testDeserialize() { - PoolProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Deleting\",\"devBoxDefinitionName\":\"gvvcnayrhyr\",\"networkConnectionName\":\"xmueed\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\"}") - .toObject(PoolProperties.class); - Assertions.assertEquals("gvvcnayrhyr", model.devBoxDefinitionName()); - Assertions.assertEquals("xmueed", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } - - @Test - public void testSerialize() { - PoolProperties model = - new PoolProperties() - .withDevBoxDefinitionName("gvvcnayrhyr") - .withNetworkConnectionName("xmueed") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(PoolProperties.class); - Assertions.assertEquals("gvvcnayrhyr", model.devBoxDefinitionName()); - Assertions.assertEquals("xmueed", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdatePropertiesTests.java deleted file mode 100644 index 47278814806c6..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdatePropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.PoolUpdateProperties; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PoolUpdatePropertiesTests { - @Test - public void testDeserialize() { - PoolUpdateProperties model = - BinaryData - .fromString( - "{\"devBoxDefinitionName\":\"tkwqqtchealm\",\"networkConnectionName\":\"tdaaygdvwvg\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\"}") - .toObject(PoolUpdateProperties.class); - Assertions.assertEquals("tkwqqtchealm", model.devBoxDefinitionName()); - Assertions.assertEquals("tdaaygdvwvg", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } - - @Test - public void testSerialize() { - PoolUpdateProperties model = - new PoolUpdateProperties() - .withDevBoxDefinitionName("tkwqqtchealm") - .withNetworkConnectionName("tdaaygdvwvg") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(PoolUpdateProperties.class); - Assertions.assertEquals("tkwqqtchealm", model.devBoxDefinitionName()); - Assertions.assertEquals("tdaaygdvwvg", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdateTests.java deleted file mode 100644 index 110204037d6d6..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolUpdateTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.PoolUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PoolUpdateTests { - @Test - public void testDeserialize() { - PoolUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"devBoxDefinitionName\":\"rtfudxepxg\",\"networkConnectionName\":\"agvrvmnpkuk\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\"},\"tags\":{\"njhf\":\"xgwim\",\"szkkfoqre\":\"xw\",\"wneaiv\":\"fkzikfj\"},\"location\":\"czelpcirel\"}") - .toObject(PoolUpdate.class); - Assertions.assertEquals("xgwim", model.tags().get("njhf")); - Assertions.assertEquals("czelpcirel", model.location()); - Assertions.assertEquals("rtfudxepxg", model.devBoxDefinitionName()); - Assertions.assertEquals("agvrvmnpkuk", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } - - @Test - public void testSerialize() { - PoolUpdate model = - new PoolUpdate() - .withTags(mapOf("njhf", "xgwim", "szkkfoqre", "xw", "wneaiv", "fkzikfj")) - .withLocation("czelpcirel") - .withDevBoxDefinitionName("rtfudxepxg") - .withNetworkConnectionName("agvrvmnpkuk") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(PoolUpdate.class); - Assertions.assertEquals("xgwim", model.tags().get("njhf")); - Assertions.assertEquals("czelpcirel", model.location()); - Assertions.assertEquals("rtfudxepxg", model.devBoxDefinitionName()); - Assertions.assertEquals("agvrvmnpkuk", model.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, model.licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, model.localAdministrator()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 5dd2ba508dda3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsCreateOrUpdateMockTests.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.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.Pool; -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 PoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"devBoxDefinitionName\":\"bbjjidjksyxk\",\"networkConnectionName\":\"vxevblb\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Enabled\"},\"location\":\"lageuaulxun\",\"tags\":{\"ppxynenls\":\"bn\",\"klnsrmffey\":\"xeizzg\"},\"id\":\"xcktpiymerteeamm\",\"name\":\"qiekkkzddrt\",\"type\":\"g\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = - manager - .pools() - .define("vmm") - .withRegion("zyqdrfegcealzx") - .withExistingProject("yefrpmpdnqqska", "ao") - .withTags( - mapOf( - "yqhlwigdivbkbx", - "ansym", - "wasqvdaeyyg", - "omfaj", - "zkgimsid", - "xakjsqzhzb", - "ddyvvjskgfmo", - "asi")) - .withDevBoxDefinitionName("rtql") - .withNetworkConnectionName("megni") - .withLicenseType(LicenseType.WINDOWS_CLIENT) - .withLocalAdministrator(LocalAdminStatus.DISABLED) - .create(); - - Assertions.assertEquals("lageuaulxun", response.location()); - Assertions.assertEquals("bn", response.tags().get("ppxynenls")); - Assertions.assertEquals("bbjjidjksyxk", response.devBoxDefinitionName()); - Assertions.assertEquals("vxevblb", response.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, response.licenseType()); - Assertions.assertEquals(LocalAdminStatus.ENABLED, response.localAdministrator()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteMockTests.java deleted file mode 100644 index 66e9f76826c86..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 PoolsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.pools().delete("vtsoxf", "kenx", "m", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsGetWithResponseMockTests.java deleted file mode 100644 index 0ddc4ba907649..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsGetWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.Pool; -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 PoolsGetWithResponseMockTests { - @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\":{\"provisioningState\":\"TransientFailure\",\"devBoxDefinitionName\":\"ihsasb\",\"networkConnectionName\":\"dyp\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Enabled\"},\"location\":\"slynsqyrpfoo\",\"tags\":{\"qdnfwqzdz\":\"ttymsjny\",\"fhqlyvi\":\"tilaxh\"},\"id\":\"ouwivkxoyzunbixx\",\"name\":\"ti\",\"type\":\"vcpwpgclrc\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = manager.pools().getWithResponse("hhzjhfj", "hvvmuvgpmun", "qsxvmhf", Context.NONE).getValue(); - - Assertions.assertEquals("slynsqyrpfoo", response.location()); - Assertions.assertEquals("ttymsjny", response.tags().get("qdnfwqzdz")); - Assertions.assertEquals("ihsasb", response.devBoxDefinitionName()); - Assertions.assertEquals("dyp", response.networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, response.licenseType()); - Assertions.assertEquals(LocalAdminStatus.ENABLED, response.localAdministrator()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectMockTests.java deleted file mode 100644 index ec715c76ac3fc..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/PoolsListByProjectMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.LicenseType; -import com.azure.resourcemanager.devcenter.models.LocalAdminStatus; -import com.azure.resourcemanager.devcenter.models.Pool; -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 PoolsListByProjectMockTests { - @Test - public void testListByProject() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"devBoxDefinitionName\":\"iwrxgkn\",\"networkConnectionName\":\"vyi\",\"licenseType\":\"Windows_Client\",\"localAdministrator\":\"Disabled\"},\"location\":\"vpgshoxgsgbp\",\"tags\":{\"gaqvlgafcqusrd\":\"djtxvzflbq\",\"duy\":\"etnwsdtutnw\",\"ewipm\":\"vuzhyr\"},\"id\":\"ekdxuku\",\"name\":\"gsjj\",\"type\":\"undxgketw\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.pools().listByProject("azkmtgguwp", "jrajcivm", 1977689221, Context.NONE); - - Assertions.assertEquals("vpgshoxgsgbp", response.iterator().next().location()); - Assertions.assertEquals("djtxvzflbq", response.iterator().next().tags().get("gaqvlgafcqusrd")); - Assertions.assertEquals("iwrxgkn", response.iterator().next().devBoxDefinitionName()); - Assertions.assertEquals("vyi", response.iterator().next().networkConnectionName()); - Assertions.assertEquals(LicenseType.WINDOWS_CLIENT, response.iterator().next().licenseType()); - Assertions.assertEquals(LocalAdminStatus.DISABLED, response.iterator().next().localAdministrator()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetWithResponseMockTests.java deleted file mode 100644 index 1bb3bb7175d16..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesGetWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AllowedEnvironmentType; -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 ProjectAllowedEnvironmentTypesGetWithResponseMockTests { - @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\":{\"provisioningState\":\"Created\"},\"id\":\"wqjnob\",\"name\":\"iyhddvi\",\"type\":\"cegfnmntfp\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AllowedEnvironmentType response = - manager - .projectAllowedEnvironmentTypes() - .getWithResponse("dzpxgwjpl", "agst", "yohpfkyrkdbdgiog", Context.NONE) - .getValue(); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListMockTests.java deleted file mode 100644 index 07f2ffce201bb..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectAllowedEnvironmentTypesListMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.AllowedEnvironmentType; -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 ProjectAllowedEnvironmentTypesListMockTests { - @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\":{\"provisioningState\":\"Succeeded\"},\"id\":\"uewbc\",\"name\":\"hxuuwhcjyxccybvp\",\"type\":\"yakk\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.projectAllowedEnvironmentTypes().list("ordilmywwtkgkxny", "dabg", 1233839644, Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeInnerTests.java deleted file mode 100644 index cbc0a15ea9879..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectEnvironmentTypeInner; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectEnvironmentTypeInnerTests { - @Test - public void testDeserialize() { - ProjectEnvironmentTypeInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentTargetId\":\"ik\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{\"n\":{\"roles\":{}}}},\"tags\":{\"rbu\":\"nhijggmebfsi\",\"ttdbhrbnl\":\"rcvpnazzmhjrunmp\",\"xywnytnrsynlqidy\":\"nkxmyskpbhenbtk\"},\"identity\":{\"principalId\":\"b2520f43-57cf-4906-b29a-f283736577bf\",\"tenantId\":\"38ea1650-6a58-4ce5-8ee9-b51719436067\",\"type\":\"None\",\"userAssignedIdentities\":{\"aaxdbabphlwrq\":{\"principalId\":\"47cc0cd3-beef-4197-a00f-6669ac2eee2e\",\"clientId\":\"ff176180-66d5-431e-ae4d-ca8f2bfcf870\"}}},\"location\":\"ktsthsucocmny\",\"id\":\"zt\",\"name\":\"bt\",\"type\":\"wrqpue\"}") - .toObject(ProjectEnvironmentTypeInner.class); - Assertions.assertEquals("nhijggmebfsi", model.tags().get("rbu")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ktsthsucocmny", model.location()); - Assertions.assertEquals("ik", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.ENABLED, model.status()); - } - - @Test - public void testSerialize() { - ProjectEnvironmentTypeInner model = - new ProjectEnvironmentTypeInner() - .withTags( - mapOf( - "rbu", "nhijggmebfsi", "ttdbhrbnl", "rcvpnazzmhjrunmp", "xywnytnrsynlqidy", "nkxmyskpbhenbtk")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("aaxdbabphlwrq", new UserAssignedIdentity()))) - .withLocation("ktsthsucocmny") - .withDeploymentTargetId("ik") - .withStatus(EnableStatus.ENABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment().withRoles(mapOf())) - .withUserRoleAssignments(mapOf("n", new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeInner.class); - Assertions.assertEquals("nhijggmebfsi", model.tags().get("rbu")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("ktsthsucocmny", model.location()); - Assertions.assertEquals("ik", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.ENABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeListResultTests.java deleted file mode 100644 index 85321484936b0..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeListResult; -import org.junit.jupiter.api.Test; - -public final class ProjectEnvironmentTypeListResultTests { - @Test - public void testDeserialize() { - ProjectEnvironmentTypeListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"RolloutInProgress\",\"deploymentTargetId\":\"ewrmjmwvvjektc\",\"status\":\"Enabled\",\"userRoleAssignments\":{}},\"tags\":{\"ylihkaetckt\":\"rsffrzpwvlqdqgbi\"},\"identity\":{\"principalId\":\"c5356d2b-50a9-4bce-aa69-bd5136611e36\",\"tenantId\":\"81fe2a9f-4a52-4893-a099-bf77790a6267\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"nkymuctqhjfbebrj\",\"id\":\"erfuwuttt\",\"name\":\"fvjrbirphxepcy\",\"type\":\"ahfn\"},{\"properties\":{\"provisioningState\":\"Accepted\",\"deploymentTargetId\":\"xjvuujqgidokg\",\"status\":\"Disabled\",\"userRoleAssignments\":{}},\"tags\":{\"jeszzhbijhtxfv\":\"vcltbgsncgh\"},\"identity\":{\"principalId\":\"617ea177-add2-4ead-8c99-52f164d43527\",\"tenantId\":\"06f279f7-934a-45bb-b1b8-228e412f0dd6\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"nehmpvecx\",\"id\":\"debfqkkrbmpukgri\",\"name\":\"flz\",\"type\":\"fbxzpuzycisp\"}],\"nextLink\":\"zahmgkbrpyydhibn\"}") - .toObject(ProjectEnvironmentTypeListResult.class); - } - - @Test - public void testSerialize() { - ProjectEnvironmentTypeListResult model = new ProjectEnvironmentTypeListResult(); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypePropertiesTests.java deleted file mode 100644 index cd8a53c41b043..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypePropertiesTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectEnvironmentTypeProperties; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectEnvironmentTypePropertiesTests { - @Test - public void testDeserialize() { - ProjectEnvironmentTypeProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Deleting\",\"deploymentTargetId\":\"ywbiexzfeyueax\",\"status\":\"Disabled\",\"creatorRoleAssignment\":{\"roles\":{\"kzjancuxrhdwbav\":{\"roleName\":\"hqwa\",\"description\":\"uzyoxaep\"},\"bpg\":{\"roleName\":\"niwdjsw\",\"description\":\"s\"}}},\"userRoleAssignments\":{\"hpzxbzpfzab\":{\"roles\":{}},\"uhxwtctyqiklbbov\":{\"roles\":{}}}}") - .toObject(ProjectEnvironmentTypeProperties.class); - Assertions.assertEquals("ywbiexzfeyueax", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.DISABLED, model.status()); - } - - @Test - public void testSerialize() { - ProjectEnvironmentTypeProperties model = - new ProjectEnvironmentTypeProperties() - .withDeploymentTargetId("ywbiexzfeyueax") - .withStatus(EnableStatus.DISABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() - .withRoles(mapOf("kzjancuxrhdwbav", new EnvironmentRole(), "bpg", new EnvironmentRole()))) - .withUserRoleAssignments( - mapOf( - "hpzxbzpfzab", - new UserRoleAssignmentValue().withRoles(mapOf()), - "uhxwtctyqiklbbov", - new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeProperties.class); - Assertions.assertEquals("ywbiexzfeyueax", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.DISABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests.java deleted file mode 100644 index 2e5f4416e86f2..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Test; - -public final class ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignmentTests { - @Test - public void testDeserialize() { - ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment model = - BinaryData - .fromString( - "{\"roles\":{\"notyfjfcnjbkcn\":{\"roleName\":\"vlxotogtwrupqsx\",\"description\":\"micykvceoveilo\"},\"phoxus\":{\"roleName\":\"hbttkphyw\",\"description\":\"vjtoqnermclfp\"},\"wfqkquj\":{\"roleName\":\"pabgyeps\",\"description\":\"tazqugxywpmueefj\"},\"yudxytlmoy\":{\"roleName\":\"suyonobglaocq\",\"description\":\"ccm\"}}}") - .toObject(ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.class); - } - - @Test - public void testSerialize() { - ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment model = - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() - .withRoles( - mapOf( - "notyfjfcnjbkcn", - new EnvironmentRole(), - "phoxus", - new EnvironmentRole(), - "wfqkquj", - new EnvironmentRole(), - "yudxytlmoy", - new EnvironmentRole())); - model = - BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment.class); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesTests.java deleted file mode 100644 index d4c0ca944654e..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdatePropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectEnvironmentTypeUpdateProperties; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectEnvironmentTypeUpdatePropertiesTests { - @Test - public void testDeserialize() { - ProjectEnvironmentTypeUpdateProperties model = - BinaryData - .fromString( - "{\"deploymentTargetId\":\"wzbhvgyugu\",\"status\":\"Disabled\",\"creatorRoleAssignment\":{\"roles\":{\"mg\":{\"roleName\":\"sxqu\",\"description\":\"fpl\"},\"wzbaiue\":{\"roleName\":\"nkjzkdeslpvlop\",\"description\":\"yighxpk\"},\"smtxpsieb\":{\"roleName\":\"a\",\"description\":\"nyqupedeojnabck\"}}},\"userRoleAssignments\":{\"esap\":{\"roles\":{}},\"dqmh\":{\"roles\":{}},\"htldwk\":{\"roles\":{}},\"uutkncw\":{\"roles\":{}}}}") - .toObject(ProjectEnvironmentTypeUpdateProperties.class); - Assertions.assertEquals("wzbhvgyugu", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.DISABLED, model.status()); - } - - @Test - public void testSerialize() { - ProjectEnvironmentTypeUpdateProperties model = - new ProjectEnvironmentTypeUpdateProperties() - .withDeploymentTargetId("wzbhvgyugu") - .withStatus(EnableStatus.DISABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment() - .withRoles( - mapOf( - "mg", - new EnvironmentRole(), - "wzbaiue", - new EnvironmentRole(), - "smtxpsieb", - new EnvironmentRole()))) - .withUserRoleAssignments( - mapOf( - "esap", - new UserRoleAssignmentValue().withRoles(mapOf()), - "dqmh", - new UserRoleAssignmentValue().withRoles(mapOf()), - "htldwk", - new UserRoleAssignmentValue().withRoles(mapOf()), - "uutkncw", - new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeUpdateProperties.class); - Assertions.assertEquals("wzbhvgyugu", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.DISABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdateTests.java deleted file mode 100644 index 8d55e003eeea2..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypeUpdateTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdate; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectEnvironmentTypeUpdateTests { - @Test - public void testDeserialize() { - ProjectEnvironmentTypeUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"deploymentTargetId\":\"vljua\",\"status\":\"Disabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{\"duala\":{\"roles\":{}},\"qpv\":{\"roles\":{}}}},\"tags\":{\"zlfmisgwbnbbeld\":\"mwsrcrgvxpvgo\",\"ali\":\"wkz\",\"hashsfwxosow\":\"urqhaka\",\"cjooxdjebwpucwwf\":\"xcug\"},\"identity\":{\"principalId\":\"6742d2e9-e100-46cf-a94b-c0f3df8495a8\",\"tenantId\":\"03252bf8-6bd4-4afc-815f-bcf2a7b948f2\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"civyhzceuo\":{\"principalId\":\"6daccd11-405d-4191-91c1-8afc0daefdf7\",\"clientId\":\"8c083203-ae8b-4d69-ad81-0c90465fc213\"},\"rw\":{\"principalId\":\"9909f97f-0739-47de-9c2d-421123b4dbba\",\"clientId\":\"21dba054-952a-4a4a-bc9d-db9471c8987f\"},\"iotwmcdytdxwit\":{\"principalId\":\"0cdb1901-ace9-4f71-97c4-5175c549cb7d\",\"clientId\":\"6cd3aac3-1b3c-4ed2-8c8b-4249a4b54c80\"},\"jawgqwg\":{\"principalId\":\"91e2baca-39cf-4691-9a85-a3ff81761540\",\"clientId\":\"457385ab-df81-439e-b88a-b897eef886b5\"}}}}") - .toObject(ProjectEnvironmentTypeUpdate.class); - Assertions.assertEquals("mwsrcrgvxpvgo", model.tags().get("zlfmisgwbnbbeld")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("vljua", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.DISABLED, model.status()); - } - - @Test - public void testSerialize() { - ProjectEnvironmentTypeUpdate model = - new ProjectEnvironmentTypeUpdate() - .withTags( - mapOf( - "zlfmisgwbnbbeld", - "mwsrcrgvxpvgo", - "ali", - "wkz", - "hashsfwxosow", - "urqhaka", - "cjooxdjebwpucwwf", - "xcug")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "civyhzceuo", - new UserAssignedIdentity(), - "rw", - new UserAssignedIdentity(), - "iotwmcdytdxwit", - new UserAssignedIdentity(), - "jawgqwg", - new UserAssignedIdentity()))) - .withDeploymentTargetId("vljua") - .withStatus(EnableStatus.DISABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment().withRoles(mapOf())) - .withUserRoleAssignments( - mapOf( - "duala", - new UserRoleAssignmentValue().withRoles(mapOf()), - "qpv", - new UserRoleAssignmentValue().withRoles(mapOf()))); - model = BinaryData.fromObject(model).toObject(ProjectEnvironmentTypeUpdate.class); - Assertions.assertEquals("mwsrcrgvxpvgo", model.tags().get("zlfmisgwbnbbeld")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("vljua", model.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.DISABLED, model.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index d98c62260c164..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests.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.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentity; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment; -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 ProjectEnvironmentTypesCreateOrUpdateWithResponseMockTests { - @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\":{\"provisioningState\":\"Deleting\",\"deploymentTargetId\":\"mldgxobfirc\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{}},\"tags\":{\"vkjlmxhom\":\"riykhyawfvjlbox\",\"nraauzz\":\"ynhdwdigum\"},\"identity\":{\"principalId\":\"12bbcb71-96ee-45df-bad7-7572f65a2e5d\",\"tenantId\":\"73eb696d-db2f-406a-b322-b7086208aa95\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"zhezwwvaiq\",\"id\":\"vv\",\"name\":\"onkp\",\"type\":\"hqyikvy\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProjectEnvironmentType response = - manager - .projectEnvironmentTypes() - .define("rqzz") - .withExistingProject("levufuztcktyhj", "qedcgzulwm") - .withRegion("dmovzvfva") - .withTags(mapOf("oepry", "ev")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withDeploymentTargetId("gl") - .withStatus(EnableStatus.ENABLED) - .withCreatorRoleAssignment( - new ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment().withRoles(mapOf())) - .withUserRoleAssignments(mapOf()) - .create(); - - Assertions.assertEquals("riykhyawfvjlbox", response.tags().get("vkjlmxhom")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("zhezwwvaiq", response.location()); - Assertions.assertEquals("mldgxobfirc", response.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.ENABLED, response.status()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteWithResponseMockTests.java deleted file mode 100644 index 226328bf296b7..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesDeleteWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 ProjectEnvironmentTypesDeleteWithResponseMockTests { - @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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.projectEnvironmentTypes().deleteWithResponse("ril", "zapeewchpx", "ktwkuziyc", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetWithResponseMockTests.java deleted file mode 100644 index 50319f3ad4984..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesGetWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; -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 ProjectEnvironmentTypesGetWithResponseMockTests { - @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\":{\"provisioningState\":\"TransientFailure\",\"deploymentTargetId\":\"ivsiy\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{}},\"tags\":{\"pgogtqxepny\":\"onbzoggculapzwy\",\"uajlyj\":\"b\",\"uxrkjp\":\"lvofqzhvfcibyfmo\",\"wiivwzjbhyzsx\":\"dwxf\"},\"identity\":{\"principalId\":\"8cec7fc8-c140-4e15-9062-d24414a21a1d\",\"tenantId\":\"51c2ecdb-dea7-4b44-9e3e-dbd54ff928a3\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"negvmnvuqe\",\"id\":\"lds\",\"name\":\"astjbkkdmflvestm\",\"type\":\"lx\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ProjectEnvironmentType response = - manager.projectEnvironmentTypes().getWithResponse("ewda", "mdjvlpj", "xkzb", Context.NONE).getValue(); - - Assertions.assertEquals("onbzoggculapzwy", response.tags().get("pgogtqxepny")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("negvmnvuqe", response.location()); - Assertions.assertEquals("ivsiy", response.deploymentTargetId()); - Assertions.assertEquals(EnableStatus.ENABLED, response.status()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListMockTests.java deleted file mode 100644 index 3f3b0c8ef057f..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectEnvironmentTypesListMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.devcenter.models.ProjectEnvironmentType; -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 ProjectEnvironmentTypesListMockTests { - @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\":{\"provisioningState\":\"Deleted\",\"deploymentTargetId\":\"xlllchp\",\"status\":\"Enabled\",\"creatorRoleAssignment\":{\"roles\":{}},\"userRoleAssignments\":{}},\"tags\":{\"kuvsjcswsm\":\"nhf\",\"qypfcv\":\"stul\"},\"identity\":{\"principalId\":\"769be413-232d-487b-b026-dac02234e915\",\"tenantId\":\"2dec49eb-458b-4c35-9550-4e3b074bb332\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"mfpjbabw\",\"id\":\"fcxsspuunnoxy\",\"name\":\"kxgqddrih\",\"type\":\"fhoqca\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.projectEnvironmentTypes().list("vm", "mfnczd", 1426712657, Context.NONE); - - Assertions.assertEquals("nhf", response.iterator().next().tags().get("kuvsjcswsm")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("mfpjbabw", response.iterator().next().location()); - Assertions.assertEquals("xlllchp", response.iterator().next().deploymentTargetId()); - Assertions.assertEquals(EnableStatus.ENABLED, response.iterator().next().status()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectInnerTests.java deleted file mode 100644 index b7aeab620ac87..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectInnerTests { - @Test - public void testDeserialize() { - ProjectInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"devCenterUri\":\"qkgfgibma\",\"devCenterId\":\"akeqs\",\"description\":\"yb\"},\"location\":\"qedqytbciqfoufl\",\"tags\":{\"lougpbkw\":\"kzsmodm\",\"wgcu\":\"mutduqktaps\",\"hbmdgbbjfdd\":\"rtumkdosvq\"},\"id\":\"mbmbexppbh\",\"name\":\"q\",\"type\":\"rolfpfp\"}") - .toObject(ProjectInner.class); - Assertions.assertEquals("qedqytbciqfoufl", model.location()); - Assertions.assertEquals("kzsmodm", model.tags().get("lougpbkw")); - Assertions.assertEquals("akeqs", model.devCenterId()); - Assertions.assertEquals("yb", model.description()); - } - - @Test - public void testSerialize() { - ProjectInner model = - new ProjectInner() - .withLocation("qedqytbciqfoufl") - .withTags(mapOf("lougpbkw", "kzsmodm", "wgcu", "mutduqktaps", "hbmdgbbjfdd", "rtumkdosvq")) - .withDevCenterId("akeqs") - .withDescription("yb"); - model = BinaryData.fromObject(model).toObject(ProjectInner.class); - Assertions.assertEquals("qedqytbciqfoufl", model.location()); - Assertions.assertEquals("kzsmodm", model.tags().get("lougpbkw")); - Assertions.assertEquals("akeqs", model.devCenterId()); - Assertions.assertEquals("yb", model.description()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectListResultTests.java deleted file mode 100644 index f969f8d460f96..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ProjectListResult; -import org.junit.jupiter.api.Test; - -public final class ProjectListResultTests { - @Test - public void testDeserialize() { - ProjectListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"StorageProvisioningFailed\",\"devCenterUri\":\"rgqjbpfzfsinzg\",\"devCenterId\":\"cjrwzoxxjtfellu\",\"description\":\"zitonpeqfpjkjl\"},\"location\":\"fpdvhpfxxypi\",\"tags\":{\"inuvamiheogn\":\"mayhuybbkpodepoo\",\"usivye\":\"rxzxtheo\",\"nfygxgispemvtz\":\"cciqihnhungbwjz\"},\"id\":\"kufubljo\",\"name\":\"xqeofjaeqjhqjba\",\"type\":\"v\"},{\"properties\":{\"provisioningState\":\"Creating\",\"devCenterUri\":\"ulngsntn\",\"devCenterId\":\"bkzgcwrwclx\",\"description\":\"rljdouskcqv\"},\"location\":\"cr\",\"tags\":{\"hxbnjbiksqrg\":\"kwt\"},\"id\":\"ssainqpjwnzll\",\"name\":\"fmppe\",\"type\":\"bvmgxsabkyqduuji\"},{\"properties\":{\"provisioningState\":\"Updating\",\"devCenterUri\":\"dzevndhkrw\",\"devCenterId\":\"appd\",\"description\":\"dkvwrwjfe\"},\"location\":\"nhutjeltmrldhugj\",\"tags\":{\"dgeablgphu\":\"atqxho\",\"xhurok\":\"icndvkaozwyifty\",\"kjfkg\":\"tyxolniwpwc\",\"plwckbas\":\"awxklr\"},\"id\":\"ypnddhsgcb\",\"name\":\"cph\",\"type\":\"jkot\"}],\"nextLink\":\"qgoulznd\"}") - .toObject(ProjectListResult.class); - } - - @Test - public void testSerialize() { - ProjectListResult model = new ProjectListResult(); - model = BinaryData.fromObject(model).toObject(ProjectListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectPropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectPropertiesTests.java deleted file mode 100644 index ef4624cb73cf8..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectPropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectPropertiesTests { - @Test - public void testDeserialize() { - ProjectProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Deleting\",\"devCenterUri\":\"bquxigjy\",\"devCenterId\":\"zjaoyfhrtxil\",\"description\":\"rkujy\"}") - .toObject(ProjectProperties.class); - Assertions.assertEquals("zjaoyfhrtxil", model.devCenterId()); - Assertions.assertEquals("rkujy", model.description()); - } - - @Test - public void testSerialize() { - ProjectProperties model = new ProjectProperties().withDevCenterId("zjaoyfhrtxil").withDescription("rkujy"); - model = BinaryData.fromObject(model).toObject(ProjectProperties.class); - Assertions.assertEquals("zjaoyfhrtxil", model.devCenterId()); - Assertions.assertEquals("rkujy", model.description()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdatePropertiesTests.java deleted file mode 100644 index deadd2ec08b0b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdatePropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ProjectUpdateProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectUpdatePropertiesTests { - @Test - public void testDeserialize() { - ProjectUpdateProperties model = - BinaryData - .fromString("{\"devCenterId\":\"l\",\"description\":\"uvfqawrlyxwj\"}") - .toObject(ProjectUpdateProperties.class); - Assertions.assertEquals("l", model.devCenterId()); - Assertions.assertEquals("uvfqawrlyxwj", model.description()); - } - - @Test - public void testSerialize() { - ProjectUpdateProperties model = - new ProjectUpdateProperties().withDevCenterId("l").withDescription("uvfqawrlyxwj"); - model = BinaryData.fromObject(model).toObject(ProjectUpdateProperties.class); - Assertions.assertEquals("l", model.devCenterId()); - Assertions.assertEquals("uvfqawrlyxwj", model.description()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdateTests.java deleted file mode 100644 index 61abbf39ae7f3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectUpdateTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ProjectUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ProjectUpdateTests { - @Test - public void testDeserialize() { - ProjectUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"devCenterId\":\"rbnwbxgjvtbvpy\",\"description\":\"zdn\"},\"tags\":{\"qfprwzwbn\":\"qguhmuo\"},\"location\":\"itnwuizgazxufi\"}") - .toObject(ProjectUpdate.class); - Assertions.assertEquals("qguhmuo", model.tags().get("qfprwzwbn")); - Assertions.assertEquals("itnwuizgazxufi", model.location()); - Assertions.assertEquals("rbnwbxgjvtbvpy", model.devCenterId()); - Assertions.assertEquals("zdn", model.description()); - } - - @Test - public void testSerialize() { - ProjectUpdate model = - new ProjectUpdate() - .withTags(mapOf("qfprwzwbn", "qguhmuo")) - .withLocation("itnwuizgazxufi") - .withDevCenterId("rbnwbxgjvtbvpy") - .withDescription("zdn"); - model = BinaryData.fromObject(model).toObject(ProjectUpdate.class); - Assertions.assertEquals("qguhmuo", model.tags().get("qfprwzwbn")); - Assertions.assertEquals("itnwuizgazxufi", model.location()); - Assertions.assertEquals("rbnwbxgjvtbvpy", model.devCenterId()); - Assertions.assertEquals("zdn", model.description()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateMockTests.java deleted file mode 100644 index b69634f758414..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsCreateOrUpdateMockTests.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.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"devCenterUri\":\"w\",\"devCenterId\":\"kpnb\",\"description\":\"zejjoqk\"},\"location\":\"fhsxttaugz\",\"tags\":{\"pxdtnkdmkq\":\"aa\",\"ou\":\"jlwuenvrkp\",\"aays\":\"ibreb\",\"zlwfffiakp\":\"kixqtnqtt\"},\"id\":\"pqqmted\",\"name\":\"tmmjihyeozph\",\"type\":\"wau\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Project response = - manager - .projects() - .define("exdrrvqahqkg") - .withRegion("gjqppy") - .withExistingResourceGroup("dreaxh") - .withTags(mapOf("sxkm", "ronzmyhgfip", "hjglikk", "waekrrjreafxtsgu", "uzlm", "wslolbqp")) - .withDevCenterId("xzb") - .withDescription("oowvrv") - .create(); - - Assertions.assertEquals("fhsxttaugz", response.location()); - Assertions.assertEquals("aa", response.tags().get("pxdtnkdmkq")); - Assertions.assertEquals("kpnb", response.devCenterId()); - Assertions.assertEquals("zejjoqk", response.description()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteMockTests.java deleted file mode 100644 index e03efd24ff7a4..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 ProjectsDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.projects().delete("ijejvegrhbpn", "ixexcc", Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index f08ba68dbed4b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsGetByResourceGroupWithResponseMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Failed\",\"devCenterUri\":\"vjayvblmhvkzu\",\"devCenterId\":\"xvvy\",\"description\":\"s\"},\"location\":\"byrqufeg\",\"tags\":{\"bnhlmc\":\"wz\"},\"id\":\"l\",\"name\":\"dn\",\"type\":\"itvgbmhrixkwm\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Project response = - manager - .projects() - .getByResourceGroupWithResponse("nrvgoupmfiibfgg", "ioolvrwxkvtkkgll", Context.NONE) - .getValue(); - - Assertions.assertEquals("byrqufeg", response.location()); - Assertions.assertEquals("wz", response.tags().get("bnhlmc")); - Assertions.assertEquals("xvvy", response.devCenterId()); - Assertions.assertEquals("s", response.description()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupMockTests.java deleted file mode 100644 index 421e49ff2375d..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListByResourceGroupMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"devCenterUri\":\"yhko\",\"devCenterId\":\"pg\",\"description\":\"dkow\"},\"location\":\"bqpc\",\"tags\":{\"ftnkhtj\":\"bwccsnjvcdwxlpqe\",\"ngwfqatm\":\"y\"},\"id\":\"dhtmdvypgikd\",\"name\":\"szywkbirryu\",\"type\":\"hlhkjoqrvqqaatj\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.projects().listByResourceGroup("rypqlmfeo", 1181848977, Context.NONE); - - Assertions.assertEquals("bqpc", response.iterator().next().location()); - Assertions.assertEquals("bwccsnjvcdwxlpqe", response.iterator().next().tags().get("ftnkhtj")); - Assertions.assertEquals("pg", response.iterator().next().devCenterId()); - Assertions.assertEquals("dkow", response.iterator().next().description()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListMockTests.java deleted file mode 100644 index 3edbadcd82e30..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ProjectsListMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Project; -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 ProjectsListMockTests { - @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\":{\"provisioningState\":\"Creating\",\"devCenterUri\":\"z\",\"devCenterId\":\"gamv\",\"description\":\"ho\"},\"location\":\"qzudphq\",\"tags\":{\"nwcvtbvkayhmtnv\":\"dkfw\",\"zcjaesgvvsccy\":\"qiatkzwpcnp\",\"hwyg\":\"jguq\",\"semdwzrmu\":\"lvdnkfx\"},\"id\":\"apfcqdpsq\",\"name\":\"qvpsvuoymg\",\"type\":\"celve\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.projects().list(1001527531, Context.NONE); - - Assertions.assertEquals("qzudphq", response.iterator().next().location()); - Assertions.assertEquals("dkfw", response.iterator().next().tags().get("nwcvtbvkayhmtnv")); - Assertions.assertEquals("gamv", response.iterator().next().devCenterId()); - Assertions.assertEquals("ho", response.iterator().next().description()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/RecommendedMachineConfigurationTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/RecommendedMachineConfigurationTests.java deleted file mode 100644 index ef1e75e0d97cf..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/RecommendedMachineConfigurationTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.RecommendedMachineConfiguration; -import org.junit.jupiter.api.Test; - -public final class RecommendedMachineConfigurationTests { - @Test - public void testDeserialize() { - RecommendedMachineConfiguration model = - BinaryData - .fromString( - "{\"memory\":{\"min\":1063088657,\"max\":973371108},\"vCPUs\":{\"min\":1664958649,\"max\":38935170}}") - .toObject(RecommendedMachineConfiguration.class); - } - - @Test - public void testSerialize() { - RecommendedMachineConfiguration model = new RecommendedMachineConfiguration(); - model = BinaryData.fromObject(model).toObject(RecommendedMachineConfiguration.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ResourceRangeTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ResourceRangeTests.java deleted file mode 100644 index fc78418e4fd2e..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ResourceRangeTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ResourceRange; -import org.junit.jupiter.api.Test; - -public final class ResourceRangeTests { - @Test - public void testDeserialize() { - ResourceRange model = - BinaryData.fromString("{\"min\":703719662,\"max\":15253955}").toObject(ResourceRange.class); - } - - @Test - public void testSerialize() { - ResourceRange model = new ResourceRange(); - model = BinaryData.fromObject(model).toObject(ResourceRange.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleInnerTests.java deleted file mode 100644 index 7fcf4d9fd44c4..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleInnerTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ScheduleInner; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScheduleInnerTests { - @Test - public void testDeserialize() { - ScheduleInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Running\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"jhdgqggebdunyga\",\"timeZone\":\"idb\",\"state\":\"Enabled\"},\"id\":\"pxllrx\",\"name\":\"yjmoadsu\",\"type\":\"arm\"}") - .toObject(ScheduleInner.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jhdgqggebdunyga", model.time()); - Assertions.assertEquals("idb", model.timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, model.state()); - } - - @Test - public void testSerialize() { - ScheduleInner model = - new ScheduleInner() - .withTypePropertiesType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("jhdgqggebdunyga") - .withTimeZone("idb") - .withState(EnableStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ScheduleInner.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jhdgqggebdunyga", model.time()); - Assertions.assertEquals("idb", model.timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, model.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleListResultTests.java deleted file mode 100644 index c892adb2eb6a3..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.ScheduleListResult; -import org.junit.jupiter.api.Test; - -public final class ScheduleListResultTests { - @Test - public void testDeserialize() { - ScheduleListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"tkl\",\"timeZone\":\"xbjhwuaanozjosph\",\"state\":\"Enabled\"},\"id\":\"pjrvxagl\",\"name\":\"vimjwos\",\"type\":\"tx\"}],\"nextLink\":\"cskfcktqumiekk\"}") - .toObject(ScheduleListResult.class); - } - - @Test - public void testSerialize() { - ScheduleListResult model = new ScheduleListResult(); - model = BinaryData.fromObject(model).toObject(ScheduleListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulePropertiesTests.java deleted file mode 100644 index 01af4a49e8843..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulePropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ScheduleProperties; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SchedulePropertiesTests { - @Test - public void testDeserialize() { - ScheduleProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Updated\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"bjhhyx\",\"timeZone\":\"wlycoduhpkxkg\",\"state\":\"Enabled\"}") - .toObject(ScheduleProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("bjhhyx", model.time()); - Assertions.assertEquals("wlycoduhpkxkg", model.timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, model.state()); - } - - @Test - public void testSerialize() { - ScheduleProperties model = - new ScheduleProperties() - .withType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("bjhhyx") - .withTimeZone("wlycoduhpkxkg") - .withState(EnableStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ScheduleProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("bjhhyx", model.time()); - Assertions.assertEquals("wlycoduhpkxkg", model.timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, model.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdatePropertiesTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdatePropertiesTests.java deleted file mode 100644 index a76af2ec20c67..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdatePropertiesTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.ScheduleUpdateProperties; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScheduleUpdatePropertiesTests { - @Test - public void testDeserialize() { - ScheduleUpdateProperties model = - BinaryData - .fromString( - "{\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"jxqugjhky\",\"timeZone\":\"beddgssofw\",\"state\":\"Disabled\"}") - .toObject(ScheduleUpdateProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jxqugjhky", model.time()); - Assertions.assertEquals("beddgssofw", model.timeZone()); - Assertions.assertEquals(EnableStatus.DISABLED, model.state()); - } - - @Test - public void testSerialize() { - ScheduleUpdateProperties model = - new ScheduleUpdateProperties() - .withType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("jxqugjhky") - .withTimeZone("beddgssofw") - .withState(EnableStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(ScheduleUpdateProperties.class); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("jxqugjhky", model.time()); - Assertions.assertEquals("beddgssofw", model.timeZone()); - Assertions.assertEquals(EnableStatus.DISABLED, model.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdateTests.java deleted file mode 100644 index 033adbe451174..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/ScheduleUpdateTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.ScheduleUpdate; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScheduleUpdateTests { - @Test - public void testDeserialize() { - ScheduleUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"njijpxacqqudf\",\"timeZone\":\"yxbaaabjyvayf\",\"state\":\"Enabled\"},\"tags\":{\"xnevfdnwn\":\"rtuzqogs\",\"uzsoi\":\"mewzsyyc\"},\"location\":\"ud\"}") - .toObject(ScheduleUpdate.class); - Assertions.assertEquals("rtuzqogs", model.tags().get("xnevfdnwn")); - Assertions.assertEquals("ud", model.location()); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("njijpxacqqudf", model.time()); - Assertions.assertEquals("yxbaaabjyvayf", model.timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, model.state()); - } - - @Test - public void testSerialize() { - ScheduleUpdate model = - new ScheduleUpdate() - .withTags(mapOf("xnevfdnwn", "rtuzqogs", "uzsoi", "mewzsyyc")) - .withLocation("ud") - .withType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("njijpxacqqudf") - .withTimeZone("yxbaaabjyvayf") - .withState(EnableStatus.ENABLED); - model = BinaryData.fromObject(model).toObject(ScheduleUpdate.class); - Assertions.assertEquals("rtuzqogs", model.tags().get("xnevfdnwn")); - Assertions.assertEquals("ud", model.location()); - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, model.type()); - Assertions.assertEquals(ScheduledFrequency.DAILY, model.frequency()); - Assertions.assertEquals("njijpxacqqudf", model.time()); - Assertions.assertEquals("yxbaaabjyvayf", model.timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, model.state()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateMockTests.java deleted file mode 100644 index d1f775b12b600..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.Schedule; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -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 SchedulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"z\",\"timeZone\":\"hokvbwnh\",\"state\":\"Enabled\"},\"id\":\"gehgppi\",\"name\":\"ifhpf\",\"type\":\"oajvgcxtxjcs\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager - .schedules() - .define("xgccknfnw") - .withExistingPool("b", "svgjrwhryvy", "ytdc") - .withTypePropertiesType(ScheduledType.STOP_DEV_BOX) - .withFrequency(ScheduledFrequency.DAILY) - .withTime("dhttzaefedxihchr") - .withTimeZone("k") - .withState(EnableStatus.DISABLED) - .withTop(1304888190) - .create(); - - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, response.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, response.frequency()); - Assertions.assertEquals("z", response.time()); - Assertions.assertEquals("hokvbwnh", response.timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, response.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteMockTests.java deleted file mode 100644 index b378a9c3113cd..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesDeleteMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -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 SchedulesDeleteMockTests { - @Test - public void testDelete() 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.schedules().delete("nok", "gukkjqnvbroy", "a", "xulcdisdos", 414499162, Context.NONE); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetWithResponseMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetWithResponseMockTests.java deleted file mode 100644 index 5b81cc06fa886..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.Schedule; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -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 SchedulesGetWithResponseMockTests { - @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\":{\"provisioningState\":\"NotSpecified\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"kdlpa\",\"timeZone\":\"rcxfailcfxwmdb\",\"state\":\"Disabled\"},\"id\":\"gsftufqobrjlnacg\",\"name\":\"ckknhxkizvy\",\"type\":\"nrzvuljraaer\"}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager - .schedules() - .getWithResponse("gsfjac", "slhhxudbxv", "d", "tnsi", 531273427, Context.NONE) - .getValue(); - - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, response.typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, response.frequency()); - Assertions.assertEquals("kdlpa", response.time()); - Assertions.assertEquals("rcxfailcfxwmdb", response.timeZone()); - Assertions.assertEquals(EnableStatus.DISABLED, response.state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolMockTests.java deleted file mode 100644 index f1e4a847817d9..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SchedulesListByPoolMockTests.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.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.EnableStatus; -import com.azure.resourcemanager.devcenter.models.Schedule; -import com.azure.resourcemanager.devcenter.models.ScheduledFrequency; -import com.azure.resourcemanager.devcenter.models.ScheduledType; -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 SchedulesListByPoolMockTests { - @Test - public void testListByPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"type\":\"StopDevBox\",\"frequency\":\"Daily\",\"time\":\"sawddjibabxvi\",\"timeZone\":\"tvtzeexavoxtfg\",\"state\":\"Enabled\"},\"id\":\"m\",\"name\":\"qbw\",\"type\":\"ypq\"}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.schedules().listByPool("ojbmxv", "vrefdeesv", "cuijpxt", 214563643, Context.NONE); - - Assertions.assertEquals(ScheduledType.STOP_DEV_BOX, response.iterator().next().typePropertiesType()); - Assertions.assertEquals(ScheduledFrequency.DAILY, response.iterator().next().frequency()); - Assertions.assertEquals("sawddjibabxvi", response.iterator().next().time()); - Assertions.assertEquals("tvtzeexavoxtfg", response.iterator().next().timeZone()); - Assertions.assertEquals(EnableStatus.ENABLED, response.iterator().next().state()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuListResultTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuListResultTests.java deleted file mode 100644 index 12d34e720dd51..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuListResultTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.SkuListResult; -import org.junit.jupiter.api.Test; - -public final class SkuListResultTests { - @Test - public void testDeserialize() { - SkuListResult model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"flrwd\",\"locations\":[\"lxyjr\",\"sag\"],\"capabilities\":[],\"name\":\"nihgwqapnedg\",\"tier\":\"Premium\",\"size\":\"kcvqvpke\",\"family\":\"cvdrhvoodsot\",\"capacity\":1862615744},{\"resourceType\":\"dopcjwvnh\",\"locations\":[\"wmgxcxrsl\"],\"capabilities\":[],\"name\":\"twuoegrpkhjwni\",\"tier\":\"Standard\",\"size\":\"uicpd\",\"family\":\"kzzlvmbmpaxmodf\",\"capacity\":843823748},{\"resourceType\":\"yw\",\"locations\":[\"fvmwy\",\"rfouyftaakcpw\",\"yzvqt\"],\"capabilities\":[],\"name\":\"bexkpzksmondj\",\"tier\":\"Premium\",\"size\":\"vypomgkopkwho\",\"family\":\"pajqgxysm\",\"capacity\":1907336189}],\"nextLink\":\"qfqvmkc\"}") - .toObject(SkuListResult.class); - } - - @Test - public void testSerialize() { - SkuListResult model = new SkuListResult(); - model = BinaryData.fromObject(model).toObject(SkuListResult.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuTests.java deleted file mode 100644 index a32c24ea6fe0c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkuTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.Sku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SkuTests { - @Test - public void testDeserialize() { - Sku model = - BinaryData - .fromString( - "{\"name\":\"pwo\",\"tier\":\"Basic\",\"size\":\"fpbsjyofdxl\",\"family\":\"sd\",\"capacity\":1422945070}") - .toObject(Sku.class); - Assertions.assertEquals("pwo", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("fpbsjyofdxl", model.size()); - Assertions.assertEquals("sd", model.family()); - Assertions.assertEquals(1422945070, model.capacity()); - } - - @Test - public void testSerialize() { - Sku model = - new Sku() - .withName("pwo") - .withTier(SkuTier.BASIC) - .withSize("fpbsjyofdxl") - .withFamily("sd") - .withCapacity(1422945070); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("pwo", model.name()); - Assertions.assertEquals(SkuTier.BASIC, model.tier()); - Assertions.assertEquals("fpbsjyofdxl", model.size()); - Assertions.assertEquals("sd", model.family()); - Assertions.assertEquals(1422945070, model.capacity()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkusListMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkusListMockTests.java deleted file mode 100644 index e1a9524d76cfd..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/SkusListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.DevCenterSku; -import com.azure.resourcemanager.devcenter.models.SkuTier; -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 SkusListMockTests { - @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\":[{\"resourceType\":\"fc\",\"locations\":[\"pimaqxzhemjyh\",\"hujswtwkozzwcul\",\"bawpfajnjwltlwt\",\"j\"],\"capabilities\":[{\"name\":\"alhsnvkc\",\"value\":\"xzrpo\"},{\"name\":\"mlnwiaaomylweazu\",\"value\":\"sethwwn\"},{\"name\":\"hlf\",\"value\":\"wpchwahf\"},{\"name\":\"usnfepgfewet\",\"value\":\"yxgncxykxhdjhli\"}],\"name\":\"mbcxfhbcp\",\"tier\":\"Basic\",\"size\":\"xcjzhqizxfpxt\",\"family\":\"scjavftju\",\"capacity\":562191246}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.skus().list(2138880865, Context.NONE); - - Assertions.assertEquals("mbcxfhbcp", response.iterator().next().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().tier()); - Assertions.assertEquals("xcjzhqizxfpxt", response.iterator().next().size()); - Assertions.assertEquals("scjavftju", response.iterator().next().family()); - Assertions.assertEquals(562191246, response.iterator().next().capacity()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/TrackedResourceUpdateTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/TrackedResourceUpdateTests.java deleted file mode 100644 index 5befec380e103..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/TrackedResourceUpdateTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.TrackedResourceUpdate; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TrackedResourceUpdateTests { - @Test - public void testDeserialize() { - TrackedResourceUpdate model = - BinaryData - .fromString( - "{\"tags\":{\"suuv\":\"u\",\"odjpslwejd\":\"kjozkrwfnd\",\"cctazakljlahbc\":\"vwryoqpso\",\"gexpaojakhmsbz\":\"yffdfdos\"},\"location\":\"crzevdphlx\"}") - .toObject(TrackedResourceUpdate.class); - Assertions.assertEquals("u", model.tags().get("suuv")); - Assertions.assertEquals("crzevdphlx", model.location()); - } - - @Test - public void testSerialize() { - TrackedResourceUpdate model = - new TrackedResourceUpdate() - .withTags( - mapOf( - "suuv", - "u", - "odjpslwejd", - "kjozkrwfnd", - "cctazakljlahbc", - "vwryoqpso", - "gexpaojakhmsbz", - "yffdfdos")) - .withLocation("crzevdphlx"); - model = BinaryData.fromObject(model).toObject(TrackedResourceUpdate.class); - Assertions.assertEquals("u", model.tags().get("suuv")); - Assertions.assertEquals("crzevdphlx", model.location()); - } - - @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/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageInnerTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageInnerTests.java deleted file mode 100644 index c9ec0c3dc6fec..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageInnerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.fluent.models.UsageInner; -import com.azure.resourcemanager.devcenter.models.UsageName; -import com.azure.resourcemanager.devcenter.models.UsageUnit; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UsageInnerTests { - @Test - public void testDeserialize() { - UsageInner model = - BinaryData - .fromString( - "{\"currentValue\":9193479715444111968,\"limit\":7606552657334268394,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"phsdyhto\",\"value\":\"ikdowwquuvx\"}}") - .toObject(UsageInner.class); - Assertions.assertEquals(9193479715444111968L, model.currentValue()); - Assertions.assertEquals(7606552657334268394L, model.limit()); - Assertions.assertEquals(UsageUnit.COUNT, model.unit()); - Assertions.assertEquals("phsdyhto", model.name().localizedValue()); - Assertions.assertEquals("ikdowwquuvx", model.name().value()); - } - - @Test - public void testSerialize() { - UsageInner model = - new UsageInner() - .withCurrentValue(9193479715444111968L) - .withLimit(7606552657334268394L) - .withUnit(UsageUnit.COUNT) - .withName(new UsageName().withLocalizedValue("phsdyhto").withValue("ikdowwquuvx")); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - Assertions.assertEquals(9193479715444111968L, model.currentValue()); - Assertions.assertEquals(7606552657334268394L, model.limit()); - Assertions.assertEquals(UsageUnit.COUNT, model.unit()); - Assertions.assertEquals("phsdyhto", model.name().localizedValue()); - Assertions.assertEquals("ikdowwquuvx", model.name().value()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageNameTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageNameTests.java deleted file mode 100644 index 59290cb245437..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsageNameTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.UsageName; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UsageNameTests { - @Test - public void testDeserialize() { - UsageName model = - BinaryData - .fromString("{\"localizedValue\":\"clvit\",\"value\":\"qzonosggbhcohf\"}") - .toObject(UsageName.class); - Assertions.assertEquals("clvit", model.localizedValue()); - Assertions.assertEquals("qzonosggbhcohf", model.value()); - } - - @Test - public void testSerialize() { - UsageName model = new UsageName().withLocalizedValue("clvit").withValue("qzonosggbhcohf"); - model = BinaryData.fromObject(model).toObject(UsageName.class); - Assertions.assertEquals("clvit", model.localizedValue()); - Assertions.assertEquals("qzonosggbhcohf", model.value()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationMockTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationMockTests.java deleted file mode 100644 index 4264853ca185c..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UsagesListByLocationMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devcenter.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.core.util.Context; -import com.azure.resourcemanager.devcenter.DevCenterManager; -import com.azure.resourcemanager.devcenter.models.Usage; -import com.azure.resourcemanager.devcenter.models.UsageUnit; -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 UsagesListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"currentValue\":3098779210531372823,\"limit\":7252789736173175802,\"unit\":\"Count\",\"name\":{\"localizedValue\":\"kkzjcjbtrga\",\"value\":\"vvib\"}}]}"; - - 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); - })); - - DevCenterManager manager = - DevCenterManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().listByLocation("bjoxs", Context.NONE); - - Assertions.assertEquals(3098779210531372823L, response.iterator().next().currentValue()); - Assertions.assertEquals(7252789736173175802L, response.iterator().next().limit()); - Assertions.assertEquals(UsageUnit.COUNT, response.iterator().next().unit()); - Assertions.assertEquals("kkzjcjbtrga", response.iterator().next().name().localizedValue()); - Assertions.assertEquals("vvib", response.iterator().next().name().value()); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserAssignedIdentityTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 09aee9ebd43d4..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserAssignedIdentityTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.UserAssignedIdentity; -import org.junit.jupiter.api.Test; - -public final class UserAssignedIdentityTests { - @Test - public void testDeserialize() { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"72e8c163-8215-4d64-aaf2-3cba6eb40d42\",\"clientId\":\"ed63d920-710b-4f6e-aae6-481cd2b2a64c\"}") - .toObject(UserAssignedIdentity.class); - } - - @Test - public void testSerialize() { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserRoleAssignmentValueTests.java b/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserRoleAssignmentValueTests.java deleted file mode 100644 index 250adda71c23b..0000000000000 --- a/sdk/devcenter/azure-resourcemanager-devcenter/src/test/java/com/azure/resourcemanager/devcenter/generated/UserRoleAssignmentValueTests.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.devcenter.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.devcenter.models.EnvironmentRole; -import com.azure.resourcemanager.devcenter.models.UserRoleAssignmentValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Test; - -public final class UserRoleAssignmentValueTests { - @Test - public void testDeserialize() { - UserRoleAssignmentValue model = - BinaryData - .fromString( - "{\"roles\":{\"rnwb\":{\"roleName\":\"sbkyvpycanuzbp\",\"description\":\"afkuwb\"},\"ofmxagkvtmelmqkr\":{\"roleName\":\"hhseyv\",\"description\":\"srtslhspkdeem\"}}}") - .toObject(UserRoleAssignmentValue.class); - } - - @Test - public void testSerialize() { - UserRoleAssignmentValue model = - new UserRoleAssignmentValue() - .withRoles(mapOf("rnwb", new EnvironmentRole(), "ofmxagkvtmelmqkr", new EnvironmentRole())); - model = BinaryData.fromObject(model).toObject(UserRoleAssignmentValue.class); - } - - @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; - } -}