diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/CHANGELOG.md b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/CHANGELOG.md index 7629560ef210..aeadd361463b 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/CHANGELOG.md +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/CHANGELOG.md @@ -1,14 +1,55 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-04-30) + +- Azure Resource Manager ConnectedVMware client library for Java. This package contains Microsoft Azure SDK for ConnectedVMware Management SDK. Connected VMware Client. Package tag package-2023-12. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.StorageProfileInventory` was added + +* `models.WindowsConfiguration` was added + +* `models.NetworkInterfaceInventory` was added + +* `models.VirtualDiskInventory` was added + +* `models.NetworkProfileInventory` was added + +#### `models.VirtualMachineInventoryItem` was modified + +* `memorySizeMB()` was added +* `firmwareType()` was added +* `maxSnapshots()` was added +* `changeTrackingSupported()` was added +* `storageProfile()` was added +* `networkProfile()` was added +* `withStorageProfile(models.StorageProfileInventory)` was added +* `numCPUs()` was added +* `withNetworkProfile(models.NetworkProfileInventory)` was added +* `diskEnabledUuid()` was added +* `changeTrackingEnabled()` was added +* `numberOfSnapshots()` was added +* `computerName()` was added + +#### `models.HostInventoryItem` was modified + +* `numSockets()` was added +* `cpuModel()` was added +* `numCoresPerSocket()` was added +* `memorySizeGB()` was added +* `powerState()` was added +* `version()` was added + +#### `models.GuestCredential` was modified + +* `privateKey()` was added +* `withPrivateKey(java.lang.String)` was added -### Bugs Fixed +#### `models.OsProfileForVMInstance` was modified -### Other Changes +* `withWindowsConfiguration(models.WindowsConfiguration)` was added +* `windowsConfiguration()` was added ## 1.1.0 (2024-12-13) diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/README.md b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/README.md index 9380c6c7e74c..41cb4143f9ae 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/README.md +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ConnectedVMware client library for Java. -This package contains Microsoft Azure SDK for ConnectedVMware Management SDK. Connected VMware Client. Package tag package-2023-10. 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 ConnectedVMware Management SDK. Connected VMware Client. Package tag package-2023-12. 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 @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ConnectedVMwareManager manager = ConnectedVMwareManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/SAMPLE.md b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/SAMPLE.md index 74c302cf0769..b14f5c27d3da 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/SAMPLE.md +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/SAMPLE.md @@ -100,34 +100,22 @@ ### Clusters_Create ```java -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; - /** - * Samples for Clusters Create. + * Samples for Hosts Delete. */ -public final class ClustersCreateSamples { +public final class HostsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateCluster.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteHost.json */ /** - * Sample code: CreateCluster. + * Sample code: DeleteHost. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.clusters() - .define("HRCluster") - .withRegion("East US") - .withExistingResourceGroup("testrg") - .withExtendedLocation(new ExtendedLocation().withType("customLocation") - .withName( - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withVCenterId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") - .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") - .create(); + public static void deleteHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.hosts().delete("testrg", "HRHost", null, com.azure.core.util.Context.NONE); } } ``` @@ -136,21 +124,21 @@ public final class ClustersCreateSamples { ```java /** - * Samples for Clusters Delete. + * Samples for VirtualNetworks List. */ -public final class ClustersDeleteSamples { +public final class VirtualNetworksListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteCluster.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListVirtualNetworks.json */ /** - * Sample code: DeleteCluster. + * Sample code: ListVirtualNetworks. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.clusters().delete("testrg", "HRCluster", null, com.azure.core.util.Context.NONE); + public static void listVirtualNetworks(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualNetworks().list(com.azure.core.util.Context.NONE); } } ``` @@ -158,22 +146,28 @@ public final class ClustersDeleteSamples { ### Clusters_GetByResourceGroup ```java +import com.azure.resourcemanager.connectedvmware.models.ResourcePoolInventoryItem; + /** - * Samples for Clusters GetByResourceGroup. + * Samples for InventoryItems Create. */ -public final class ClustersGetByResourceGroupSamples { +public final class InventoryItemsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetCluster.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateInventoryItem.json */ /** - * Sample code: GetCluster. + * Sample code: CreateInventoryItem. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.clusters().getByResourceGroupWithResponse("testrg", "HRCluster", com.azure.core.util.Context.NONE); + public static void createInventoryItem(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.inventoryItems() + .define("testItem") + .withExistingVcenter("testrg", "ContosoVCenter") + .withProperties(new ResourcePoolInventoryItem()) + .create(); } } ``` @@ -181,22 +175,34 @@ public final class ClustersGetByResourceGroupSamples { ### Clusters_List ```java +import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; + /** - * Samples for Clusters List. + * Samples for VirtualNetworks Create. */ -public final class ClustersListSamples { +public final class VirtualNetworksCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListClusters.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateVirtualNetwork.json */ /** - * Sample code: ListClusters. + * Sample code: CreateVirtualNetwork. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void listClusters(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.clusters().list(com.azure.core.util.Context.NONE); + public static void createVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualNetworks() + .define("ProdNetwork") + .withRegion("East US") + .withExistingResourceGroup("testrg") + .withExtendedLocation(new ExtendedLocation().withType("customLocation") + .withName( + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) + .withVCenterId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") + .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") + .create(); } } ``` @@ -204,23 +210,27 @@ public final class ClustersListSamples { ### Clusters_ListByResourceGroup ```java +import com.azure.resourcemanager.connectedvmware.models.StopVirtualMachineOptions; + /** - * Samples for Clusters ListByResourceGroup. + * Samples for VirtualMachineInstances Stop. */ -public final class ClustersListByResourceGroupSamples { +public final class VirtualMachineInstancesStopSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListClustersByResourceGroup.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * StopVirtualMachineInstance.json */ /** - * Sample code: ListClustersByResourceGroup. + * Sample code: StopVirtualMachine. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void - listClustersByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.clusters().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + public static void stopVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() + .stop( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + new StopVirtualMachineOptions().withSkipShutdown(true), com.azure.core.util.Context.NONE); } } ``` @@ -228,27 +238,76 @@ public final class ClustersListByResourceGroupSamples { ### Clusters_Update ```java -import com.azure.resourcemanager.connectedvmware.models.Cluster; +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListOperations.json + */ + /** + * Sample code: ListOperations. + * + * @param manager Entry point to ConnectedVMwareManager. + */ + public static void listOperations(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_Create + +```java +/** + * Samples for VirtualMachineInstances List. + */ +public final class VirtualMachineInstancesListSamples { + /* + * x-ms-original-file: + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListVirtualMachineInstances.json + */ + /** + * Sample code: GetVirtualMachine. + * + * @param manager Entry point to ConnectedVMwareManager. + */ + public static void getVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() + .list( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); + } +} +``` + +### Datastores_Delete + +```java +import com.azure.resourcemanager.connectedvmware.models.VirtualNetwork; import java.util.HashMap; import java.util.Map; /** - * Samples for Clusters Update. + * Samples for VirtualNetworks Update. */ -public final class ClustersUpdateSamples { +public final class VirtualNetworksUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateCluster.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateVirtualNetwork.json */ /** - * Sample code: UpdateCluster. + * Sample code: UpdateVirtualNetwork. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void updateCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - Cluster resource = manager.clusters() - .getByResourceGroupWithResponse("testrg", "HRCluster", com.azure.core.util.Context.NONE) + public static void updateVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + VirtualNetwork resource = manager.virtualNetworks() + .getByResourceGroupWithResponse("testrg", "ProdNetwork", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -267,158 +326,164 @@ public final class ClustersUpdateSamples { } ``` -### Datastores_Create +### Datastores_GetByResourceGroup ```java import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; +import com.azure.resourcemanager.connectedvmware.models.VICredential; /** - * Samples for Datastores Create. + * Samples for VCenters Create. */ -public final class DatastoresCreateSamples { +public final class VCentersCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateDatastore.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateVCenter.json */ /** - * Sample code: CreateDatastore. + * Sample code: CreateVCenter. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.datastores() - .define("HRDatastore") + public static void createVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vCenters() + .define("ContosoVCenter") .withRegion("East US") .withExistingResourceGroup("testrg") + .withFqdn("ContosoVMware.contoso.com") .withExtendedLocation(new ExtendedLocation().withType("customLocation") .withName( "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withVCenterId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") - .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") + .withPort(1234) + .withCredentials(new VICredential().withUsername("tempuser").withPassword("fakeTokenPlaceholder")) .create(); } } ``` -### Datastores_Delete +### Datastores_List ```java /** - * Samples for Datastores Delete. + * Samples for Datastores GetByResourceGroup. */ -public final class DatastoresDeleteSamples { +public final class DatastoresGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteDatastore.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetDatastore.json */ /** - * Sample code: DeleteDatastore. + * Sample code: GetDatastore. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.datastores().delete("testrg", "HRDatastore", null, com.azure.core.util.Context.NONE); + public static void getDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.datastores().getByResourceGroupWithResponse("testrg", "HRDatastore", com.azure.core.util.Context.NONE); } } ``` -### Datastores_GetByResourceGroup +### Datastores_ListByResourceGroup ```java /** - * Samples for Datastores GetByResourceGroup. + * Samples for VirtualMachineTemplates Delete. */ -public final class DatastoresGetByResourceGroupSamples { +public final class VirtualMachineTemplatesDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetDatastore.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteVirtualMachineTemplate.json */ /** - * Sample code: GetDatastore. + * Sample code: DeleteVirtualMachineTemplate. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.datastores().getByResourceGroupWithResponse("testrg", "HRDatastore", com.azure.core.util.Context.NONE); + public static void + deleteVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineTemplates() + .delete("testrg", "WebFrontEndTemplate", null, com.azure.core.util.Context.NONE); } } ``` -### Datastores_List +### Datastores_Update ```java /** - * Samples for Datastores List. + * Samples for VmInstanceHybridIdentityMetadata Get. */ -public final class DatastoresListSamples { +public final class VmInstanceHybridIdentityMetadataGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListDatastores.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetVmInstanceHybridIdentityMetadata.json */ /** - * Sample code: ListDatastores. + * Sample code: GetHybridIdentityMetadata. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void listDatastores(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.datastores().list(com.azure.core.util.Context.NONE); + public static void + getHybridIdentityMetadata(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vmInstanceHybridIdentityMetadatas() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); } } ``` -### Datastores_ListByResourceGroup +### Hosts_Create ```java /** - * Samples for Datastores ListByResourceGroup. + * Samples for Clusters GetByResourceGroup. */ -public final class DatastoresListByResourceGroupSamples { +public final class ClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListDatastoresByResourceGroup.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetCluster.json */ /** - * Sample code: ListDatastoresByResourceGroup. + * Sample code: GetCluster. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void - listDatastoresByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.datastores().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + public static void getCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.clusters().getByResourceGroupWithResponse("testrg", "HRCluster", com.azure.core.util.Context.NONE); } } ``` -### Datastores_Update +### Hosts_Delete ```java -import com.azure.resourcemanager.connectedvmware.models.Datastore; +import com.azure.resourcemanager.connectedvmware.models.VCenter; import java.util.HashMap; import java.util.Map; /** - * Samples for Datastores Update. + * Samples for VCenters Update. */ -public final class DatastoresUpdateSamples { +public final class VCentersUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateDatastore.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateVCenter.json */ /** - * Sample code: UpdateDatastore. + * Sample code: UpdateVCenter. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void updateDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - Datastore resource = manager.datastores() - .getByResourceGroupWithResponse("testrg", "HRDatastore", com.azure.core.util.Context.NONE) + public static void updateVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + VCenter resource = manager.vCenters() + .getByResourceGroupWithResponse("testrg", "ContosoVCenter", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -437,83 +502,25 @@ public final class DatastoresUpdateSamples { } ``` -### Hosts_Create - -```java -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; - -/** - * Samples for Hosts Create. - */ -public final class HostsCreateSamples { - /* - * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateHost.json - */ - /** - * Sample code: CreateHost. - * - * @param manager Entry point to ConnectedVMwareManager. - */ - public static void createHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.hosts() - .define("HRHost") - .withRegion("East US") - .withExistingResourceGroup("testrg") - .withExtendedLocation(new ExtendedLocation().withType("customLocation") - .withName( - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withVCenterId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") - .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") - .create(); - } -} -``` - -### Hosts_Delete - -```java -/** - * Samples for Hosts Delete. - */ -public final class HostsDeleteSamples { - /* - * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteHost.json - */ - /** - * Sample code: DeleteHost. - * - * @param manager Entry point to ConnectedVMwareManager. - */ - public static void deleteHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.hosts().delete("testrg", "HRHost", null, com.azure.core.util.Context.NONE); - } -} -``` - ### Hosts_GetByResourceGroup ```java /** - * Samples for Hosts GetByResourceGroup. + * Samples for ResourcePools List. */ -public final class HostsGetByResourceGroupSamples { +public final class ResourcePoolsListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetHost.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListResourcePools.json */ /** - * Sample code: GetHost. + * Sample code: ListResourcePools. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.hosts().getByResourceGroupWithResponse("testrg", "HRHost", com.azure.core.util.Context.NONE); + public static void listResourcePools(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.resourcePools().list(com.azure.core.util.Context.NONE); } } ``` @@ -521,22 +528,37 @@ public final class HostsGetByResourceGroupSamples { ### Hosts_List ```java +import com.azure.resourcemanager.connectedvmware.fluent.models.GuestAgentInner; +import com.azure.resourcemanager.connectedvmware.models.GuestCredential; +import com.azure.resourcemanager.connectedvmware.models.HttpProxyConfiguration; +import com.azure.resourcemanager.connectedvmware.models.ProvisioningAction; + /** - * Samples for Hosts List. + * Samples for VMInstanceGuestAgents Create. */ -public final class HostsListSamples { +public final class VMInstanceGuestAgentsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListHosts.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateVMInstanceGuestAgent.json */ /** - * Sample code: ListHosts. + * Sample code: CreateGuestAgent. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void listHosts(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.hosts().list(com.azure.core.util.Context.NONE); + public static void createGuestAgent(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vMInstanceGuestAgents() + .create( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + new GuestAgentInner() + .withCredentials( + new GuestCredential().withUsername("tempuser").withPassword("fakeTokenPlaceholder")) + .withPrivateLinkScopeResourceId( + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName") + .withHttpProxyConfig(new HttpProxyConfiguration().withHttpsProxy("http://192.1.2.3:8080")) + .withProvisioningAction(ProvisioningAction.INSTALL), + com.azure.core.util.Context.NONE); } } ``` @@ -545,22 +567,21 @@ public final class HostsListSamples { ```java /** - * Samples for Hosts ListByResourceGroup. + * Samples for ResourcePools Delete. */ -public final class HostsListByResourceGroupSamples { +public final class ResourcePoolsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListHostsByResourceGroup.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteResourcePool.json */ /** - * Sample code: ListHostsByResourceGroup. + * Sample code: DeleteResourcePool. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void - listHostsByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.hosts().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + public static void deleteResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.resourcePools().delete("testrg", "HRPool", null, com.azure.core.util.Context.NONE); } } ``` @@ -568,27 +589,27 @@ public final class HostsListByResourceGroupSamples { ### Hosts_Update ```java -import com.azure.resourcemanager.connectedvmware.models.HostModel; +import com.azure.resourcemanager.connectedvmware.models.Datastore; import java.util.HashMap; import java.util.Map; /** - * Samples for Hosts Update. + * Samples for Datastores Update. */ -public final class HostsUpdateSamples { +public final class DatastoresUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateHost.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateDatastore.json */ /** - * Sample code: UpdateHost. + * Sample code: UpdateDatastore. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void updateHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - HostModel resource = manager.hosts() - .getByResourceGroupWithResponse("testrg", "HRHost", com.azure.core.util.Context.NONE) + public static void updateDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + Datastore resource = manager.datastores() + .getByResourceGroupWithResponse("testrg", "HRDatastore", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -610,28 +631,25 @@ public final class HostsUpdateSamples { ### InventoryItems_Create ```java -import com.azure.resourcemanager.connectedvmware.models.ResourcePoolInventoryItem; - /** - * Samples for InventoryItems Create. + * Samples for VMInstanceGuestAgents Get. */ -public final class InventoryItemsCreateSamples { +public final class VMInstanceGuestAgentsGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateInventoryItem.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetVMInstanceGuestAgent.json */ /** - * Sample code: CreateInventoryItem. + * Sample code: GetGuestAgent. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createInventoryItem(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.inventoryItems() - .define("testItem") - .withExistingVcenter("testrg", "ContosoVCenter") - .withProperties(new ResourcePoolInventoryItem()) - .create(); + public static void getGuestAgent(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vMInstanceGuestAgents() + .getWithResponse( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); } } ``` @@ -640,22 +658,22 @@ public final class InventoryItemsCreateSamples { ```java /** - * Samples for InventoryItems Delete. + * Samples for InventoryItems Get. */ -public final class InventoryItemsDeleteSamples { +public final class InventoryItemsGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteInventoryItem.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetInventoryItem.json */ /** - * Sample code: DeleteInventoryItem. + * Sample code: GetInventoryItem. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteInventoryItem(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + public static void getInventoryItem(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { manager.inventoryItems() - .deleteWithResponse("testrg", "ContosoVCenter", "testItem", com.azure.core.util.Context.NONE); + .getWithResponse("testrg", "ContosoVCenter", "testItem", com.azure.core.util.Context.NONE); } } ``` @@ -664,22 +682,22 @@ public final class InventoryItemsDeleteSamples { ```java /** - * Samples for InventoryItems Get. + * Samples for ResourcePools ListByResourceGroup. */ -public final class InventoryItemsGetSamples { +public final class ResourcePoolsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetInventoryItem.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListResourcePoolsByResourceGroup.json */ /** - * Sample code: GetInventoryItem. + * Sample code: ListResourcePoolsByResourceGroup. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getInventoryItem(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.inventoryItems() - .getWithResponse("testrg", "ContosoVCenter", "testItem", com.azure.core.util.Context.NONE); + public static void + listResourcePoolsByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.resourcePools().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); } } ``` @@ -688,22 +706,22 @@ public final class InventoryItemsGetSamples { ```java /** - * Samples for InventoryItems ListByVCenter. + * Samples for VirtualNetworks ListByResourceGroup. */ -public final class InventoryItemsListByVCenterSamples { +public final class VirtualNetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * InventoryItems_ListByVCenter.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListVirtualNetworksByResourceGroup.json */ /** - * Sample code: InventoryItemsListByVCenter. + * Sample code: ListVirtualNetworksByResourceGroup. * * @param manager Entry point to ConnectedVMwareManager. */ public static void - inventoryItemsListByVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.inventoryItems().listByVCenter("testrg", "ContosoVCenter", com.azure.core.util.Context.NONE); + listVirtualNetworksByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualNetworks().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); } } ``` @@ -712,21 +730,21 @@ public final class InventoryItemsListByVCenterSamples { ```java /** - * Samples for Operations List. + * Samples for VCenters GetByResourceGroup. */ -public final class OperationsListSamples { +public final class VCentersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListOperations.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetVCenter.json */ /** - * Sample code: ListOperations. + * Sample code: GetVCenter. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void listOperations(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void getVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vCenters().getByResourceGroupWithResponse("testrg", "ContosoVCenter", com.azure.core.util.Context.NONE); } } ``` @@ -734,34 +752,22 @@ public final class OperationsListSamples { ### ResourcePools_Create ```java -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; - /** - * Samples for ResourcePools Create. + * Samples for VCenters Delete. */ -public final class ResourcePoolsCreateSamples { +public final class VCentersDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateResourcePool.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteVCenter.json */ /** - * Sample code: CreateResourcePool. + * Sample code: DeleteVCenter. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.resourcePools() - .define("HRPool") - .withRegion("East US") - .withExistingResourceGroup("testrg") - .withExtendedLocation(new ExtendedLocation().withType("customLocation") - .withName( - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withVCenterId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") - .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") - .create(); + public static void deleteVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vCenters().delete("testrg", "ContosoVCenter", null, com.azure.core.util.Context.NONE); } } ``` @@ -770,21 +776,24 @@ public final class ResourcePoolsCreateSamples { ```java /** - * Samples for ResourcePools Delete. + * Samples for VirtualMachineInstances Restart. */ -public final class ResourcePoolsDeleteSamples { +public final class VirtualMachineInstancesRestartSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteResourcePool.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * RestartVirtualMachineInstance.json */ /** - * Sample code: DeleteResourcePool. + * Sample code: RestartVirtualMachine. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.resourcePools().delete("testrg", "HRPool", null, com.azure.core.util.Context.NONE); + public static void restartVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() + .restart( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); } } ``` @@ -793,21 +802,22 @@ public final class ResourcePoolsDeleteSamples { ```java /** - * Samples for ResourcePools GetByResourceGroup. + * Samples for VirtualNetworks GetByResourceGroup. */ -public final class ResourcePoolsGetByResourceGroupSamples { +public final class VirtualNetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetResourcePool.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetVirtualNetwork.json */ /** - * Sample code: GetResourcePool. + * Sample code: GetVirtualNetwork. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.resourcePools().getByResourceGroupWithResponse("testrg", "HRPool", com.azure.core.util.Context.NONE); + public static void getVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualNetworks() + .getByResourceGroupWithResponse("testrg", "ProdNetwork", com.azure.core.util.Context.NONE); } } ``` @@ -815,22 +825,41 @@ public final class ResourcePoolsGetByResourceGroupSamples { ### ResourcePools_List ```java -/** - * Samples for ResourcePools List. +import com.azure.resourcemanager.connectedvmware.fluent.models.VirtualMachineInstanceInner; +import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; +import com.azure.resourcemanager.connectedvmware.models.HardwareProfile; +import com.azure.resourcemanager.connectedvmware.models.InfrastructureProfile; +import com.azure.resourcemanager.connectedvmware.models.PlacementProfile; + +/** + * Samples for VirtualMachineInstances CreateOrUpdate. */ -public final class ResourcePoolsListSamples { +public final class VirtualMachineInstancesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListResourcePools.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateVirtualMachineInstance.json */ /** - * Sample code: ListResourcePools. + * Sample code: CreateVirtualMachine. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void listResourcePools(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.resourcePools().list(com.azure.core.util.Context.NONE); + public static void createVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() + .createOrUpdate( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withType("customLocation") + .withName( + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) + .withPlacementProfile(new PlacementProfile().withResourcePoolId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool")) + .withHardwareProfile(new HardwareProfile().withMemorySizeMB(4196).withNumCPUs(4)) + .withInfrastructureProfile(new InfrastructureProfile().withTemplateId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate") + .withVCenterId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter")), + com.azure.core.util.Context.NONE); } } ``` @@ -839,22 +868,23 @@ public final class ResourcePoolsListSamples { ```java /** - * Samples for ResourcePools ListByResourceGroup. + * Samples for VirtualMachineTemplates GetByResourceGroup. */ -public final class ResourcePoolsListByResourceGroupSamples { +public final class VirtualMachineTemplatesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListResourcePoolsByResourceGroup.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetVirtualMachineTemplate.json */ /** - * Sample code: ListResourcePoolsByResourceGroup. + * Sample code: GetVirtualMachineTemplate. * * @param manager Entry point to ConnectedVMwareManager. */ public static void - listResourcePoolsByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.resourcePools().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + getVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineTemplates() + .getByResourceGroupWithResponse("testrg", "WebFrontEndTemplate", com.azure.core.util.Context.NONE); } } ``` @@ -862,41 +892,30 @@ public final class ResourcePoolsListByResourceGroupSamples { ### ResourcePools_Update ```java -import com.azure.resourcemanager.connectedvmware.models.ResourcePool; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.connectedvmware.models.HardwareProfile; +import com.azure.resourcemanager.connectedvmware.models.VirtualMachineInstanceUpdate; /** - * Samples for ResourcePools Update. + * Samples for VirtualMachineInstances Update. */ -public final class ResourcePoolsUpdateSamples { +public final class VirtualMachineInstancesUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateResourcePool.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateVirtualMachineInstance.json */ /** - * Sample code: UpdateResourcePool. + * Sample code: UpdateVirtualMachine. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void updateResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - ResourcePool resource = manager.resourcePools() - .getByResourceGroupWithResponse("testrg", "HRPool", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void updateVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() + .update( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + new VirtualMachineInstanceUpdate().withHardwareProfile( + new HardwareProfile().withMemorySizeMB(4196).withNumCPUs(4)), + com.azure.core.util.Context.NONE); } } ``` @@ -905,33 +924,33 @@ public final class ResourcePoolsUpdateSamples { ```java import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.VICredential; /** - * Samples for VCenters Create. + * Samples for VirtualMachineTemplates Create. */ -public final class VCentersCreateSamples { +public final class VirtualMachineTemplatesCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateVCenter.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateVirtualMachineTemplate.json */ /** - * Sample code: CreateVCenter. + * Sample code: CreateVirtualMachineTemplate. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vCenters() - .define("ContosoVCenter") + public static void + createVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineTemplates() + .define("WebFrontEndTemplate") .withRegion("East US") .withExistingResourceGroup("testrg") - .withFqdn("ContosoVMware.contoso.com") .withExtendedLocation(new ExtendedLocation().withType("customLocation") .withName( "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withPort(1234) - .withCredentials(new VICredential().withUsername("tempuser").withPassword("fakeTokenPlaceholder")) + .withVCenterId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") + .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") .create(); } } @@ -940,22 +959,41 @@ public final class VCentersCreateSamples { ### VCenters_Delete ```java +import com.azure.resourcemanager.connectedvmware.models.HostModel; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for VCenters Delete. + * Samples for Hosts Update. */ -public final class VCentersDeleteSamples { +public final class HostsUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteVCenter.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateHost.json */ /** - * Sample code: DeleteVCenter. + * Sample code: UpdateHost. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vCenters().delete("testrg", "ContosoVCenter", null, com.azure.core.util.Context.NONE); + public static void updateHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + HostModel resource = manager.hosts() + .getByResourceGroupWithResponse("testrg", "HRHost", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -964,21 +1002,21 @@ public final class VCentersDeleteSamples { ```java /** - * Samples for VCenters GetByResourceGroup. + * Samples for Datastores List. */ -public final class VCentersGetByResourceGroupSamples { +public final class DatastoresListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetVCenter.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListDatastores.json */ /** - * Sample code: GetVCenter. + * Sample code: ListDatastores. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vCenters().getByResourceGroupWithResponse("testrg", "ContosoVCenter", com.azure.core.util.Context.NONE); + public static void listDatastores(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.datastores().list(com.azure.core.util.Context.NONE); } } ``` @@ -987,21 +1025,24 @@ public final class VCentersGetByResourceGroupSamples { ```java /** - * Samples for VCenters List. + * Samples for VirtualMachineInstances Start. */ -public final class VCentersListSamples { +public final class VirtualMachineInstancesStartSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListVCenters.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * StartVirtualMachineInstance.json */ /** - * Sample code: ListVCenters. + * Sample code: StartVirtualMachine. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void listVCenters(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vCenters().list(com.azure.core.util.Context.NONE); + public static void startVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() + .start( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); } } ``` @@ -1010,22 +1051,25 @@ public final class VCentersListSamples { ```java /** - * Samples for VCenters ListByResourceGroup. + * Samples for VmInstanceHybridIdentityMetadata List. */ -public final class VCentersListByResourceGroupSamples { +public final class VmInstanceHybridIdentityMetadataListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListVCentersByResourceGroup.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * HybridIdentityMetadata_ListByVmInstance.json */ /** - * Sample code: ListVCentersByResourceGroup. + * Sample code: HybridIdentityMetadataListByVm. * * @param manager Entry point to ConnectedVMwareManager. */ public static void - listVCentersByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vCenters().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + hybridIdentityMetadataListByVm(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vmInstanceHybridIdentityMetadatas() + .list( + "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", + com.azure.core.util.Context.NONE); } } ``` @@ -1033,41 +1077,22 @@ public final class VCentersListByResourceGroupSamples { ### VCenters_Update ```java -import com.azure.resourcemanager.connectedvmware.models.VCenter; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for VCenters Update. + * Samples for ResourcePools GetByResourceGroup. */ -public final class VCentersUpdateSamples { +public final class ResourcePoolsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateVCenter.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetResourcePool.json */ /** - * Sample code: UpdateVCenter. + * Sample code: GetResourcePool. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void updateVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - VCenter resource = manager.vCenters() - .getByResourceGroupWithResponse("testrg", "ContosoVCenter", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void getResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.resourcePools().getByResourceGroupWithResponse("testrg", "HRPool", com.azure.core.util.Context.NONE); } } ``` @@ -1075,37 +1100,23 @@ public final class VCentersUpdateSamples { ### VMInstanceGuestAgents_Create ```java -import com.azure.resourcemanager.connectedvmware.fluent.models.GuestAgentInner; -import com.azure.resourcemanager.connectedvmware.models.GuestCredential; -import com.azure.resourcemanager.connectedvmware.models.HttpProxyConfiguration; -import com.azure.resourcemanager.connectedvmware.models.ProvisioningAction; - /** - * Samples for VMInstanceGuestAgents Create. + * Samples for Datastores ListByResourceGroup. */ -public final class VMInstanceGuestAgentsCreateSamples { +public final class DatastoresListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateVMInstanceGuestAgent.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListDatastoresByResourceGroup.json */ /** - * Sample code: CreateGuestAgent. + * Sample code: ListDatastoresByResourceGroup. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createGuestAgent(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vMInstanceGuestAgents() - .create( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - new GuestAgentInner() - .withCredentials( - new GuestCredential().withUsername("tempuser").withPassword("fakeTokenPlaceholder")) - .withPrivateLinkScopeResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.HybridCompute/privateLinkScopes/privateLinkScopeName") - .withHttpProxyConfig(new HttpProxyConfiguration().withHttpsProxy("http://192.1.2.3:8080")) - .withProvisioningAction(ProvisioningAction.INSTALL), - com.azure.core.util.Context.NONE); + public static void + listDatastoresByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.datastores().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); } } ``` @@ -1114,24 +1125,24 @@ public final class VMInstanceGuestAgentsCreateSamples { ```java /** - * Samples for VMInstanceGuestAgents Delete. + * Samples for VirtualMachineInstances Delete. */ -public final class VMInstanceGuestAgentsDeleteSamples { +public final class VirtualMachineInstancesDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteVMInstanceGuestAgent.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteVirtualMachineInstance.json */ /** - * Sample code: DeleteGuestAgent. + * Sample code: DeleteVirtualMachine. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteGuestAgent(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vMInstanceGuestAgents() + public static void deleteVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() .delete( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1139,25 +1150,41 @@ public final class VMInstanceGuestAgentsDeleteSamples { ### VMInstanceGuestAgents_Get ```java +import com.azure.resourcemanager.connectedvmware.models.Cluster; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for VMInstanceGuestAgents Get. + * Samples for Clusters Update. */ -public final class VMInstanceGuestAgentsGetSamples { +public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetVMInstanceGuestAgent.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateCluster.json */ /** - * Sample code: GetGuestAgent. + * Sample code: UpdateCluster. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getGuestAgent(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vMInstanceGuestAgents() - .getWithResponse( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void updateCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + Cluster resource = manager.clusters() + .getByResourceGroupWithResponse("testrg", "HRCluster", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -1166,24 +1193,22 @@ public final class VMInstanceGuestAgentsGetSamples { ```java /** - * Samples for VMInstanceGuestAgents List. + * Samples for VirtualMachineTemplates List. */ -public final class VMInstanceGuestAgentsListSamples { +public final class VirtualMachineTemplatesListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * VMInstanceGuestAgent_ListByVm.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListVirtualMachineTemplates.json */ /** - * Sample code: GuestAgentListByVm. + * Sample code: ListVirtualMachineTemplates. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void guestAgentListByVm(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vMInstanceGuestAgents() - .list( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void + listVirtualMachineTemplates(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineTemplates().list(com.azure.core.util.Context.NONE); } } ``` @@ -1191,41 +1216,34 @@ public final class VMInstanceGuestAgentsListSamples { ### VirtualMachineInstances_CreateOrUpdate ```java -import com.azure.resourcemanager.connectedvmware.fluent.models.VirtualMachineInstanceInner; import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.HardwareProfile; -import com.azure.resourcemanager.connectedvmware.models.InfrastructureProfile; -import com.azure.resourcemanager.connectedvmware.models.PlacementProfile; /** - * Samples for VirtualMachineInstances CreateOrUpdate. + * Samples for Hosts Create. */ -public final class VirtualMachineInstancesCreateOrUpdateSamples { +public final class HostsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateVirtualMachineInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateHost.json */ /** - * Sample code: CreateVirtualMachine. + * Sample code: CreateHost. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .createOrUpdate( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceInner().withExtendedLocation(new ExtendedLocation().withType("customLocation") - .withName( - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withPlacementProfile(new PlacementProfile().withResourcePoolId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool")) - .withHardwareProfile(new HardwareProfile().withMemorySizeMB(4196).withNumCPUs(4)) - .withInfrastructureProfile(new InfrastructureProfile().withTemplateId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate") - .withVCenterId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter")), - com.azure.core.util.Context.NONE); + public static void createHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.hosts() + .define("HRHost") + .withRegion("East US") + .withExistingResourceGroup("testrg") + .withExtendedLocation(new ExtendedLocation().withType("customLocation") + .withName( + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) + .withVCenterId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") + .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") + .create(); } } ``` @@ -1233,25 +1251,34 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { ### VirtualMachineInstances_Delete ```java +import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; + /** - * Samples for VirtualMachineInstances Delete. + * Samples for ResourcePools Create. */ -public final class VirtualMachineInstancesDeleteSamples { +public final class ResourcePoolsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteVirtualMachineInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateResourcePool.json */ /** - * Sample code: DeleteVirtualMachine. + * Sample code: CreateResourcePool. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .delete( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - null, null, com.azure.core.util.Context.NONE); + public static void createResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.resourcePools() + .define("HRPool") + .withRegion("East US") + .withExistingResourceGroup("testrg") + .withExtendedLocation(new ExtendedLocation().withType("customLocation") + .withName( + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) + .withVCenterId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") + .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") + .create(); } } ``` @@ -1260,24 +1287,21 @@ public final class VirtualMachineInstancesDeleteSamples { ```java /** - * Samples for VirtualMachineInstances Get. + * Samples for Hosts List. */ -public final class VirtualMachineInstancesGetSamples { +public final class HostsListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetVirtualMachineInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListHosts.json */ /** - * Sample code: GetVirtualMachine. + * Sample code: ListHosts. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .getWithResponse( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void listHosts(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.hosts().list(com.azure.core.util.Context.NONE); } } ``` @@ -1285,25 +1309,34 @@ public final class VirtualMachineInstancesGetSamples { ### VirtualMachineInstances_List ```java +import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; + /** - * Samples for VirtualMachineInstances List. + * Samples for Datastores Create. */ -public final class VirtualMachineInstancesListSamples { +public final class DatastoresCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListVirtualMachineInstances.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateDatastore.json */ /** - * Sample code: GetVirtualMachine. + * Sample code: CreateDatastore. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .list( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + public static void createDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.datastores() + .define("HRDatastore") + .withRegion("East US") + .withExistingResourceGroup("testrg") + .withExtendedLocation(new ExtendedLocation().withType("customLocation") + .withName( + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) + .withVCenterId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") + .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") + .create(); } } ``` @@ -1312,22 +1345,22 @@ public final class VirtualMachineInstancesListSamples { ```java /** - * Samples for VirtualMachineInstances Restart. + * Samples for VMInstanceGuestAgents List. */ -public final class VirtualMachineInstancesRestartSamples { +public final class VMInstanceGuestAgentsListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * RestartVirtualMachineInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * VMInstanceGuestAgent_ListByVm.json */ /** - * Sample code: RestartVirtualMachine. + * Sample code: GuestAgentListByVm. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void restartVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .restart( + public static void guestAgentListByVm(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vMInstanceGuestAgents() + .list( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); } @@ -1338,22 +1371,22 @@ public final class VirtualMachineInstancesRestartSamples { ```java /** - * Samples for VirtualMachineInstances Start. + * Samples for VMInstanceGuestAgents Delete. */ -public final class VirtualMachineInstancesStartSamples { +public final class VMInstanceGuestAgentsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * StartVirtualMachineInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteVMInstanceGuestAgent.json */ /** - * Sample code: StartVirtualMachine. + * Sample code: DeleteGuestAgent. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void startVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .start( + public static void deleteGuestAgent(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vMInstanceGuestAgents() + .delete( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); } @@ -1363,27 +1396,22 @@ public final class VirtualMachineInstancesStartSamples { ### VirtualMachineInstances_Stop ```java -import com.azure.resourcemanager.connectedvmware.models.StopVirtualMachineOptions; - /** - * Samples for VirtualMachineInstances Stop. + * Samples for VirtualNetworks Delete. */ -public final class VirtualMachineInstancesStopSamples { +public final class VirtualNetworksDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * StopVirtualMachineInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteVirtualNetwork.json */ /** - * Sample code: StopVirtualMachine. + * Sample code: DeleteVirtualNetwork. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void stopVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .stop( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - new StopVirtualMachineOptions().withSkipShutdown(true), com.azure.core.util.Context.NONE); + public static void deleteVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualNetworks().delete("testrg", "ProdNetwork", null, com.azure.core.util.Context.NONE); } } ``` @@ -1391,30 +1419,42 @@ public final class VirtualMachineInstancesStopSamples { ### VirtualMachineInstances_Update ```java -import com.azure.resourcemanager.connectedvmware.models.HardwareProfile; -import com.azure.resourcemanager.connectedvmware.models.VirtualMachineInstanceUpdate; +import com.azure.resourcemanager.connectedvmware.models.VirtualMachineTemplate; +import java.util.HashMap; +import java.util.Map; /** - * Samples for VirtualMachineInstances Update. + * Samples for VirtualMachineTemplates Update. */ -public final class VirtualMachineInstancesUpdateSamples { +public final class VirtualMachineTemplatesUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateVirtualMachineInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateVirtualMachineTemplate.json */ /** - * Sample code: UpdateVirtualMachine. + * Sample code: UpdateVirtualMachineTemplate. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void updateVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineInstances() - .update( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - new VirtualMachineInstanceUpdate().withHardwareProfile( - new HardwareProfile().withMemorySizeMB(4196).withNumCPUs(4)), - com.azure.core.util.Context.NONE); + public static void + updateVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + VirtualMachineTemplate resource = manager.virtualMachineTemplates() + .getByResourceGroupWithResponse("testrg", "WebFrontEndTemplate", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -1422,35 +1462,23 @@ public final class VirtualMachineInstancesUpdateSamples { ### VirtualMachineTemplates_Create ```java -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; - /** - * Samples for VirtualMachineTemplates Create. + * Samples for InventoryItems Delete. */ -public final class VirtualMachineTemplatesCreateSamples { +public final class InventoryItemsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateVirtualMachineTemplate.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteInventoryItem.json */ /** - * Sample code: CreateVirtualMachineTemplate. + * Sample code: DeleteInventoryItem. * * @param manager Entry point to ConnectedVMwareManager. - */ - public static void - createVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineTemplates() - .define("WebFrontEndTemplate") - .withRegion("East US") - .withExistingResourceGroup("testrg") - .withExtendedLocation(new ExtendedLocation().withType("customLocation") - .withName( - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withVCenterId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") - .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") - .create(); + */ + public static void deleteInventoryItem(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.inventoryItems() + .deleteWithResponse("testrg", "ContosoVCenter", "testItem", com.azure.core.util.Context.NONE); } } ``` @@ -1458,24 +1486,34 @@ public final class VirtualMachineTemplatesCreateSamples { ### VirtualMachineTemplates_Delete ```java +import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; + /** - * Samples for VirtualMachineTemplates Delete. + * Samples for Clusters Create. */ -public final class VirtualMachineTemplatesDeleteSamples { +public final class ClustersCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteVirtualMachineTemplate.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * CreateCluster.json */ /** - * Sample code: DeleteVirtualMachineTemplate. + * Sample code: CreateCluster. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void - deleteVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineTemplates() - .delete("testrg", "WebFrontEndTemplate", null, com.azure.core.util.Context.NONE); + public static void createCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.clusters() + .define("HRCluster") + .withRegion("East US") + .withExistingResourceGroup("testrg") + .withExtendedLocation(new ExtendedLocation().withType("customLocation") + .withName( + "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) + .withVCenterId( + "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") + .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") + .create(); } } ``` @@ -1484,23 +1522,22 @@ public final class VirtualMachineTemplatesDeleteSamples { ```java /** - * Samples for VirtualMachineTemplates GetByResourceGroup. + * Samples for InventoryItems ListByVCenter. */ -public final class VirtualMachineTemplatesGetByResourceGroupSamples { +public final class InventoryItemsListByVCenterSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetVirtualMachineTemplate.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * InventoryItems_ListByVCenter.json */ /** - * Sample code: GetVirtualMachineTemplate. + * Sample code: InventoryItemsListByVCenter. * * @param manager Entry point to ConnectedVMwareManager. */ public static void - getVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineTemplates() - .getByResourceGroupWithResponse("testrg", "WebFrontEndTemplate", com.azure.core.util.Context.NONE); + inventoryItemsListByVCenter(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.inventoryItems().listByVCenter("testrg", "ContosoVCenter", com.azure.core.util.Context.NONE); } } ``` @@ -1509,22 +1546,22 @@ public final class VirtualMachineTemplatesGetByResourceGroupSamples { ```java /** - * Samples for VirtualMachineTemplates List. + * Samples for VCenters ListByResourceGroup. */ -public final class VirtualMachineTemplatesListSamples { +public final class VCentersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListVirtualMachineTemplates.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListVCentersByResourceGroup.json */ /** - * Sample code: ListVirtualMachineTemplates. + * Sample code: ListVCentersByResourceGroup. * * @param manager Entry point to ConnectedVMwareManager. */ public static void - listVirtualMachineTemplates(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineTemplates().list(com.azure.core.util.Context.NONE); + listVCentersByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vCenters().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); } } ``` @@ -1533,22 +1570,21 @@ public final class VirtualMachineTemplatesListSamples { ```java /** - * Samples for VirtualMachineTemplates ListByResourceGroup. + * Samples for Clusters List. */ -public final class VirtualMachineTemplatesListByResourceGroupSamples { +public final class ClustersListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListVirtualMachineTemplatesByResourceGroup.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListClusters.json */ /** - * Sample code: ListVirtualMachineTemplatesByResourceGroup. + * Sample code: ListClusters. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void listVirtualMachineTemplatesByResourceGroup( - com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualMachineTemplates().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + public static void listClusters(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.clusters().list(com.azure.core.util.Context.NONE); } } ``` @@ -1556,42 +1592,22 @@ public final class VirtualMachineTemplatesListByResourceGroupSamples { ### VirtualMachineTemplates_Update ```java -import com.azure.resourcemanager.connectedvmware.models.VirtualMachineTemplate; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for VirtualMachineTemplates Update. + * Samples for Hosts GetByResourceGroup. */ -public final class VirtualMachineTemplatesUpdateSamples { +public final class HostsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateVirtualMachineTemplate.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetHost.json */ /** - * Sample code: UpdateVirtualMachineTemplate. + * Sample code: GetHost. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void - updateVirtualMachineTemplate(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - VirtualMachineTemplate resource = manager.virtualMachineTemplates() - .getByResourceGroupWithResponse("testrg", "WebFrontEndTemplate", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void getHost(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.hosts().getByResourceGroupWithResponse("testrg", "HRHost", com.azure.core.util.Context.NONE); } } ``` @@ -1599,34 +1615,22 @@ public final class VirtualMachineTemplatesUpdateSamples { ### VirtualNetworks_Create ```java -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; - /** - * Samples for VirtualNetworks Create. + * Samples for Clusters Delete. */ -public final class VirtualNetworksCreateSamples { +public final class ClustersDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * CreateVirtualNetwork.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteCluster.json */ /** - * Sample code: CreateVirtualNetwork. + * Sample code: DeleteCluster. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void createVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualNetworks() - .define("ProdNetwork") - .withRegion("East US") - .withExistingResourceGroup("testrg") - .withExtendedLocation(new ExtendedLocation().withType("customLocation") - .withName( - "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")) - .withVCenterId( - "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter") - .withMoRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee") - .create(); + public static void deleteCluster(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.clusters().delete("testrg", "HRCluster", null, com.azure.core.util.Context.NONE); } } ``` @@ -1635,21 +1639,21 @@ public final class VirtualNetworksCreateSamples { ```java /** - * Samples for VirtualNetworks Delete. + * Samples for VCenters List. */ -public final class VirtualNetworksDeleteSamples { +public final class VCentersListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * DeleteVirtualNetwork.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListVCenters.json */ /** - * Sample code: DeleteVirtualNetwork. + * Sample code: ListVCenters. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void deleteVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualNetworks().delete("testrg", "ProdNetwork", null, com.azure.core.util.Context.NONE); + public static void listVCenters(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.vCenters().list(com.azure.core.util.Context.NONE); } } ``` @@ -1658,22 +1662,22 @@ public final class VirtualNetworksDeleteSamples { ```java /** - * Samples for VirtualNetworks GetByResourceGroup. + * Samples for VirtualMachineTemplates ListByResourceGroup. */ -public final class VirtualNetworksGetByResourceGroupSamples { +public final class VirtualMachineTemplatesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetVirtualNetwork.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListVirtualMachineTemplatesByResourceGroup.json */ /** - * Sample code: GetVirtualNetwork. + * Sample code: ListVirtualMachineTemplatesByResourceGroup. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void getVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualNetworks() - .getByResourceGroupWithResponse("testrg", "ProdNetwork", com.azure.core.util.Context.NONE); + public static void listVirtualMachineTemplatesByResourceGroup( + com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineTemplates().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); } } ``` @@ -1682,73 +1686,50 @@ public final class VirtualNetworksGetByResourceGroupSamples { ```java /** - * Samples for VirtualNetworks List. - */ -public final class VirtualNetworksListSamples { - /* - * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListVirtualNetworks.json - */ - /** - * Sample code: ListVirtualNetworks. - * - * @param manager Entry point to ConnectedVMwareManager. - */ - public static void listVirtualNetworks(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualNetworks().list(com.azure.core.util.Context.NONE); - } -} -``` - -### VirtualNetworks_ListByResourceGroup - -```java -/** - * Samples for VirtualNetworks ListByResourceGroup. + * Samples for Hosts ListByResourceGroup. */ -public final class VirtualNetworksListByResourceGroupSamples { +public final class HostsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * ListVirtualNetworksByResourceGroup.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListHostsByResourceGroup.json */ /** - * Sample code: ListVirtualNetworksByResourceGroup. + * Sample code: ListHostsByResourceGroup. * * @param manager Entry point to ConnectedVMwareManager. */ public static void - listVirtualNetworksByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.virtualNetworks().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + listHostsByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.hosts().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); } } ``` -### VirtualNetworks_Update +### VirtualNetworks_ListByResourceGroup ```java -import com.azure.resourcemanager.connectedvmware.models.VirtualNetwork; +import com.azure.resourcemanager.connectedvmware.models.ResourcePool; import java.util.HashMap; import java.util.Map; /** - * Samples for VirtualNetworks Update. + * Samples for ResourcePools Update. */ -public final class VirtualNetworksUpdateSamples { +public final class ResourcePoolsUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * UpdateVirtualNetwork.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * UpdateResourcePool.json */ /** - * Sample code: UpdateVirtualNetwork. + * Sample code: UpdateResourcePool. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void updateVirtualNetwork(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - VirtualNetwork resource = manager.virtualNetworks() - .getByResourceGroupWithResponse("testrg", "ProdNetwork", com.azure.core.util.Context.NONE) + public static void updateResourcePool(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + ResourcePool resource = manager.resourcePools() + .getByResourceGroupWithResponse("testrg", "HRPool", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -1767,26 +1748,25 @@ public final class VirtualNetworksUpdateSamples { } ``` -### VmInstanceHybridIdentityMetadata_Get +### VirtualNetworks_Update ```java /** - * Samples for VmInstanceHybridIdentityMetadata Get. + * Samples for VirtualMachineInstances Get. */ -public final class VmInstanceHybridIdentityMetadataGetSamples { +public final class VirtualMachineInstancesGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * GetVmInstanceHybridIdentityMetadata.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * GetVirtualMachineInstance.json */ /** - * Sample code: GetHybridIdentityMetadata. + * Sample code: GetVirtualMachine. * * @param manager Entry point to ConnectedVMwareManager. */ - public static void - getHybridIdentityMetadata(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vmInstanceHybridIdentityMetadatas() + public static void getVirtualMachine(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.virtualMachineInstances() .getWithResponse( "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", com.azure.core.util.Context.NONE); @@ -1794,29 +1774,49 @@ public final class VmInstanceHybridIdentityMetadataGetSamples { } ``` -### VmInstanceHybridIdentityMetadata_List +### VmInstanceHybridIdentityMetadata_Get ```java /** - * Samples for VmInstanceHybridIdentityMetadata List. + * Samples for Clusters ListByResourceGroup. */ -public final class VmInstanceHybridIdentityMetadataListSamples { +public final class ClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ - * HybridIdentityMetadata_ListByVmInstance.json + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * ListClustersByResourceGroup.json */ /** - * Sample code: HybridIdentityMetadataListByVm. + * Sample code: ListClustersByResourceGroup. * * @param manager Entry point to ConnectedVMwareManager. */ public static void - hybridIdentityMetadataListByVm(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { - manager.vmInstanceHybridIdentityMetadatas() - .list( - "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM", - com.azure.core.util.Context.NONE); + listClustersByResourceGroup(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.clusters().listByResourceGroup("testrg", com.azure.core.util.Context.NONE); + } +} +``` + +### VmInstanceHybridIdentityMetadata_List + +```java +/** + * Samples for Datastores Delete. + */ +public final class DatastoresDeleteSamples { + /* + * x-ms-original-file: + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ + * DeleteDatastore.json + */ + /** + * Sample code: DeleteDatastore. + * + * @param manager Entry point to ConnectedVMwareManager. + */ + public static void deleteDatastore(com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager manager) { + manager.datastores().delete("testrg", "HRDatastore", null, com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/pom.xml b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/pom.xml index 97d41c85b149..3322f87ef308 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/pom.xml +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for ConnectedVMware Management - This package contains Microsoft Azure SDK for ConnectedVMware Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Connected VMware Client. Package tag package-2023-10. + This package contains Microsoft Azure SDK for ConnectedVMware Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Connected VMware Client. Package tag package-2023-12. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/ConnectedVMwareManager.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/ConnectedVMwareManager.java index 1f382441a03e..4a52ea94c09c 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/ConnectedVMwareManager.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/ConnectedVMwareManager.java @@ -22,6 +22,7 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.connectedvmware.fluent.ConnectedVMwareClient; import com.azure.resourcemanager.connectedvmware.implementation.ClustersImpl; @@ -53,6 +54,7 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -137,6 +139,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-connectedvmware.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -244,12 +249,14 @@ public ConnectedVMwareManager authenticate(TokenCredential credential, AzureProf Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.connectedvmware") .append("/") - .append("1.1.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/implementation/ConnectedVMwareClientImpl.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/implementation/ConnectedVMwareClientImpl.java index 93a8f5647e7e..62a678b882ae 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/implementation/ConnectedVMwareClientImpl.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/implementation/ConnectedVMwareClientImpl.java @@ -319,7 +319,7 @@ public VMInstanceGuestAgentsClient getVMInstanceGuestAgents() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-10-01"; + this.apiVersion = "2023-12-01"; this.operations = new OperationsClientImpl(this); this.resourcePools = new ResourcePoolsClientImpl(this); this.clusters = new ClustersClientImpl(this); diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/GuestCredential.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/GuestCredential.java index 7268b95a9a20..6d39b9dea0c4 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/GuestCredential.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/GuestCredential.java @@ -26,6 +26,11 @@ public final class GuestCredential implements JsonSerializable */ private String password; + /* + * Private key used to authenticate to a virtual machine through ssh. + */ + private String privateKey; + /** * Creates an instance of GuestCredential class. */ @@ -72,6 +77,26 @@ public GuestCredential withPassword(String password) { return this; } + /** + * Get the privateKey property: Private key used to authenticate to a virtual machine through ssh. + * + * @return the privateKey value. + */ + public String privateKey() { + return this.privateKey; + } + + /** + * Set the privateKey property: Private key used to authenticate to a virtual machine through ssh. + * + * @param privateKey the privateKey value to set. + * @return the GuestCredential object itself. + */ + public GuestCredential withPrivateKey(String privateKey) { + this.privateKey = privateKey; + return this; + } + /** * Validates the instance. * @@ -88,6 +113,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("username", this.username); jsonWriter.writeStringField("password", this.password); + jsonWriter.writeStringField("privateKey", this.privateKey); return jsonWriter.writeEndObject(); } @@ -110,6 +136,8 @@ public static GuestCredential fromJson(JsonReader jsonReader) throws IOException deserializedGuestCredential.username = reader.getString(); } else if ("password".equals(fieldName)) { deserializedGuestCredential.password = reader.getString(); + } else if ("privateKey".equals(fieldName)) { + deserializedGuestCredential.privateKey = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/HostInventoryItem.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/HostInventoryItem.java index 02c25962c947..9ac31b5a1d0b 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/HostInventoryItem.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/HostInventoryItem.java @@ -25,6 +25,36 @@ public final class HostInventoryItem extends InventoryItemProperties { */ private InventoryItemDetails parent; + /* + * Gets or sets the number of cores per socket on the host. + */ + private Integer numCoresPerSocket; + + /* + * Gets or sets the number of sockets on the host. + */ + private Integer numSockets; + + /* + * Gets or sets the version of the host. + */ + private String version; + + /* + * Gets or sets the cpu model of the host. + */ + private String cpuModel; + + /* + * Gets the total amount of physical memory on the host in GB. + */ + private Long memorySizeGB; + + /* + * Gets or sets the power state of the host. + */ + private String powerState; + /** * Creates an instance of HostInventoryItem class. */ @@ -61,6 +91,60 @@ public HostInventoryItem withParent(InventoryItemDetails parent) { return this; } + /** + * Get the numCoresPerSocket property: Gets or sets the number of cores per socket on the host. + * + * @return the numCoresPerSocket value. + */ + public Integer numCoresPerSocket() { + return this.numCoresPerSocket; + } + + /** + * Get the numSockets property: Gets or sets the number of sockets on the host. + * + * @return the numSockets value. + */ + public Integer numSockets() { + return this.numSockets; + } + + /** + * Get the version property: Gets or sets the version of the host. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Get the cpuModel property: Gets or sets the cpu model of the host. + * + * @return the cpuModel value. + */ + public String cpuModel() { + return this.cpuModel; + } + + /** + * Get the memorySizeGB property: Gets the total amount of physical memory on the host in GB. + * + * @return the memorySizeGB value. + */ + public Long memorySizeGB() { + return this.memorySizeGB; + } + + /** + * Get the powerState property: Gets or sets the power state of the host. + * + * @return the powerState value. + */ + public String powerState() { + return this.powerState; + } + /** * {@inheritDoc} */ @@ -142,6 +226,18 @@ public static HostInventoryItem fromJson(JsonReader jsonReader) throws IOExcepti deserializedHostInventoryItem.inventoryType = InventoryType.fromString(reader.getString()); } else if ("parent".equals(fieldName)) { deserializedHostInventoryItem.parent = InventoryItemDetails.fromJson(reader); + } else if ("numCoresPerSocket".equals(fieldName)) { + deserializedHostInventoryItem.numCoresPerSocket = reader.getNullable(JsonReader::getInt); + } else if ("numSockets".equals(fieldName)) { + deserializedHostInventoryItem.numSockets = reader.getNullable(JsonReader::getInt); + } else if ("version".equals(fieldName)) { + deserializedHostInventoryItem.version = reader.getString(); + } else if ("cpuModel".equals(fieldName)) { + deserializedHostInventoryItem.cpuModel = reader.getString(); + } else if ("memorySizeGB".equals(fieldName)) { + deserializedHostInventoryItem.memorySizeGB = reader.getNullable(JsonReader::getLong); + } else if ("powerState".equals(fieldName)) { + deserializedHostInventoryItem.powerState = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/NetworkInterfaceInventory.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/NetworkInterfaceInventory.java new file mode 100644 index 000000000000..e39d42192ef9 --- /dev/null +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/NetworkInterfaceInventory.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.connectedvmware.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Inventory Network Interface model. + */ +@Immutable +public final class NetworkInterfaceInventory implements JsonSerializable { + /* + * Gets or sets the label of the virtual network in vCenter that the nic is connected to. + */ + private String label; + + /* + * Gets or sets the nic ip addresses. + */ + private List ipAddresses; + + /* + * Gets or sets the NIC MAC address. + */ + private String macAddress; + + /* + * NIC type + */ + private NicType nicType; + + /* + * Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual network + * that the nic is connected to. + */ + private String networkMoRefId; + + /* + * Gets or sets the name of the virtual network in vCenter that the nic is connected to. + */ + private String networkMoName; + + /* + * Gets or sets the device key value. + */ + private Integer deviceKey; + + /** + * Creates an instance of NetworkInterfaceInventory class. + */ + public NetworkInterfaceInventory() { + } + + /** + * Get the label property: Gets or sets the label of the virtual network in vCenter that the nic is connected to. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Get the ipAddresses property: Gets or sets the nic ip addresses. + * + * @return the ipAddresses value. + */ + public List ipAddresses() { + return this.ipAddresses; + } + + /** + * Get the macAddress property: Gets or sets the NIC MAC address. + * + * @return the macAddress value. + */ + public String macAddress() { + return this.macAddress; + } + + /** + * Get the nicType property: NIC type. + * + * @return the nicType value. + */ + public NicType nicType() { + return this.nicType; + } + + /** + * Get the networkMoRefId property: Gets or sets the vCenter MoRef (Managed Object Reference) ID of the virtual + * network + * that the nic is connected to. + * + * @return the networkMoRefId value. + */ + public String networkMoRefId() { + return this.networkMoRefId; + } + + /** + * Get the networkMoName property: Gets or sets the name of the virtual network in vCenter that the nic is connected + * to. + * + * @return the networkMoName value. + */ + public String networkMoName() { + return this.networkMoName; + } + + /** + * Get the deviceKey property: Gets or sets the device key value. + * + * @return the deviceKey value. + */ + public Integer deviceKey() { + return this.deviceKey; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkInterfaceInventory from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkInterfaceInventory if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkInterfaceInventory. + */ + public static NetworkInterfaceInventory fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkInterfaceInventory deserializedNetworkInterfaceInventory = new NetworkInterfaceInventory(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("label".equals(fieldName)) { + deserializedNetworkInterfaceInventory.label = reader.getString(); + } else if ("ipAddresses".equals(fieldName)) { + List ipAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedNetworkInterfaceInventory.ipAddresses = ipAddresses; + } else if ("macAddress".equals(fieldName)) { + deserializedNetworkInterfaceInventory.macAddress = reader.getString(); + } else if ("nicType".equals(fieldName)) { + deserializedNetworkInterfaceInventory.nicType = NicType.fromString(reader.getString()); + } else if ("networkMoRefId".equals(fieldName)) { + deserializedNetworkInterfaceInventory.networkMoRefId = reader.getString(); + } else if ("networkMoName".equals(fieldName)) { + deserializedNetworkInterfaceInventory.networkMoName = reader.getString(); + } else if ("deviceKey".equals(fieldName)) { + deserializedNetworkInterfaceInventory.deviceKey = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkInterfaceInventory; + }); + } +} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/NetworkProfileInventory.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/NetworkProfileInventory.java new file mode 100644 index 000000000000..230a317c23d2 --- /dev/null +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/NetworkProfileInventory.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.connectedvmware.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Specifies the network interfaces of the virtual machine. + */ +@Fluent +public final class NetworkProfileInventory implements JsonSerializable { + /* + * Gets or sets the list of network interfaces associated with the virtual machine. + */ + private List networkInterfaces; + + /** + * Creates an instance of NetworkProfileInventory class. + */ + public NetworkProfileInventory() { + } + + /** + * Get the networkInterfaces property: Gets or sets the list of network interfaces associated with the virtual + * machine. + * + * @return the networkInterfaces value. + */ + public List networkInterfaces() { + return this.networkInterfaces; + } + + /** + * Set the networkInterfaces property: Gets or sets the list of network interfaces associated with the virtual + * machine. + * + * @param networkInterfaces the networkInterfaces value to set. + * @return the NetworkProfileInventory object itself. + */ + public NetworkProfileInventory withNetworkInterfaces(List networkInterfaces) { + this.networkInterfaces = networkInterfaces; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (networkInterfaces() != null) { + networkInterfaces().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("networkInterfaces", this.networkInterfaces, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkProfileInventory from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkProfileInventory if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkProfileInventory. + */ + public static NetworkProfileInventory fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkProfileInventory deserializedNetworkProfileInventory = new NetworkProfileInventory(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("networkInterfaces".equals(fieldName)) { + List networkInterfaces + = reader.readArray(reader1 -> NetworkInterfaceInventory.fromJson(reader1)); + deserializedNetworkProfileInventory.networkInterfaces = networkInterfaces; + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkProfileInventory; + }); + } +} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/OsProfileForVMInstance.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/OsProfileForVMInstance.java index 7a40dd1e4db9..6dfb7e8f95a5 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/OsProfileForVMInstance.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/OsProfileForVMInstance.java @@ -61,6 +61,11 @@ public final class OsProfileForVMInstance implements JsonSerializable { + /* + * Gets or sets the list of virtual disks associated with the virtual machine. + */ + private List disks; + + /** + * Creates an instance of StorageProfileInventory class. + */ + public StorageProfileInventory() { + } + + /** + * Get the disks property: Gets or sets the list of virtual disks associated with the virtual machine. + * + * @return the disks value. + */ + public List disks() { + return this.disks; + } + + /** + * Set the disks property: Gets or sets the list of virtual disks associated with the virtual machine. + * + * @param disks the disks value to set. + * @return the StorageProfileInventory object itself. + */ + public StorageProfileInventory withDisks(List disks) { + this.disks = disks; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (disks() != null) { + disks().forEach(e -> e.validate()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("disks", this.disks, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StorageProfileInventory from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StorageProfileInventory if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the StorageProfileInventory. + */ + public static StorageProfileInventory fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StorageProfileInventory deserializedStorageProfileInventory = new StorageProfileInventory(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("disks".equals(fieldName)) { + List disks + = reader.readArray(reader1 -> VirtualDiskInventory.fromJson(reader1)); + deserializedStorageProfileInventory.disks = disks; + } else { + reader.skipChildren(); + } + } + + return deserializedStorageProfileInventory; + }); + } +} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/VirtualDiskInventory.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/VirtualDiskInventory.java new file mode 100644 index 000000000000..670707756d11 --- /dev/null +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/VirtualDiskInventory.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.connectedvmware.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Virtual disk model. + */ +@Fluent +public final class VirtualDiskInventory implements JsonSerializable { + /* + * Gets or sets the name of the virtual disk. + */ + private String diskName; + + /* + * Gets or sets the label of the virtual disk in vCenter. + */ + private String label; + + /* + * Gets or sets the disk total size. + */ + private Integer diskSizeGB; + + /* + * Gets or sets the device key value. + */ + private Integer deviceKey; + + /* + * Gets or sets the disk mode. + */ + private DiskMode diskMode; + + /* + * Gets or sets the controller id. + */ + private Integer controllerKey; + + /* + * Gets or sets the unit number of the disk on the controller. + */ + private Integer unitNumber; + + /* + * Gets or sets the device name. + */ + private String deviceName; + + /* + * Gets or sets the disk file name. + */ + private String fileName; + + /* + * Gets or sets the disk backing type. + */ + private DiskType diskType; + + /* + * Gets or sets the eagerly scrub property of disk. + */ + private Boolean eagerlyScrub; + + /* + * Gets or sets the thin provisioning property of disk. + */ + private Boolean thinProvisioned; + + /* + * Gets or sets the controller type. + */ + private String controllerType; + + /* + * Gets or sets a unique identifier for this resource. + */ + private String uuid; + + /** + * Creates an instance of VirtualDiskInventory class. + */ + public VirtualDiskInventory() { + } + + /** + * Get the diskName property: Gets or sets the name of the virtual disk. + * + * @return the diskName value. + */ + public String diskName() { + return this.diskName; + } + + /** + * Set the diskName property: Gets or sets the name of the virtual disk. + * + * @param diskName the diskName value to set. + * @return the VirtualDiskInventory object itself. + */ + public VirtualDiskInventory withDiskName(String diskName) { + this.diskName = diskName; + return this; + } + + /** + * Get the label property: Gets or sets the label of the virtual disk in vCenter. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Get the diskSizeGB property: Gets or sets the disk total size. + * + * @return the diskSizeGB value. + */ + public Integer diskSizeGB() { + return this.diskSizeGB; + } + + /** + * Get the deviceKey property: Gets or sets the device key value. + * + * @return the deviceKey value. + */ + public Integer deviceKey() { + return this.deviceKey; + } + + /** + * Get the diskMode property: Gets or sets the disk mode. + * + * @return the diskMode value. + */ + public DiskMode diskMode() { + return this.diskMode; + } + + /** + * Get the controllerKey property: Gets or sets the controller id. + * + * @return the controllerKey value. + */ + public Integer controllerKey() { + return this.controllerKey; + } + + /** + * Get the unitNumber property: Gets or sets the unit number of the disk on the controller. + * + * @return the unitNumber value. + */ + public Integer unitNumber() { + return this.unitNumber; + } + + /** + * Get the deviceName property: Gets or sets the device name. + * + * @return the deviceName value. + */ + public String deviceName() { + return this.deviceName; + } + + /** + * Get the fileName property: Gets or sets the disk file name. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Get the diskType property: Gets or sets the disk backing type. + * + * @return the diskType value. + */ + public DiskType diskType() { + return this.diskType; + } + + /** + * Get the eagerlyScrub property: Gets or sets the eagerly scrub property of disk. + * + * @return the eagerlyScrub value. + */ + public Boolean eagerlyScrub() { + return this.eagerlyScrub; + } + + /** + * Get the thinProvisioned property: Gets or sets the thin provisioning property of disk. + * + * @return the thinProvisioned value. + */ + public Boolean thinProvisioned() { + return this.thinProvisioned; + } + + /** + * Get the controllerType property: Gets or sets the controller type. + * + * @return the controllerType value. + */ + public String controllerType() { + return this.controllerType; + } + + /** + * Get the uuid property: Gets or sets a unique identifier for this resource. + * + * @return the uuid value. + */ + public String uuid() { + return this.uuid; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("diskName", this.diskName); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of VirtualDiskInventory from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of VirtualDiskInventory if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the VirtualDiskInventory. + */ + public static VirtualDiskInventory fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + VirtualDiskInventory deserializedVirtualDiskInventory = new VirtualDiskInventory(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("diskName".equals(fieldName)) { + deserializedVirtualDiskInventory.diskName = reader.getString(); + } else if ("label".equals(fieldName)) { + deserializedVirtualDiskInventory.label = reader.getString(); + } else if ("diskSizeGB".equals(fieldName)) { + deserializedVirtualDiskInventory.diskSizeGB = reader.getNullable(JsonReader::getInt); + } else if ("deviceKey".equals(fieldName)) { + deserializedVirtualDiskInventory.deviceKey = reader.getNullable(JsonReader::getInt); + } else if ("diskMode".equals(fieldName)) { + deserializedVirtualDiskInventory.diskMode = DiskMode.fromString(reader.getString()); + } else if ("controllerKey".equals(fieldName)) { + deserializedVirtualDiskInventory.controllerKey = reader.getNullable(JsonReader::getInt); + } else if ("unitNumber".equals(fieldName)) { + deserializedVirtualDiskInventory.unitNumber = reader.getNullable(JsonReader::getInt); + } else if ("deviceName".equals(fieldName)) { + deserializedVirtualDiskInventory.deviceName = reader.getString(); + } else if ("fileName".equals(fieldName)) { + deserializedVirtualDiskInventory.fileName = reader.getString(); + } else if ("diskType".equals(fieldName)) { + deserializedVirtualDiskInventory.diskType = DiskType.fromString(reader.getString()); + } else if ("eagerlyScrub".equals(fieldName)) { + deserializedVirtualDiskInventory.eagerlyScrub = reader.getNullable(JsonReader::getBoolean); + } else if ("thinProvisioned".equals(fieldName)) { + deserializedVirtualDiskInventory.thinProvisioned = reader.getNullable(JsonReader::getBoolean); + } else if ("controllerType".equals(fieldName)) { + deserializedVirtualDiskInventory.controllerType = reader.getString(); + } else if ("uuid".equals(fieldName)) { + deserializedVirtualDiskInventory.uuid = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedVirtualDiskInventory; + }); + } +} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/VirtualMachineInventoryItem.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/VirtualMachineInventoryItem.java index 5b680e8eb8c4..55eebdb7fdc1 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/VirtualMachineInventoryItem.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/VirtualMachineInventoryItem.java @@ -86,6 +86,61 @@ public final class VirtualMachineInventoryItem extends InventoryItemProperties { */ private String toolsVersion; + /* + * Firmware type + */ + private FirmwareType firmwareType; + + /* + * Gets a value indicating whether change tracking is supported. + */ + private Boolean changeTrackingSupported; + + /* + * Gets a value indicating whether change tracking is enabled. + */ + private Boolean changeTrackingEnabled; + + /* + * Gets a value indicating the maximum possible number of snapshots. + */ + private Integer maxSnapshots; + + /* + * Gets a value indicating the number of snapshots on the vm. + */ + private Integer numberOfSnapshots; + + /* + * Gets or sets the disk Enabled UUID of the vm. + */ + private String diskEnabledUuid; + + /* + * Gets the computer name. + */ + private String computerName; + + /* + * Gets or sets memory size in MBs for the vm. + */ + private Integer memorySizeMB; + + /* + * Gets or sets the number of vCPU for the vm. + */ + private Integer numCPUs; + + /* + * Storage properties. + */ + private StorageProfileInventory storageProfile; + + /* + * Network properties. + */ + private NetworkProfileInventory networkProfile; + /** * Creates an instance of VirtualMachineInventoryItem class. */ @@ -320,6 +375,127 @@ public String toolsVersion() { return this.toolsVersion; } + /** + * Get the firmwareType property: Firmware type. + * + * @return the firmwareType value. + */ + public FirmwareType firmwareType() { + return this.firmwareType; + } + + /** + * Get the changeTrackingSupported property: Gets a value indicating whether change tracking is supported. + * + * @return the changeTrackingSupported value. + */ + public Boolean changeTrackingSupported() { + return this.changeTrackingSupported; + } + + /** + * Get the changeTrackingEnabled property: Gets a value indicating whether change tracking is enabled. + * + * @return the changeTrackingEnabled value. + */ + public Boolean changeTrackingEnabled() { + return this.changeTrackingEnabled; + } + + /** + * Get the maxSnapshots property: Gets a value indicating the maximum possible number of snapshots. + * + * @return the maxSnapshots value. + */ + public Integer maxSnapshots() { + return this.maxSnapshots; + } + + /** + * Get the numberOfSnapshots property: Gets a value indicating the number of snapshots on the vm. + * + * @return the numberOfSnapshots value. + */ + public Integer numberOfSnapshots() { + return this.numberOfSnapshots; + } + + /** + * Get the diskEnabledUuid property: Gets or sets the disk Enabled UUID of the vm. + * + * @return the diskEnabledUuid value. + */ + public String diskEnabledUuid() { + return this.diskEnabledUuid; + } + + /** + * Get the computerName property: Gets the computer name. + * + * @return the computerName value. + */ + public String computerName() { + return this.computerName; + } + + /** + * Get the memorySizeMB property: Gets or sets memory size in MBs for the vm. + * + * @return the memorySizeMB value. + */ + public Integer memorySizeMB() { + return this.memorySizeMB; + } + + /** + * Get the numCPUs property: Gets or sets the number of vCPU for the vm. + * + * @return the numCPUs value. + */ + public Integer numCPUs() { + return this.numCPUs; + } + + /** + * Get the storageProfile property: Storage properties. + * + * @return the storageProfile value. + */ + public StorageProfileInventory storageProfile() { + return this.storageProfile; + } + + /** + * Set the storageProfile property: Storage properties. + * + * @param storageProfile the storageProfile value to set. + * @return the VirtualMachineInventoryItem object itself. + */ + public VirtualMachineInventoryItem withStorageProfile(StorageProfileInventory storageProfile) { + this.storageProfile = storageProfile; + return this; + } + + /** + * Get the networkProfile property: Network properties. + * + * @return the networkProfile value. + */ + public NetworkProfileInventory networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Network properties. + * + * @param networkProfile the networkProfile value to set. + * @return the VirtualMachineInventoryItem object itself. + */ + public VirtualMachineInventoryItem withNetworkProfile(NetworkProfileInventory networkProfile) { + this.networkProfile = networkProfile; + return this; + } + /** * {@inheritDoc} */ @@ -363,6 +539,12 @@ public void validate() { if (cluster() != null) { cluster().validate(); } + if (storageProfile() != null) { + storageProfile().validate(); + } + if (networkProfile() != null) { + networkProfile().validate(); + } } /** @@ -384,6 +566,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("cluster", this.cluster); jsonWriter.writeStringField("instanceUuid", this.instanceUuid); jsonWriter.writeStringField("smbiosUuid", this.smbiosUuid); + jsonWriter.writeJsonField("storageProfile", this.storageProfile); + jsonWriter.writeJsonField("networkProfile", this.networkProfile); return jsonWriter.writeEndObject(); } @@ -441,6 +625,30 @@ public static VirtualMachineInventoryItem fromJson(JsonReader jsonReader) throws deserializedVirtualMachineInventoryItem.toolsVersionStatus = reader.getString(); } else if ("toolsVersion".equals(fieldName)) { deserializedVirtualMachineInventoryItem.toolsVersion = reader.getString(); + } else if ("firmwareType".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.firmwareType = FirmwareType.fromString(reader.getString()); + } else if ("changeTrackingSupported".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.changeTrackingSupported + = reader.getNullable(JsonReader::getBoolean); + } else if ("changeTrackingEnabled".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.changeTrackingEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("maxSnapshots".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.maxSnapshots = reader.getNullable(JsonReader::getInt); + } else if ("numberOfSnapshots".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.numberOfSnapshots = reader.getNullable(JsonReader::getInt); + } else if ("diskEnabledUuid".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.diskEnabledUuid = reader.getString(); + } else if ("computerName".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.computerName = reader.getString(); + } else if ("memorySizeMB".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.memorySizeMB = reader.getNullable(JsonReader::getInt); + } else if ("numCPUs".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.numCPUs = reader.getNullable(JsonReader::getInt); + } else if ("storageProfile".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.storageProfile = StorageProfileInventory.fromJson(reader); + } else if ("networkProfile".equals(fieldName)) { + deserializedVirtualMachineInventoryItem.networkProfile = NetworkProfileInventory.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/WindowsConfiguration.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/WindowsConfiguration.java new file mode 100644 index 000000000000..55283115338d --- /dev/null +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/java/com/azure/resourcemanager/connectedvmware/models/WindowsConfiguration.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.connectedvmware.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Specifies the Windows Configuration settings for the virtual machine. + */ +@Fluent +public final class WindowsConfiguration implements JsonSerializable { + /* + * Sets full name of the owner of the vm. + */ + private String fullName; + + /* + * Sets org name to which the owner of the vm belongs. + */ + private String orgName; + + /* + * Sets domain name that vm should join. + */ + private String domainName; + + /* + * Sets domain username. + */ + private String domainUsername; + + /* + * Sets domain user password. + */ + private String domainUserPassword; + + /* + * Sets work group name that vm should join. + */ + private String workGroupName; + + /* + * Sets product id of the vm. + */ + private String productId; + + /* + * Sets a value indicating whether auto logon is enabled. + */ + private Boolean autoLogon; + + /* + * Sets auto logon count. + */ + private Integer autoLogonCount; + + /* + * Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Time zone name correspond to time + * zones listed at Microsoft Time Zone name + * values(https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)). + */ + private String timeZone; + + /* + * Sets first logon commands + */ + private List firstLogonCommands; + + /** + * Creates an instance of WindowsConfiguration class. + */ + public WindowsConfiguration() { + } + + /** + * Get the fullName property: Sets full name of the owner of the vm. + * + * @return the fullName value. + */ + public String fullName() { + return this.fullName; + } + + /** + * Set the fullName property: Sets full name of the owner of the vm. + * + * @param fullName the fullName value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** + * Get the orgName property: Sets org name to which the owner of the vm belongs. + * + * @return the orgName value. + */ + public String orgName() { + return this.orgName; + } + + /** + * Set the orgName property: Sets org name to which the owner of the vm belongs. + * + * @param orgName the orgName value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withOrgName(String orgName) { + this.orgName = orgName; + return this; + } + + /** + * Get the domainName property: Sets domain name that vm should join. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domainName property: Sets domain name that vm should join. + * + * @param domainName the domainName value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the domainUsername property: Sets domain username. + * + * @return the domainUsername value. + */ + public String domainUsername() { + return this.domainUsername; + } + + /** + * Set the domainUsername property: Sets domain username. + * + * @param domainUsername the domainUsername value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withDomainUsername(String domainUsername) { + this.domainUsername = domainUsername; + return this; + } + + /** + * Get the domainUserPassword property: Sets domain user password. + * + * @return the domainUserPassword value. + */ + public String domainUserPassword() { + return this.domainUserPassword; + } + + /** + * Set the domainUserPassword property: Sets domain user password. + * + * @param domainUserPassword the domainUserPassword value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withDomainUserPassword(String domainUserPassword) { + this.domainUserPassword = domainUserPassword; + return this; + } + + /** + * Get the workGroupName property: Sets work group name that vm should join. + * + * @return the workGroupName value. + */ + public String workGroupName() { + return this.workGroupName; + } + + /** + * Set the workGroupName property: Sets work group name that vm should join. + * + * @param workGroupName the workGroupName value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withWorkGroupName(String workGroupName) { + this.workGroupName = workGroupName; + return this; + } + + /** + * Get the productId property: Sets product id of the vm. + * + * @return the productId value. + */ + public String productId() { + return this.productId; + } + + /** + * Set the productId property: Sets product id of the vm. + * + * @param productId the productId value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withProductId(String productId) { + this.productId = productId; + return this; + } + + /** + * Get the autoLogon property: Sets a value indicating whether auto logon is enabled. + * + * @return the autoLogon value. + */ + public Boolean autoLogon() { + return this.autoLogon; + } + + /** + * Set the autoLogon property: Sets a value indicating whether auto logon is enabled. + * + * @param autoLogon the autoLogon value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withAutoLogon(Boolean autoLogon) { + this.autoLogon = autoLogon; + return this; + } + + /** + * Get the autoLogonCount property: Sets auto logon count. + * + * @return the autoLogonCount value. + */ + public Integer autoLogonCount() { + return this.autoLogonCount; + } + + /** + * Set the autoLogonCount property: Sets auto logon count. + * + * @param autoLogonCount the autoLogonCount value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withAutoLogonCount(Integer autoLogonCount) { + this.autoLogonCount = autoLogonCount; + return this; + } + + /** + * Get the timeZone property: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Time + * zone name correspond to time zones listed at Microsoft Time Zone name + * values(https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)). + * + * @return the timeZone value. + */ + public String timeZone() { + return this.timeZone; + } + + /** + * Set the timeZone property: Specifies the time zone of the virtual machine. e.g. "Pacific Standard Time". Time + * zone name correspond to time zones listed at Microsoft Time Zone name + * values(https://learn.microsoft.com/en-us/previous-versions/windows/embedded/ms912391(v=winembedded.11)). + * + * @param timeZone the timeZone value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withTimeZone(String timeZone) { + this.timeZone = timeZone; + return this; + } + + /** + * Get the firstLogonCommands property: Sets first logon commands. + * + * @return the firstLogonCommands value. + */ + public List firstLogonCommands() { + return this.firstLogonCommands; + } + + /** + * Set the firstLogonCommands property: Sets first logon commands. + * + * @param firstLogonCommands the firstLogonCommands value to set. + * @return the WindowsConfiguration object itself. + */ + public WindowsConfiguration withFirstLogonCommands(List firstLogonCommands) { + this.firstLogonCommands = firstLogonCommands; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("fullName", this.fullName); + jsonWriter.writeStringField("orgName", this.orgName); + jsonWriter.writeStringField("domainName", this.domainName); + jsonWriter.writeStringField("domainUsername", this.domainUsername); + jsonWriter.writeStringField("domainUserPassword", this.domainUserPassword); + jsonWriter.writeStringField("workGroupName", this.workGroupName); + jsonWriter.writeStringField("productId", this.productId); + jsonWriter.writeBooleanField("autoLogon", this.autoLogon); + jsonWriter.writeNumberField("autoLogonCount", this.autoLogonCount); + jsonWriter.writeStringField("timeZone", this.timeZone); + jsonWriter.writeArrayField("firstLogonCommands", this.firstLogonCommands, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WindowsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WindowsConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the WindowsConfiguration. + */ + public static WindowsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WindowsConfiguration deserializedWindowsConfiguration = new WindowsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("fullName".equals(fieldName)) { + deserializedWindowsConfiguration.fullName = reader.getString(); + } else if ("orgName".equals(fieldName)) { + deserializedWindowsConfiguration.orgName = reader.getString(); + } else if ("domainName".equals(fieldName)) { + deserializedWindowsConfiguration.domainName = reader.getString(); + } else if ("domainUsername".equals(fieldName)) { + deserializedWindowsConfiguration.domainUsername = reader.getString(); + } else if ("domainUserPassword".equals(fieldName)) { + deserializedWindowsConfiguration.domainUserPassword = reader.getString(); + } else if ("workGroupName".equals(fieldName)) { + deserializedWindowsConfiguration.workGroupName = reader.getString(); + } else if ("productId".equals(fieldName)) { + deserializedWindowsConfiguration.productId = reader.getString(); + } else if ("autoLogon".equals(fieldName)) { + deserializedWindowsConfiguration.autoLogon = reader.getNullable(JsonReader::getBoolean); + } else if ("autoLogonCount".equals(fieldName)) { + deserializedWindowsConfiguration.autoLogonCount = reader.getNullable(JsonReader::getInt); + } else if ("timeZone".equals(fieldName)) { + deserializedWindowsConfiguration.timeZone = reader.getString(); + } else if ("firstLogonCommands".equals(fieldName)) { + List firstLogonCommands = reader.readArray(reader1 -> reader1.getString()); + deserializedWindowsConfiguration.firstLogonCommands = firstLogonCommands; + } else { + reader.skipChildren(); + } + } + + return deserializedWindowsConfiguration; + }); + } +} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/resources/azure-resourcemanager-connectedvmware.properties b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/resources/azure-resourcemanager-connectedvmware.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/main/resources/azure-resourcemanager-connectedvmware.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersCreateSamples.java index 3cfdd604867c..6091a24bd3de 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersCreateSamples.java @@ -12,7 +12,7 @@ public final class ClustersCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateCluster.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersDeleteSamples.java index f17c470b4b26..d752a33b5ce1 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersDeleteSamples.java @@ -10,7 +10,7 @@ public final class ClustersDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteCluster.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersGetByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersGetByResourceGroupSamples.java index 502b92a8ee28..1cc74bd7bce8 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ClustersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetCluster.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListByResourceGroupSamples.java index 9de33663b5b6..7eef654980a6 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ClustersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListClustersByResourceGroup.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListSamples.java index acfda4038a3f..cd62721a97b7 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListSamples.java @@ -10,7 +10,7 @@ public final class ClustersListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListClusters.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersUpdateSamples.java index 70d39c777b4a..d9c1439dc39e 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ClustersUpdateSamples.java @@ -14,7 +14,7 @@ public final class ClustersUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateCluster.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresCreateSamples.java index 4af0bd694609..269178b3c5e4 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresCreateSamples.java @@ -12,7 +12,7 @@ public final class DatastoresCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateDatastore.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresDeleteSamples.java index b0c27205b54b..1bff0949462d 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresDeleteSamples.java @@ -10,7 +10,7 @@ public final class DatastoresDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteDatastore.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresGetByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresGetByResourceGroupSamples.java index 99c83c9863a6..b4068011a65c 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresGetByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DatastoresGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetDatastore.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListByResourceGroupSamples.java index faf15f492746..edb6537f645e 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class DatastoresListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListDatastoresByResourceGroup.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListSamples.java index c79c1165c96e..34325737bc88 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListSamples.java @@ -10,7 +10,7 @@ public final class DatastoresListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListDatastores.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresUpdateSamples.java index 577623796b2d..492ffb32c449 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresUpdateSamples.java @@ -14,7 +14,7 @@ public final class DatastoresUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateDatastore.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsCreateSamples.java index 758fe53f1f8e..42c0a5509cf4 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsCreateSamples.java @@ -12,7 +12,7 @@ public final class HostsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateHost.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsDeleteSamples.java index 86a3f7c51320..2ad688fc4c7b 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsDeleteSamples.java @@ -10,7 +10,7 @@ public final class HostsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteHost.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsGetByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsGetByResourceGroupSamples.java index fc0b261f2485..6cfccab6323a 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsGetByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class HostsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetHost.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListByResourceGroupSamples.java index 05e87c78d69f..7995eb85c0b0 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class HostsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListHostsByResourceGroup.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListSamples.java index c22883d2c074..48458b4fca47 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsListSamples.java @@ -10,7 +10,7 @@ public final class HostsListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListHosts.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsUpdateSamples.java index 70adf9a4bf7a..dfde5b7bfae6 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/HostsUpdateSamples.java @@ -14,7 +14,7 @@ public final class HostsUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateHost.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsCreateSamples.java index b0434c70e904..92573fb396aa 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsCreateSamples.java @@ -12,7 +12,7 @@ public final class InventoryItemsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateInventoryItem.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsDeleteSamples.java index 90afdbdd16c2..434f7841c983 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsDeleteSamples.java @@ -10,7 +10,7 @@ public final class InventoryItemsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteInventoryItem.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsGetSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsGetSamples.java index 766924a6ddf0..6f2b2ed43dbd 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsGetSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsGetSamples.java @@ -10,7 +10,7 @@ public final class InventoryItemsGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetInventoryItem.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListByVCenterSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListByVCenterSamples.java index 1ebfa81434c5..95b7963792e0 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListByVCenterSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListByVCenterSamples.java @@ -10,7 +10,7 @@ public final class InventoryItemsListByVCenterSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * InventoryItems_ListByVCenter.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListSamples.java index 0a3dd5dfaec4..58eadcdba5ee 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListOperations.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsCreateSamples.java index 31187259025a..168472fc0496 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsCreateSamples.java @@ -12,7 +12,7 @@ public final class ResourcePoolsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateResourcePool.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsDeleteSamples.java index 6ce4dad6b42f..bb96834949bc 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ResourcePoolsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteResourcePool.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsGetByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsGetByResourceGroupSamples.java index 2e31dd59d8f8..217c2ce0c81e 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsGetByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ResourcePoolsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetResourcePool.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListByResourceGroupSamples.java index 1007a98b27e3..d2c35c43bfc5 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ResourcePoolsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListResourcePoolsByResourceGroup.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListSamples.java index b5331c38d3eb..f07ef5236f9f 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListSamples.java @@ -10,7 +10,7 @@ public final class ResourcePoolsListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListResourcePools.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsUpdateSamples.java index db38847363df..98cbbe7a20b8 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsUpdateSamples.java @@ -14,7 +14,7 @@ public final class ResourcePoolsUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateResourcePool.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersCreateSamples.java index d8c81df5ee10..bf3118bcfbc0 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersCreateSamples.java @@ -13,7 +13,7 @@ public final class VCentersCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateVCenter.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersDeleteSamples.java index 3efd00d20451..7f57d0283115 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersDeleteSamples.java @@ -10,7 +10,7 @@ public final class VCentersDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteVCenter.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersGetByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersGetByResourceGroupSamples.java index 4a5229fa59b8..e79f69f8f9b1 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersGetByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VCentersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetVCenter.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListByResourceGroupSamples.java index da1d729fe768..b25c457c3535 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VCentersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListVCentersByResourceGroup.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListSamples.java index 981ef76f86db..a4e5827d2bf0 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersListSamples.java @@ -10,7 +10,7 @@ public final class VCentersListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListVCenters.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersUpdateSamples.java index c9116f645fe2..32e42b2c2029 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VCentersUpdateSamples.java @@ -14,7 +14,7 @@ public final class VCentersUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateVCenter.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsCreateSamples.java index 0b7435c190ec..36a7dfea6a7c 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsCreateSamples.java @@ -15,7 +15,7 @@ public final class VMInstanceGuestAgentsCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateVMInstanceGuestAgent.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsDeleteSamples.java index 46a16b9c7935..0c33ef2f757a 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class VMInstanceGuestAgentsDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteVMInstanceGuestAgent.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsGetSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsGetSamples.java index e69f88b6936c..fa343c8f9bc8 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsGetSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsGetSamples.java @@ -10,7 +10,7 @@ public final class VMInstanceGuestAgentsGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetVMInstanceGuestAgent.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsListSamples.java index 8a7e6b2649dd..95c5677135f0 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VMInstanceGuestAgentsListSamples.java @@ -10,7 +10,7 @@ public final class VMInstanceGuestAgentsListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * VMInstanceGuestAgent_ListByVm.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesCreateOrUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesCreateOrUpdateSamples.java index c54a8d9582b2..e87892f2fa39 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesCreateOrUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ public final class VirtualMachineInstancesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateVirtualMachineInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesDeleteSamples.java index badc5203a1a4..5ec451889bae 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineInstancesDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteVirtualMachineInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesGetSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesGetSamples.java index bf982da45bd5..6f5b8e087e4d 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesGetSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesGetSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineInstancesGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetVirtualMachineInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesListSamples.java index 0fa6e3d7cc3e..d7f60c8488d8 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesListSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineInstancesListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListVirtualMachineInstances.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesRestartSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesRestartSamples.java index 5e379a016a5a..356d1ab8b2e4 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesRestartSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesRestartSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineInstancesRestartSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * RestartVirtualMachineInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStartSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStartSamples.java index 420b9bc88bf7..294a4b78579e 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStartSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStartSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineInstancesStartSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * StartVirtualMachineInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStopSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStopSamples.java index a094544795e3..7dcb58716392 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStopSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesStopSamples.java @@ -12,7 +12,7 @@ public final class VirtualMachineInstancesStopSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * StopVirtualMachineInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesUpdateSamples.java index a82242287429..b800f5cdf414 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInstancesUpdateSamples.java @@ -13,7 +13,7 @@ public final class VirtualMachineInstancesUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateVirtualMachineInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesCreateSamples.java index 8c257751a73d..b2961c571a60 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesCreateSamples.java @@ -12,7 +12,7 @@ public final class VirtualMachineTemplatesCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateVirtualMachineTemplate.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesDeleteSamples.java index 5c595bcb977e..06563f27a4e6 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineTemplatesDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteVirtualMachineTemplate.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java index 31916087e77e..70916167de07 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineTemplatesGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetVirtualMachineTemplate.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListByResourceGroupSamples.java index 9d25b905b570..cb5582851f8b 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineTemplatesListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListVirtualMachineTemplatesByResourceGroup.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListSamples.java index 43fd5c77743c..4c27ca533e04 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesListSamples.java @@ -10,7 +10,7 @@ public final class VirtualMachineTemplatesListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListVirtualMachineTemplates.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesUpdateSamples.java index 84ae51c6e592..a223832482ff 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesUpdateSamples.java @@ -14,7 +14,7 @@ public final class VirtualMachineTemplatesUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateVirtualMachineTemplate.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksCreateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksCreateSamples.java index 92b593a99d8a..1c285c693a2c 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksCreateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksCreateSamples.java @@ -12,7 +12,7 @@ public final class VirtualNetworksCreateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * CreateVirtualNetwork.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksDeleteSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksDeleteSamples.java index c67f73a19240..42a08d3ca373 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksDeleteSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksDeleteSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksDeleteSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * DeleteVirtualNetwork.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksGetByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksGetByResourceGroupSamples.java index cc4e703ca11a..d9002610ed58 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksGetByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetVirtualNetwork.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListByResourceGroupSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListByResourceGroupSamples.java index ed06a9a35ad3..00102287e95b 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListByResourceGroupSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksListByResourceGroupSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListVirtualNetworksByResourceGroup.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListSamples.java index 99806314bfec..cc10490c7911 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListSamples.java @@ -10,7 +10,7 @@ public final class VirtualNetworksListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * ListVirtualNetworks.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksUpdateSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksUpdateSamples.java index 568a750a28be..13bed1d3ed55 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksUpdateSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksUpdateSamples.java @@ -14,7 +14,7 @@ public final class VirtualNetworksUpdateSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * UpdateVirtualNetwork.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataGetSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataGetSamples.java index 1d9ff981d1f5..dd0b43dd56ef 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataGetSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataGetSamples.java @@ -10,7 +10,7 @@ public final class VmInstanceHybridIdentityMetadataGetSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * GetVmInstanceHybridIdentityMetadata.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataListSamples.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataListSamples.java index 096a5da52b3a..22c37164a26b 100644 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataListSamples.java +++ b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/samples/java/com/azure/resourcemanager/connectedvmware/generated/VmInstanceHybridIdentityMetadataListSamples.java @@ -10,7 +10,7 @@ public final class VmInstanceHybridIdentityMetadataListSamples { /* * x-ms-original-file: - * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-10-01/examples/ + * specification/connectedvmware/resource-manager/Microsoft.ConnectedVMwarevSphere/stable/2023-12-01/examples/ * HybridIdentityMetadata_ListByVmInstance.json */ /** diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterInnerTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterInnerTests.java deleted file mode 100644 index bb3e09150af3..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterInnerTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.ClusterInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"ixuigdtopbobj\",\"vCenterId\":\"hm\",\"moRefId\":\"u\",\"inventoryItemId\":\"a\",\"moName\":\"rzayv\",\"statuses\":[{\"type\":\"vdfgiotk\",\"status\":\"utqxlngx\",\"reason\":\"fgugnxkrxdqmid\",\"message\":\"hzrvqd\",\"severity\":\"bhj\",\"lastUpdatedAt\":\"2021-09-14T02:51:19Z\"},{\"type\":\"ehoqfbowskan\",\"status\":\"tzlcuiywgqywgn\",\"reason\":\"vynhzgpphrcg\",\"message\":\"cocpecfvmmcoofsx\",\"severity\":\"evgbmqjq\",\"lastUpdatedAt\":\"2021-06-25T22:17:23Z\"}],\"customResourceName\":\"pmivkwlzu\",\"usedMemoryGB\":906513872152816709,\"totalMemoryGB\":7320882812024547422,\"usedCpuMHz\":5788835821113503178,\"totalCpuMHz\":5098195644099972430,\"datastoreIds\":[\"l\",\"bxetqgtzxdpn\",\"bqqwxrj\",\"eallnwsubisnj\"],\"networkIds\":[\"mngnzscxaqw\"],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"bonqvpkvlrxnjeas\",\"name\":\"pheoflokeyy\"},\"kind\":\"jbdlwtgrhpdjpju\",\"location\":\"asxazjpqyegualhb\",\"tags\":{\"jzzvdud\":\"e\",\"pwlbjnpg\":\"wdslfhotwmcy\"},\"id\":\"cftadeh\",\"name\":\"nltyfsoppusuesnz\",\"type\":\"dejbavo\"}") - .toObject(ClusterInner.class); - Assertions.assertEquals("asxazjpqyegualhb", model.location()); - Assertions.assertEquals("e", model.tags().get("jzzvdud")); - Assertions.assertEquals("bonqvpkvlrxnjeas", model.extendedLocation().type()); - Assertions.assertEquals("pheoflokeyy", model.extendedLocation().name()); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.kind()); - Assertions.assertEquals("hm", model.vCenterId()); - Assertions.assertEquals("u", model.moRefId()); - Assertions.assertEquals("a", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInner model = new ClusterInner().withLocation("asxazjpqyegualhb") - .withTags(mapOf("jzzvdud", "e", "pwlbjnpg", "wdslfhotwmcy")) - .withExtendedLocation(new ExtendedLocation().withType("bonqvpkvlrxnjeas").withName("pheoflokeyy")) - .withKind("jbdlwtgrhpdjpju") - .withVCenterId("hm") - .withMoRefId("u") - .withInventoryItemId("a"); - model = BinaryData.fromObject(model).toObject(ClusterInner.class); - Assertions.assertEquals("asxazjpqyegualhb", model.location()); - Assertions.assertEquals("e", model.tags().get("jzzvdud")); - Assertions.assertEquals("bonqvpkvlrxnjeas", model.extendedLocation().type()); - Assertions.assertEquals("pheoflokeyy", model.extendedLocation().name()); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.kind()); - Assertions.assertEquals("hm", model.vCenterId()); - Assertions.assertEquals("u", model.moRefId()); - Assertions.assertEquals("a", model.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterInventoryItemTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterInventoryItemTests.java deleted file mode 100644 index 50712f9035eb..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterInventoryItemTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.ClusterInventoryItem; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"Cluster\",\"managedResourceId\":\"fidltug\",\"moRefId\":\"esmkssjhoiftxfkf\",\"moName\":\"gpr\",\"provisioningState\":\"Deleting\"}") - .toObject(ClusterInventoryItem.class); - Assertions.assertEquals("fidltug", model.managedResourceId()); - Assertions.assertEquals("esmkssjhoiftxfkf", model.moRefId()); - Assertions.assertEquals("gpr", model.moName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInventoryItem model = new ClusterInventoryItem().withManagedResourceId("fidltug") - .withMoRefId("esmkssjhoiftxfkf") - .withMoName("gpr"); - model = BinaryData.fromObject(model).toObject(ClusterInventoryItem.class); - Assertions.assertEquals("fidltug", model.managedResourceId()); - Assertions.assertEquals("esmkssjhoiftxfkf", model.moRefId()); - Assertions.assertEquals("gpr", model.moName()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterPropertiesTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterPropertiesTests.java deleted file mode 100644 index 4c115e9e5ecf..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClusterPropertiesTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.ClusterProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterProperties model = BinaryData.fromString( - "{\"uuid\":\"zdmohctbqvu\",\"vCenterId\":\"xdn\",\"moRefId\":\"vo\",\"inventoryItemId\":\"ujjugwdkcglh\",\"moName\":\"azjdyggd\",\"statuses\":[{\"type\":\"hbkuofqwey\",\"status\":\"menevfyexfwh\",\"reason\":\"cibvyvdcsitynn\",\"message\":\"mdectehfiqscjey\",\"severity\":\"hezrkgq\",\"lastUpdatedAt\":\"2021-10-29T01:56:30Z\"},{\"type\":\"efovgmk\",\"status\":\"leyyvx\",\"reason\":\"jpkcattpng\",\"message\":\"rcczsqpjhvmd\",\"severity\":\"v\",\"lastUpdatedAt\":\"2021-09-30T19:57Z\"},{\"type\":\"unqecanoae\",\"status\":\"fhyhltrpmopjmcma\",\"reason\":\"okth\",\"message\":\"iuaod\",\"severity\":\"cpkvxodp\",\"lastUpdatedAt\":\"2021-10-28T03:11:40Z\"},{\"type\":\"yzydagfuaxbezyi\",\"status\":\"kktwhrdxw\",\"reason\":\"wqsmbsur\",\"message\":\"imoryocfsfksym\",\"severity\":\"ys\",\"lastUpdatedAt\":\"2021-06-14T21:05:42Z\"}],\"customResourceName\":\"uxh\",\"usedMemoryGB\":8712909228510628500,\"totalMemoryGB\":799481851154145072,\"usedCpuMHz\":1487537965581482416,\"totalCpuMHz\":9053543838678306563,\"datastoreIds\":[\"vyifqrvkdvjsl\",\"rm\",\"vdfwatkpn\"],\"networkIds\":[\"exxbczwtr\",\"wiqzbqjvsovmyo\",\"acspkwl\"],\"provisioningState\":\"Accepted\"}") - .toObject(ClusterProperties.class); - Assertions.assertEquals("xdn", model.vCenterId()); - Assertions.assertEquals("vo", model.moRefId()); - Assertions.assertEquals("ujjugwdkcglh", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterProperties model - = new ClusterProperties().withVCenterId("xdn").withMoRefId("vo").withInventoryItemId("ujjugwdkcglh"); - model = BinaryData.fromObject(model).toObject(ClusterProperties.class); - Assertions.assertEquals("xdn", model.vCenterId()); - Assertions.assertEquals("vo", model.moRefId()); - Assertions.assertEquals("ujjugwdkcglh", model.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersCreateMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersCreateMockTests.java deleted file mode 100644 index c253654f34cf..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersCreateMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Cluster; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -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 reactor.core.publisher.Mono; - -public final class ClustersCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"cjkgdirazftxej\",\"vCenterId\":\"bmdujtmvcopexc\",\"moRefId\":\"urbuhhlkyqltq\",\"inventoryItemId\":\"ogtu\",\"moName\":\"ffdjktsysidfvclg\",\"statuses\":[{\"type\":\"uijtkbu\",\"status\":\"ogsf\",\"reason\":\"ayiansharujtji\",\"message\":\"fzyjqt\",\"severity\":\"wkpqhjpenuygbq\",\"lastUpdatedAt\":\"2021-11-14T21:05Z\"}],\"customResourceName\":\"kewvnqv\",\"usedMemoryGB\":7373483158568002011,\"totalMemoryGB\":303660081981185328,\"usedCpuMHz\":6904489253760978104,\"totalCpuMHz\":6066393981630309590,\"datastoreIds\":[\"axpunjqikczvv\",\"tacgxmfc\"],\"networkIds\":[\"rxhtvso\"],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"tsjgqrsx\",\"name\":\"ruuuybnch\"},\"kind\":\"izoyuelyetndnbf\",\"location\":\"yggagflnlgmt\",\"tags\":{\"rohkpigqfusu\":\"hzjmucftbyrp\",\"alhhjnhgwydyynfs\":\"kzmkwklsnoxaxmqe\",\"qtanarfdlpuk\":\"khgb\"},\"id\":\"py\",\"name\":\"neizjcpe\",\"type\":\"gkhnmgbrouxddbh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = manager.clusters() - .define("whslwkoj") - .withRegion("antkwcegyamlbns") - .withExistingResourceGroup("phwpnulaiywzej") - .withTags(mapOf("m", "cjjvpilguooqja")) - .withExtendedLocation(new ExtendedLocation().withType("quflqbctq").withName("mzjr")) - .withKind("qzeqyjleziunjxdf") - .withVCenterId("npdwr") - .withMoRefId("afgfugsnn") - .withInventoryItemId("yetefyp") - .create(); - - Assertions.assertEquals("yggagflnlgmt", response.location()); - Assertions.assertEquals("hzjmucftbyrp", response.tags().get("rohkpigqfusu")); - Assertions.assertEquals("tsjgqrsx", response.extendedLocation().type()); - Assertions.assertEquals("ruuuybnch", response.extendedLocation().name()); - Assertions.assertEquals("izoyuelyetndnbf", response.kind()); - Assertions.assertEquals("bmdujtmvcopexc", response.vCenterId()); - Assertions.assertEquals("urbuhhlkyqltq", response.moRefId()); - Assertions.assertEquals("ogtu", response.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersDeleteMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersDeleteMockTests.java deleted file mode 100644 index e06e23012c97..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("ra", "zvzbglbyv", true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersGetByResourceGroupWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 51a8974a36f8..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersGetByResourceGroupWithResponseMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Cluster; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"srxuzvoam\",\"vCenterId\":\"cqiosmgbza\",\"moRefId\":\"xqdlyrtltlapr\",\"inventoryItemId\":\"zkatb\",\"moName\":\"mznnbsoqeqalarvl\",\"statuses\":[{\"type\":\"btgfeb\",\"status\":\"nbmhyree\",\"reason\":\"zqavbpdqmjx\",\"message\":\"yzglgo\",\"severity\":\"tlmj\",\"lastUpdatedAt\":\"2021-07-23T23:28:22Z\"}],\"customResourceName\":\"j\",\"usedMemoryGB\":1913590755057725088,\"totalMemoryGB\":3676534686505365342,\"usedCpuMHz\":4607088404912248152,\"totalCpuMHz\":378200694653432281,\"datastoreIds\":[\"fjkwrusnkq\",\"hsyrqunj\"],\"networkIds\":[\"enx\",\"ulkpakd\"],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"nnawtqabpxuckpgg\",\"name\":\"wey\"},\"kind\":\"hlisngw\",\"location\":\"lqqmpiz\",\"tags\":{\"qxpxiwfcngjsaa\":\"n\"},\"id\":\"iixtmkzj\",\"name\":\"kv\",\"type\":\"irhgfgrwsdp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Cluster response = manager.clusters() - .getByResourceGroupWithResponse("ztrksxwpndf", "pfnznthjtwkj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("lqqmpiz", response.location()); - Assertions.assertEquals("n", response.tags().get("qxpxiwfcngjsaa")); - Assertions.assertEquals("nnawtqabpxuckpgg", response.extendedLocation().type()); - Assertions.assertEquals("wey", response.extendedLocation().name()); - Assertions.assertEquals("hlisngw", response.kind()); - Assertions.assertEquals("cqiosmgbza", response.vCenterId()); - Assertions.assertEquals("xqdlyrtltlapr", response.moRefId()); - Assertions.assertEquals("zkatb", response.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListByResourceGroupMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListByResourceGroupMockTests.java deleted file mode 100644 index 4f42991636a9..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListByResourceGroupMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Cluster; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"fabuiyjibu\",\"vCenterId\":\"hdugneiknpg\",\"moRefId\":\"gjiuqhibto\",\"inventoryItemId\":\"pqwjedm\",\"moName\":\"r\",\"statuses\":[{\"type\":\"wpktvqylkmqpzoyh\",\"status\":\"bcg\",\"reason\":\"cloxo\",\"message\":\"qinjipnwjf\",\"severity\":\"qlafcbahhpzpofoi\",\"lastUpdatedAt\":\"2021-05-13T07:58:47Z\"}],\"customResourceName\":\"filkmkkholv\",\"usedMemoryGB\":8388081220495319367,\"totalMemoryGB\":3318034223517911241,\"usedCpuMHz\":3026958489306582785,\"totalCpuMHz\":6998870719021995460,\"datastoreIds\":[\"vtiukyef\"],\"networkIds\":[\"mnahmnxh\",\"xjqirwrweoox\"],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"xwrsnew\",\"name\":\"zqvbubqm\"},\"kind\":\"sycxhxzgaz\",\"location\":\"taboidvmf\",\"tags\":{\"mtdherngb\":\"pubowsepdfg\"},\"id\":\"c\",\"name\":\"uahokq\",\"type\":\"obkauxofsh\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusters().listByResourceGroup("cvclxynpdk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("taboidvmf", response.iterator().next().location()); - Assertions.assertEquals("pubowsepdfg", response.iterator().next().tags().get("mtdherngb")); - Assertions.assertEquals("xwrsnew", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("zqvbubqm", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("sycxhxzgaz", response.iterator().next().kind()); - Assertions.assertEquals("hdugneiknpg", response.iterator().next().vCenterId()); - Assertions.assertEquals("gjiuqhibto", response.iterator().next().moRefId()); - Assertions.assertEquals("pqwjedm", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListMockTests.java deleted file mode 100644 index 61234f702cda..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Cluster; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClustersListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"ctbrxkjzwrgxffm\",\"vCenterId\":\"kwfbkgo\",\"moRefId\":\"wopdbydpiz\",\"inventoryItemId\":\"clnapxbiygnugjkn\",\"moName\":\"mfcttux\",\"statuses\":[{\"type\":\"lflqoiqu\",\"status\":\"ehmrn\",\"reason\":\"vsujztczytqjtwh\",\"message\":\"unfprnjletlxs\",\"severity\":\"pddouifamowaziyn\",\"lastUpdatedAt\":\"2021-04-07T14:50:59Z\"},{\"type\":\"wzdvpiwh\",\"status\":\"szdtmaajquh\",\"reason\":\"ylr\",\"message\":\"m\",\"severity\":\"g\",\"lastUpdatedAt\":\"2021-10-13T09:57:49Z\"},{\"type\":\"yospspshc\",\"status\":\"kyjpmspbps\",\"reason\":\"fppyogtieyujtvcz\",\"message\":\"n\",\"severity\":\"rxmunjdxvgln\",\"lastUpdatedAt\":\"2021-10-03T03:08:35Z\"},{\"type\":\"xpaglqivbgkc\",\"status\":\"hpzvuqdflvoniyp\",\"reason\":\"ubcpzgpxti\",\"message\":\"j\",\"severity\":\"idibgqjxgpn\",\"lastUpdatedAt\":\"2021-03-28T18:40:43Z\"}],\"customResourceName\":\"vfgpikqmhhaowjrm\",\"usedMemoryGB\":453619823533094312,\"totalMemoryGB\":6259942287024025103,\"usedCpuMHz\":5235917180289982639,\"totalCpuMHz\":6437481648804620645,\"datastoreIds\":[\"kfvxcnq\",\"xqpswok\",\"vkhlggdhbemz\",\"kzsz\"],\"networkIds\":[\"wtglxx\",\"ljfp\",\"picrmnzhrgmqgjsx\",\"pqcbfrmbodthsq\"],\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"i\",\"name\":\"kclacjfrn\"},\"kind\":\"sxauzlwvsgmwohqf\",\"location\":\"izvu\",\"tags\":{\"mribiat\":\"kjsvthnwpzteko\"},\"id\":\"gplucfotangcfhny\",\"name\":\"zcugswvxwlmzqw\",\"type\":\"vtxnjmxmcuqud\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusters().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("izvu", response.iterator().next().location()); - Assertions.assertEquals("kjsvthnwpzteko", response.iterator().next().tags().get("mribiat")); - Assertions.assertEquals("i", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("kclacjfrn", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("sxauzlwvsgmwohqf", response.iterator().next().kind()); - Assertions.assertEquals("kwfbkgo", response.iterator().next().vCenterId()); - Assertions.assertEquals("wopdbydpiz", response.iterator().next().moRefId()); - Assertions.assertEquals("clnapxbiygnugjkn", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListTests.java deleted file mode 100644 index 744b5498622f..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ClustersListTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.ClusterInner; -import com.azure.resourcemanager.connectedvmware.models.ClustersList; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClustersListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClustersList model = BinaryData.fromString( - "{\"nextLink\":\"bpxjmfl\",\"value\":[{\"properties\":{\"uuid\":\"nchrkcciww\",\"vCenterId\":\"uqkhrsajiwku\",\"moRefId\":\"oskg\",\"inventoryItemId\":\"auu\",\"moName\":\"jmvxie\",\"statuses\":[{\"type\":\"idyjrrfbyaosvexc\",\"status\":\"npc\",\"reason\":\"ocohslkevleg\",\"message\":\"fbuhfmvfaxkffe\",\"severity\":\"th\",\"lastUpdatedAt\":\"2021-01-03T07:04:49Z\"},{\"type\":\"zy\",\"status\":\"hxmzsbbzoggig\",\"reason\":\"wburvjxxjnspydpt\",\"message\":\"enkouknvudw\",\"severity\":\"ukbldngkpo\",\"lastUpdatedAt\":\"2021-07-10T00:22:18Z\"}],\"customResourceName\":\"z\",\"usedMemoryGB\":911296392791855673,\"totalMemoryGB\":7699505413324678544,\"usedCpuMHz\":675318684186893935,\"totalCpuMHz\":3433542965011428197,\"datastoreIds\":[\"ygevqzntypmrbpiz\",\"drqjsdpy\"],\"networkIds\":[\"yhxdeoejzicwi\",\"sjttgzfbish\"],\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"jdeyeamdpha\",\"name\":\"lpbuxwgipwhonowk\"},\"kind\":\"wankixzbi\",\"location\":\"jeputtmrywn\",\"tags\":{\"zrnkcqvyxlwh\":\"qftiy\",\"ryavwhheunmmqh\":\"lsicohoqqnwv\",\"noc\":\"yxzk\",\"uconuqszfkbey\":\"koklya\"},\"id\":\"ewrmjmwvvjektc\",\"name\":\"senhwlrs\",\"type\":\"frzpwvlqdqgb\"},{\"properties\":{\"uuid\":\"ylihkaetckt\",\"vCenterId\":\"civfsnkymuctq\",\"moRefId\":\"fbebrjcxer\",\"inventoryItemId\":\"wutttxfvjrbi\",\"moName\":\"hxepcyvahfnlj\",\"statuses\":[{\"type\":\"j\",\"status\":\"ujqgidok\",\"reason\":\"ljyoxgvcltb\",\"message\":\"ncghkje\",\"severity\":\"zhbijhtxfv\",\"lastUpdatedAt\":\"2021-10-21T07:58:39Z\"}],\"customResourceName\":\"smx\",\"usedMemoryGB\":7314853513832438482,\"totalMemoryGB\":5279138530813051963,\"usedCpuMHz\":6726437827425904455,\"totalCpuMHz\":8488647462806528566,\"datastoreIds\":[\"qkkrb\",\"pukgriwflzlfb\"],\"networkIds\":[\"uzycispnqza\"],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"rp\",\"name\":\"dhibnuq\"},\"kind\":\"ik\",\"location\":\"drgvtqagn\",\"tags\":{\"rbu\":\"nhijggmebfsi\",\"ttdbhrbnl\":\"rcvpnazzmhjrunmp\",\"xywnytnrsynlqidy\":\"nkxmyskpbhenbtk\"},\"id\":\"yxczfclh\",\"name\":\"axdbabph\",\"type\":\"wrqlfktsthsuco\"},{\"properties\":{\"uuid\":\"nyyazttbtwwrqpue\",\"vCenterId\":\"kzywbiex\",\"moRefId\":\"eyueaxibxujwb\",\"inventoryItemId\":\"walm\",\"moName\":\"yoxa\",\"statuses\":[{\"type\":\"zjancuxr\",\"status\":\"wbavxbniwdj\",\"reason\":\"zt\",\"message\":\"bpg\",\"severity\":\"ytxhp\",\"lastUpdatedAt\":\"2021-04-28T02:43:47Z\"},{\"type\":\"pfza\",\"status\":\"lcuhxwtctyqiklb\",\"reason\":\"vplwzbhv\",\"message\":\"u\",\"severity\":\"osvmk\",\"lastUpdatedAt\":\"2021-11-15T07:00:08Z\"},{\"type\":\"qukkfp\",\"status\":\"mg\",\"reason\":\"nkjzkdeslpvlop\",\"message\":\"yighxpk\",\"severity\":\"zb\",\"lastUpdatedAt\":\"2021-04-02T11:03:50Z\"}],\"customResourceName\":\"bbaumnyquped\",\"usedMemoryGB\":2245881351334058994,\"totalMemoryGB\":3205247320582775463,\"usedCpuMHz\":7090482226070156086,\"totalCpuMHz\":2627046552628012319,\"datastoreIds\":[\"ie\",\"tfhvpesapskrdqmh\",\"jdhtldwkyzxu\",\"tkncwsc\"],\"networkIds\":[\"lxotogtwrupq\",\"xvnmicykvceov\",\"ilovnot\",\"fj\"],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"k\",\"name\":\"x\"},\"kind\":\"ttkphywpnvjtoqne\",\"location\":\"mclfplphoxuscr\",\"tags\":{\"zq\":\"gyepsbjt\",\"fjz\":\"gxywpmue\"},\"id\":\"fqkquj\",\"name\":\"dsuyonobgla\",\"type\":\"cq\"}]}") - .toObject(ClustersList.class); - Assertions.assertEquals("bpxjmfl", model.nextLink()); - Assertions.assertEquals("jeputtmrywn", model.value().get(0).location()); - Assertions.assertEquals("qftiy", model.value().get(0).tags().get("zrnkcqvyxlwh")); - Assertions.assertEquals("jdeyeamdpha", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("lpbuxwgipwhonowk", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("wankixzbi", model.value().get(0).kind()); - Assertions.assertEquals("uqkhrsajiwku", model.value().get(0).vCenterId()); - Assertions.assertEquals("oskg", model.value().get(0).moRefId()); - Assertions.assertEquals("auu", model.value().get(0).inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClustersList model = new ClustersList().withNextLink("bpxjmfl") - .withValue(Arrays.asList( - new ClusterInner().withLocation("jeputtmrywn") - .withTags(mapOf("zrnkcqvyxlwh", "qftiy", "ryavwhheunmmqh", "lsicohoqqnwv", "noc", "yxzk", - "uconuqszfkbey", "koklya")) - .withExtendedLocation(new ExtendedLocation().withType("jdeyeamdpha").withName("lpbuxwgipwhonowk")) - .withKind("wankixzbi") - .withVCenterId("uqkhrsajiwku") - .withMoRefId("oskg") - .withInventoryItemId("auu"), - new ClusterInner().withLocation("drgvtqagn") - .withTags(mapOf("rbu", "nhijggmebfsi", "ttdbhrbnl", "rcvpnazzmhjrunmp", "xywnytnrsynlqidy", - "nkxmyskpbhenbtk")) - .withExtendedLocation(new ExtendedLocation().withType("rp").withName("dhibnuq")) - .withKind("ik") - .withVCenterId("civfsnkymuctq") - .withMoRefId("fbebrjcxer") - .withInventoryItemId("wutttxfvjrbi"), - new ClusterInner().withLocation("mclfplphoxuscr") - .withTags(mapOf("zq", "gyepsbjt", "fjz", "gxywpmue")) - .withExtendedLocation(new ExtendedLocation().withType("k").withName("x")) - .withKind("ttkphywpnvjtoqne") - .withVCenterId("kzywbiex") - .withMoRefId("eyueaxibxujwb") - .withInventoryItemId("walm"))); - model = BinaryData.fromObject(model).toObject(ClustersList.class); - Assertions.assertEquals("bpxjmfl", model.nextLink()); - Assertions.assertEquals("jeputtmrywn", model.value().get(0).location()); - Assertions.assertEquals("qftiy", model.value().get(0).tags().get("zrnkcqvyxlwh")); - Assertions.assertEquals("jdeyeamdpha", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("lpbuxwgipwhonowk", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("wankixzbi", model.value().get(0).kind()); - Assertions.assertEquals("uqkhrsajiwku", model.value().get(0).vCenterId()); - Assertions.assertEquals("oskg", model.value().get(0).moRefId()); - Assertions.assertEquals("auu", model.value().get(0).inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoreInnerTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoreInnerTests.java deleted file mode 100644 index 6d0ecc7a740d..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoreInnerTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.DatastoreInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DatastoreInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"wwiftohqkvpuv\",\"vCenterId\":\"gplsaknynf\",\"moRefId\":\"n\",\"inventoryItemId\":\"ph\",\"moName\":\"pxodlqiyntorzih\",\"statuses\":[{\"type\":\"jswsrmslyz\",\"status\":\"zbchckqqzqioxiy\",\"reason\":\"iizynkedyatrwyh\",\"message\":\"ibzyhwitsmyp\",\"severity\":\"npcdpumnzgm\",\"lastUpdatedAt\":\"2021-02-11T00:28:43Z\"},{\"type\":\"abikns\",\"status\":\"gj\",\"reason\":\"bldtlww\",\"message\":\"kdmtncvokotll\",\"severity\":\"yhgsy\",\"lastUpdatedAt\":\"2021-07-28T04:52:50Z\"}],\"customResourceName\":\"jlt\",\"capacityGB\":7818158463712312814,\"freeSpaceGB\":8180810548190524314,\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"rkvcikhnvpa\",\"name\":\"gxqquezik\"},\"kind\":\"gxk\",\"location\":\"lla\",\"tags\":{\"ccjzkzivgvv\":\"lwuip\",\"rdvstkwqqtch\":\"nayrhyrnxxmueedn\"},\"id\":\"alm\",\"name\":\"mtdaa\",\"type\":\"gdv\"}") - .toObject(DatastoreInner.class); - Assertions.assertEquals("lla", model.location()); - Assertions.assertEquals("lwuip", model.tags().get("ccjzkzivgvv")); - Assertions.assertEquals("rkvcikhnvpa", model.extendedLocation().type()); - Assertions.assertEquals("gxqquezik", model.extendedLocation().name()); - Assertions.assertEquals("gxk", model.kind()); - Assertions.assertEquals("gplsaknynf", model.vCenterId()); - Assertions.assertEquals("n", model.moRefId()); - Assertions.assertEquals("ph", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreInner model = new DatastoreInner().withLocation("lla") - .withTags(mapOf("ccjzkzivgvv", "lwuip", "rdvstkwqqtch", "nayrhyrnxxmueedn")) - .withExtendedLocation(new ExtendedLocation().withType("rkvcikhnvpa").withName("gxqquezik")) - .withKind("gxk") - .withVCenterId("gplsaknynf") - .withMoRefId("n") - .withInventoryItemId("ph"); - model = BinaryData.fromObject(model).toObject(DatastoreInner.class); - Assertions.assertEquals("lla", model.location()); - Assertions.assertEquals("lwuip", model.tags().get("ccjzkzivgvv")); - Assertions.assertEquals("rkvcikhnvpa", model.extendedLocation().type()); - Assertions.assertEquals("gxqquezik", model.extendedLocation().name()); - Assertions.assertEquals("gxk", model.kind()); - Assertions.assertEquals("gplsaknynf", model.vCenterId()); - Assertions.assertEquals("n", model.moRefId()); - Assertions.assertEquals("ph", model.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoreInventoryItemTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoreInventoryItemTests.java deleted file mode 100644 index a1c751cde7c2..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoreInventoryItemTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.DatastoreInventoryItem; -import org.junit.jupiter.api.Assertions; - -public final class DatastoreInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"Datastore\",\"capacityGB\":3249559598033640642,\"freeSpaceGB\":1203918131224408172,\"managedResourceId\":\"qtgdqohmcwsl\",\"moRefId\":\"izetpw\",\"moName\":\"a\",\"provisioningState\":\"Canceled\"}") - .toObject(DatastoreInventoryItem.class); - Assertions.assertEquals("qtgdqohmcwsl", model.managedResourceId()); - Assertions.assertEquals("izetpw", model.moRefId()); - Assertions.assertEquals("a", model.moName()); - Assertions.assertEquals(3249559598033640642L, model.capacityGB()); - Assertions.assertEquals(1203918131224408172L, model.freeSpaceGB()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreInventoryItem model = new DatastoreInventoryItem().withManagedResourceId("qtgdqohmcwsl") - .withMoRefId("izetpw") - .withMoName("a") - .withCapacityGB(3249559598033640642L) - .withFreeSpaceGB(1203918131224408172L); - model = BinaryData.fromObject(model).toObject(DatastoreInventoryItem.class); - Assertions.assertEquals("qtgdqohmcwsl", model.managedResourceId()); - Assertions.assertEquals("izetpw", model.moRefId()); - Assertions.assertEquals("a", model.moName()); - Assertions.assertEquals(3249559598033640642L, model.capacityGB()); - Assertions.assertEquals(1203918131224408172L, model.freeSpaceGB()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastorePropertiesTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastorePropertiesTests.java deleted file mode 100644 index 9be86630ff9e..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastorePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.DatastoreProperties; -import org.junit.jupiter.api.Assertions; - -public final class DatastorePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreProperties model = BinaryData.fromString( - "{\"uuid\":\"gpiohgwxrtfudxe\",\"vCenterId\":\"gyqagvrvmnpkuk\",\"moRefId\":\"i\",\"inventoryItemId\":\"blxgwimf\",\"moName\":\"hfjx\",\"statuses\":[{\"type\":\"kkfoqr\",\"status\":\"fkzikfj\",\"reason\":\"n\",\"message\":\"ivx\",\"severity\":\"zel\",\"lastUpdatedAt\":\"2021-02-18T09:10:14Z\"},{\"type\":\"elsfeaen\",\"status\":\"bfatklddxbjhwu\",\"reason\":\"nozj\",\"message\":\"ph\",\"severity\":\"ulpjr\",\"lastUpdatedAt\":\"2021-04-09T11:20:33Z\"},{\"type\":\"l\",\"status\":\"imjwosyt\",\"reason\":\"tcs\",\"message\":\"cktqumiekkezzi\",\"severity\":\"ly\",\"lastUpdatedAt\":\"2021-07-20T01:18:29Z\"}],\"customResourceName\":\"gqggebdunygae\",\"capacityGB\":1190653393457920963,\"freeSpaceGB\":7064706580171927315,\"provisioningState\":\"Canceled\"}") - .toObject(DatastoreProperties.class); - Assertions.assertEquals("gyqagvrvmnpkuk", model.vCenterId()); - Assertions.assertEquals("i", model.moRefId()); - Assertions.assertEquals("blxgwimf", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreProperties model = new DatastoreProperties().withVCenterId("gyqagvrvmnpkuk") - .withMoRefId("i") - .withInventoryItemId("blxgwimf"); - model = BinaryData.fromObject(model).toObject(DatastoreProperties.class); - Assertions.assertEquals("gyqagvrvmnpkuk", model.vCenterId()); - Assertions.assertEquals("i", model.moRefId()); - Assertions.assertEquals("blxgwimf", model.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresCreateMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresCreateMockTests.java deleted file mode 100644 index f81b92e94740..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresCreateMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Datastore; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -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 reactor.core.publisher.Mono; - -public final class DatastoresCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"foyzbamwineof\",\"vCenterId\":\"kak\",\"moRefId\":\"ldtve\",\"inventoryItemId\":\"oclzhz\",\"moName\":\"n\",\"statuses\":[{\"type\":\"vt\",\"status\":\"pnrupzaamrdi\",\"reason\":\"rekidswysk\",\"message\":\"uffgllukkutvlx\",\"severity\":\"pqhvmblcouqehbhb\",\"lastUpdatedAt\":\"2021-08-15T10:10:07Z\"},{\"type\":\"iryr\",\"status\":\"doypm\",\"reason\":\"t\",\"message\":\"rmkfqlwxldykals\",\"severity\":\"aolnjpnnbmjk\",\"lastUpdatedAt\":\"2021-03-23T11:57:04Z\"}],\"customResourceName\":\"gsjjxxahmrna\",\"capacityGB\":5602966302546501725,\"freeSpaceGB\":3016532744635295261,\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"inbmh\",\"name\":\"jijkgqxnhmbke\"},\"kind\":\"aujvaa\",\"location\":\"nggiycwkdtaa\",\"tags\":{\"aumrrqmbzmqkrat\":\"fe\",\"sokdgoge\":\"nxwbjsidbirkfp\",\"wnf\":\"ijymrhbguzozky\"},\"id\":\"zhhh\",\"name\":\"o\",\"type\":\"mffjkutycyarn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Datastore response = manager.datastores() - .define("bnxwc") - .withRegion("gbhgau") - .withExistingResourceGroup("olmk") - .withTags(mapOf("ozo", "ixmxufrsryjqgdkf", "hntasfaymx", "oqbvjhvefgwbmqj", "qkyojwyvf", "ulpzealb", - "jcmmzrrscub", "mbtsuahxsg")) - .withExtendedLocation(new ExtendedLocation().withType("xtczhupeuknijd").withName("yespydjfbocyv")) - .withKind("lrtywikdmhlakuf") - .withVCenterId("wzfgbrttuiaclkie") - .withMoRefId("ajlfnthiqfyu") - .withInventoryItemId("diygbpvnwswmtxky") - .create(); - - Assertions.assertEquals("nggiycwkdtaa", response.location()); - Assertions.assertEquals("fe", response.tags().get("aumrrqmbzmqkrat")); - Assertions.assertEquals("inbmh", response.extendedLocation().type()); - Assertions.assertEquals("jijkgqxnhmbke", response.extendedLocation().name()); - Assertions.assertEquals("aujvaa", response.kind()); - Assertions.assertEquals("kak", response.vCenterId()); - Assertions.assertEquals("ldtve", response.moRefId()); - Assertions.assertEquals("oclzhz", response.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresDeleteMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresDeleteMockTests.java deleted file mode 100644 index 47143c99350f..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.datastores().delete("wqagnepzwa", "lsbs", true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresGetByResourceGroupWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index c2201919c134..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresGetByResourceGroupWithResponseMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Datastore; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"tw\",\"vCenterId\":\"aoypny\",\"moRefId\":\"shxcylhkg\",\"inventoryItemId\":\"sghpx\",\"moName\":\"phdrw\",\"statuses\":[{\"type\":\"vyom\",\"status\":\"luzvxnq\",\"reason\":\"rpqpd\",\"message\":\"mkoisqcssf\",\"severity\":\"uifmc\",\"lastUpdatedAt\":\"2021-03-21T06:41:36Z\"}],\"customResourceName\":\"bkdq\",\"capacityGB\":5872888328178981690,\"freeSpaceGB\":8748760013319181749,\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"trczzydmxzjijp\",\"name\":\"aurkihcirlde\"},\"kind\":\"dcoxnbk\",\"location\":\"ja\",\"tags\":{\"zxqltgrdogypx\":\"nnqbnqbp\",\"bfihw\":\"x\"},\"id\":\"hvcta\",\"name\":\"s\",\"type\":\"bxrblmliowxihspn\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Datastore response = manager.datastores() - .getByResourceGroupWithResponse("lzgaufcshhvnew", "nxkympqanxrjk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ja", response.location()); - Assertions.assertEquals("nnqbnqbp", response.tags().get("zxqltgrdogypx")); - Assertions.assertEquals("trczzydmxzjijp", response.extendedLocation().type()); - Assertions.assertEquals("aurkihcirlde", response.extendedLocation().name()); - Assertions.assertEquals("dcoxnbk", response.kind()); - Assertions.assertEquals("aoypny", response.vCenterId()); - Assertions.assertEquals("shxcylhkg", response.moRefId()); - Assertions.assertEquals("sghpx", response.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListByResourceGroupMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListByResourceGroupMockTests.java deleted file mode 100644 index 3ddb02c5088d..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListByResourceGroupMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Datastore; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"frgqhaohcm\",\"vCenterId\":\"oc\",\"moRefId\":\"r\",\"inventoryItemId\":\"mbpyryxamebly\",\"moName\":\"vkfkmr\",\"statuses\":[{\"type\":\"e\",\"status\":\"sm\",\"reason\":\"dlfp\",\"message\":\"pucygvoavyunss\",\"severity\":\"ghiee\",\"lastUpdatedAt\":\"2021-08-05T04:13:57Z\"}],\"customResourceName\":\"vvpa\",\"capacityGB\":8261650227561779504,\"freeSpaceGB\":232841743311876710,\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"uygdhgaqipirp\",\"name\":\"rqofulopmjnlexwh\"},\"kind\":\"pibkephuu\",\"location\":\"erctatoyin\",\"tags\":{\"rduczkgofxyfs\":\"brlc\",\"crrpcjttbstvje\":\"uc\",\"mlghktuidvrmazlp\":\"qnrmvvfko\",\"wvqsgny\":\"wwexymzvlazipbh\"},\"id\":\"uuzivensrpmeyyvp\",\"name\":\"patlbijp\",\"type\":\"gsksrfhf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.datastores().listByResourceGroup("unwqr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("erctatoyin", response.iterator().next().location()); - Assertions.assertEquals("brlc", response.iterator().next().tags().get("rduczkgofxyfs")); - Assertions.assertEquals("uygdhgaqipirp", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("rqofulopmjnlexwh", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("pibkephuu", response.iterator().next().kind()); - Assertions.assertEquals("oc", response.iterator().next().vCenterId()); - Assertions.assertEquals("r", response.iterator().next().moRefId()); - Assertions.assertEquals("mbpyryxamebly", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListMockTests.java deleted file mode 100644 index 54370b12b712..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Datastore; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class DatastoresListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"qagwwrxaomz\",\"vCenterId\":\"glrrczez\",\"moRefId\":\"hltnjadhqoawjq\",\"inventoryItemId\":\"ueayfbpcmsplb\",\"moName\":\"rueqthwm\",\"statuses\":[{\"type\":\"scbbxig\",\"status\":\"xiidloped\",\"reason\":\"dpyqyybxubmd\",\"message\":\"fcbqwremjela\",\"severity\":\"cigeleohdbvqvw\",\"lastUpdatedAt\":\"2021-10-08T05:02:22Z\"},{\"type\":\"pwbeonr\",\"status\":\"wzdqybxceakxcpts\",\"reason\":\"fyiaseqch\",\"message\":\"ttzrazisgyki\",\"severity\":\"mvanbwzo\",\"lastUpdatedAt\":\"2021-06-13T19:14:44Z\"}],\"customResourceName\":\"xxbsojklinhmd\",\"capacityGB\":5497286142790857324,\"freeSpaceGB\":7192084544319675802,\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"xojpslsvjgp\",\"name\":\"ufiqwoyxqvapcohh\"},\"kind\":\"qpqojxcxzrzd\",\"location\":\"gdzbenr\",\"tags\":{\"dtjwfljhznamt\":\"awetzq\",\"jj\":\"atmzw\",\"vgbgatzuuvbxng\":\"cqtjzmi\"},\"id\":\"ebwgga\",\"name\":\"ttzlswvajqfutlx\",\"type\":\"oqza\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.datastores().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gdzbenr", response.iterator().next().location()); - Assertions.assertEquals("awetzq", response.iterator().next().tags().get("dtjwfljhznamt")); - Assertions.assertEquals("xojpslsvjgp", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("ufiqwoyxqvapcohh", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("qpqojxcxzrzd", response.iterator().next().kind()); - Assertions.assertEquals("glrrczez", response.iterator().next().vCenterId()); - Assertions.assertEquals("hltnjadhqoawjq", response.iterator().next().moRefId()); - Assertions.assertEquals("ueayfbpcmsplb", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListTests.java deleted file mode 100644 index b2aa53b8613c..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/DatastoresListTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.DatastoreInner; -import com.azure.resourcemanager.connectedvmware.models.DatastoresList; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DatastoresListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoresList model = BinaryData.fromString( - "{\"nextLink\":\"llrxcyjmoad\",\"value\":[{\"properties\":{\"uuid\":\"arm\",\"vCenterId\":\"dmjsjqb\",\"moRefId\":\"hyxxrwlycoduhpk\",\"inventoryItemId\":\"gymare\",\"moName\":\"ajxq\",\"statuses\":[{\"type\":\"ky\",\"status\":\"beddgssofw\",\"reason\":\"zqalkrmnjijpx\",\"message\":\"q\",\"severity\":\"dfnbyxbaaabjyv\",\"lastUpdatedAt\":\"2021-10-17T00:26:42Z\"},{\"type\":\"imrzrtuzqog\",\"status\":\"xnevfdnwn\",\"reason\":\"ewzsyyceuzsoib\",\"message\":\"dpfrxtrthzvaytdw\",\"severity\":\"brqubp\",\"lastUpdatedAt\":\"2021-06-19T07:52:19Z\"}],\"customResourceName\":\"xiilivpdtiirqt\",\"capacityGB\":3832853758860614020,\"freeSpaceGB\":7272913098862288792,\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"squyfxrxxlep\",\"name\":\"amxjezwlw\"},\"kind\":\"uqlcvydy\",\"location\":\"atdooaojkniod\",\"tags\":{\"msbvdkcrodtjinf\":\"ebwnujhe\",\"akggkfpag\":\"jlfltkacjvefkdlf\",\"lyls\":\"owpulpq\"},\"id\":\"xkqjnsjervt\",\"name\":\"agxsdszuemps\",\"type\":\"zkfzbeyv\"},{\"properties\":{\"uuid\":\"qi\",\"vCenterId\":\"invkjjxdxrbuu\",\"moRefId\":\"clewyhm\",\"inventoryItemId\":\"paztzpofncck\",\"moName\":\"fz\",\"statuses\":[{\"type\":\"xbuy\",\"status\":\"xzfe\",\"reason\":\"tpp\",\"message\":\"o\",\"severity\":\"or\",\"lastUpdatedAt\":\"2021-10-02T12:11:14Z\"}],\"customResourceName\":\"olmncwsobqwcs\",\"capacityGB\":7757598215858797770,\"freeSpaceGB\":1277017380119093840,\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"dpfuvg\",\"name\":\"bjj\"},\"kind\":\"vxb\",\"location\":\"t\",\"tags\":{\"lxqtvcofudfl\":\"utncorm\"},\"id\":\"kgjubgdknnqvsazn\",\"name\":\"n\",\"type\":\"orudsgsa\"},{\"properties\":{\"uuid\":\"kycgrauwj\",\"vCenterId\":\"taeburuvdm\",\"moRefId\":\"s\",\"inventoryItemId\":\"l\",\"moName\":\"ab\",\"statuses\":[{\"type\":\"fkifr\",\"status\":\"puqujmqlgkfbtn\",\"reason\":\"aongbj\",\"message\":\"tujitcjedft\",\"severity\":\"ae\",\"lastUpdatedAt\":\"2021-01-22T13:54:08Z\"},{\"type\":\"v\",\"status\":\"pzfoqoui\",\"reason\":\"bxarzgszufoxci\",\"message\":\"p\",\"severity\":\"oamciodh\",\"lastUpdatedAt\":\"2021-03-05T14:35:53Z\"}],\"customResourceName\":\"xkhnzbonlwnto\",\"capacityGB\":5469965944483736213,\"freeSpaceGB\":2326533855790970349,\"provisioningState\":\"Failed\"},\"extendedLocation\":{\"type\":\"z\",\"name\":\"mrv\"},\"kind\":\"tvb\",\"location\":\"qgsfraoyzkoow\",\"tags\":{\"uximerqfobw\":\"nguxawqaldsy\",\"r\":\"znkbykutwpfhpagm\",\"kkze\":\"kdsnfdsdoakgtdl\",\"sdsttwvog\":\"dlhewp\"},\"id\":\"bbejdcngqqm\",\"name\":\"akufgmjz\",\"type\":\"wr\"},{\"properties\":{\"uuid\":\"rtwaenuuzko\",\"vCenterId\":\"minrfdw\",\"moRefId\":\"uhhziuiefozbhdm\",\"inventoryItemId\":\"l\",\"moName\":\"qhoftrmaequiah\",\"statuses\":[{\"type\":\"lfaoqzpiyylhaln\",\"status\":\"hc\",\"reason\":\"ph\",\"message\":\"ivwitqscywugg\",\"severity\":\"luhczbw\",\"lastUpdatedAt\":\"2021-12-09T17:28:10Z\"},{\"type\":\"i\",\"status\":\"brgz\",\"reason\":\"msweypqwdxggicc\",\"message\":\"xqhuexm\",\"severity\":\"tlstvlzywem\",\"lastUpdatedAt\":\"2021-05-31T04:58:05Z\"},{\"type\":\"csdtclusiypbs\",\"status\":\"ytguslf\",\"reason\":\"dcygqukyhejhz\",\"message\":\"xgfpelolppv\",\"severity\":\"r\",\"lastUpdatedAt\":\"2021-02-05T20:48:24Z\"},{\"type\":\"jzraehtwdwrf\",\"status\":\"wib\",\"reason\":\"cdl\",\"message\":\"shfwpracstwity\",\"severity\":\"evxccedcp\",\"lastUpdatedAt\":\"2021-05-27T10:40:38Z\"}],\"customResourceName\":\"odn\",\"capacityGB\":4239411735034713219,\"freeSpaceGB\":1605969144420197102,\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"tiugcxnav\",\"name\":\"xqi\"},\"kind\":\"unyowxwl\",\"location\":\"djrkvfgbvfvpd\",\"tags\":{\"bdeibqipqk\":\"acizsjqlhkrr\",\"rwkq\":\"hvxndzwmkrefajpj\"},\"id\":\"yhgbijtjivfx\",\"name\":\"sjabibs\",\"type\":\"stawfsdjpvkv\"}]}") - .toObject(DatastoresList.class); - Assertions.assertEquals("llrxcyjmoad", model.nextLink()); - Assertions.assertEquals("atdooaojkniod", model.value().get(0).location()); - Assertions.assertEquals("ebwnujhe", model.value().get(0).tags().get("msbvdkcrodtjinf")); - Assertions.assertEquals("squyfxrxxlep", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("amxjezwlw", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("uqlcvydy", model.value().get(0).kind()); - Assertions.assertEquals("dmjsjqb", model.value().get(0).vCenterId()); - Assertions.assertEquals("hyxxrwlycoduhpk", model.value().get(0).moRefId()); - Assertions.assertEquals("gymare", model.value().get(0).inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoresList model - = new DatastoresList().withNextLink("llrxcyjmoad") - .withValue( - Arrays.asList( - new DatastoreInner().withLocation("atdooaojkniod") - .withTags(mapOf("msbvdkcrodtjinf", "ebwnujhe", "akggkfpag", "jlfltkacjvefkdlf", "lyls", - "owpulpq")) - .withExtendedLocation(new ExtendedLocation().withType("squyfxrxxlep").withName("amxjezwlw")) - .withKind("uqlcvydy") - .withVCenterId("dmjsjqb") - .withMoRefId("hyxxrwlycoduhpk") - .withInventoryItemId("gymare"), - new DatastoreInner().withLocation("t") - .withTags(mapOf("lxqtvcofudfl", "utncorm")) - .withExtendedLocation(new ExtendedLocation().withType("dpfuvg").withName("bjj")) - .withKind("vxb") - .withVCenterId("invkjjxdxrbuu") - .withMoRefId("clewyhm") - .withInventoryItemId("paztzpofncck"), - new DatastoreInner().withLocation("qgsfraoyzkoow") - .withTags(mapOf("uximerqfobw", "nguxawqaldsy", "r", "znkbykutwpfhpagm", "kkze", - "kdsnfdsdoakgtdl", "sdsttwvog", "dlhewp")) - .withExtendedLocation(new ExtendedLocation().withType("z").withName("mrv")) - .withKind("tvb") - .withVCenterId("taeburuvdm") - .withMoRefId("s") - .withInventoryItemId("l"), - new DatastoreInner().withLocation("djrkvfgbvfvpd") - .withTags(mapOf("bdeibqipqk", "acizsjqlhkrr", "rwkq", "hvxndzwmkrefajpj")) - .withExtendedLocation(new ExtendedLocation().withType("tiugcxnav").withName("xqi")) - .withKind("unyowxwl") - .withVCenterId("minrfdw") - .withMoRefId("uhhziuiefozbhdm") - .withInventoryItemId("l"))); - model = BinaryData.fromObject(model).toObject(DatastoresList.class); - Assertions.assertEquals("llrxcyjmoad", model.nextLink()); - Assertions.assertEquals("atdooaojkniod", model.value().get(0).location()); - Assertions.assertEquals("ebwnujhe", model.value().get(0).tags().get("msbvdkcrodtjinf")); - Assertions.assertEquals("squyfxrxxlep", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("amxjezwlw", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("uqlcvydy", model.value().get(0).kind()); - Assertions.assertEquals("dmjsjqb", model.value().get(0).vCenterId()); - Assertions.assertEquals("hyxxrwlycoduhpk", model.value().get(0).moRefId()); - Assertions.assertEquals("gymare", model.value().get(0).inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ExtendedLocationTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ExtendedLocationTests.java deleted file mode 100644 index beeb5f98c61f..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ExtendedLocationTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"type\":\"dhugjzzdatqxhocd\",\"name\":\"ablgphuticndvk\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("dhugjzzdatqxhocd", model.type()); - Assertions.assertEquals("ablgphuticndvk", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withType("dhugjzzdatqxhocd").withName("ablgphuticndvk"); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("dhugjzzdatqxhocd", model.type()); - Assertions.assertEquals("ablgphuticndvk", model.name()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HardwareProfileTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HardwareProfileTests.java deleted file mode 100644 index 0727b5946e25..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HardwareProfileTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.HardwareProfile; -import org.junit.jupiter.api.Assertions; - -public final class HardwareProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HardwareProfile model = BinaryData.fromString( - "{\"memorySizeMB\":1064191938,\"numCPUs\":413797833,\"numCoresPerSocket\":607796900,\"cpuHotAddEnabled\":false,\"cpuHotRemoveEnabled\":false,\"memoryHotAddEnabled\":false}") - .toObject(HardwareProfile.class); - Assertions.assertEquals(1064191938, model.memorySizeMB()); - Assertions.assertEquals(413797833, model.numCPUs()); - Assertions.assertEquals(607796900, model.numCoresPerSocket()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HardwareProfile model = new HardwareProfile().withMemorySizeMB(1064191938) - .withNumCPUs(413797833) - .withNumCoresPerSocket(607796900); - model = BinaryData.fromObject(model).toObject(HardwareProfile.class); - Assertions.assertEquals(1064191938, model.memorySizeMB()); - Assertions.assertEquals(413797833, model.numCPUs()); - Assertions.assertEquals(607796900, model.numCoresPerSocket()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostInventoryItemTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostInventoryItemTests.java deleted file mode 100644 index 85ef3dbd4198..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostInventoryItemTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.HostInventoryItem; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemDetails; -import com.azure.resourcemanager.connectedvmware.models.InventoryType; -import org.junit.jupiter.api.Assertions; - -public final class HostInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HostInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"Host\",\"parent\":{\"inventoryItemId\":\"phbqz\",\"moName\":\"zakakankjpdn\",\"inventoryType\":\"VirtualNetwork\"},\"managedResourceId\":\"joylh\",\"moRefId\":\"muoyxprimr\",\"moName\":\"pteecjme\",\"provisioningState\":\"Succeeded\"}") - .toObject(HostInventoryItem.class); - Assertions.assertEquals("joylh", model.managedResourceId()); - Assertions.assertEquals("muoyxprimr", model.moRefId()); - Assertions.assertEquals("pteecjme", model.moName()); - Assertions.assertEquals("phbqz", model.parent().inventoryItemId()); - Assertions.assertEquals("zakakankjpdn", model.parent().moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_NETWORK, model.parent().inventoryType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HostInventoryItem model = new HostInventoryItem().withManagedResourceId("joylh") - .withMoRefId("muoyxprimr") - .withMoName("pteecjme") - .withParent(new InventoryItemDetails().withInventoryItemId("phbqz") - .withMoName("zakakankjpdn") - .withInventoryType(InventoryType.VIRTUAL_NETWORK)); - model = BinaryData.fromObject(model).toObject(HostInventoryItem.class); - Assertions.assertEquals("joylh", model.managedResourceId()); - Assertions.assertEquals("muoyxprimr", model.moRefId()); - Assertions.assertEquals("pteecjme", model.moName()); - Assertions.assertEquals("phbqz", model.parent().inventoryItemId()); - Assertions.assertEquals("zakakankjpdn", model.parent().moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_NETWORK, model.parent().inventoryType()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostModelInnerTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostModelInnerTests.java deleted file mode 100644 index 7906c11066b5..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostModelInnerTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.HostModelInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class HostModelInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HostModelInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"ccm\",\"vCenterId\":\"udxytlmoyrx\",\"moRefId\":\"fudwpznt\",\"inventoryItemId\":\"dzhlrq\",\"moName\":\"hckfrlhrx\",\"statuses\":[{\"type\":\"vpycanuzbp\",\"status\":\"afkuwb\",\"reason\":\"nwbmeh\",\"message\":\"eyvjusrtslhspkde\",\"severity\":\"aofmxagkvtme\",\"lastUpdatedAt\":\"2020-12-28T20:08:12Z\"}],\"customResourceName\":\"rhahvljuahaquhcd\",\"overallMemoryUsageGB\":4716171323603349027,\"memorySizeGB\":5990210580748230219,\"overallCpuUsageMHz\":495813413204095798,\"cpuMhz\":7771790370778973734,\"datastoreIds\":[\"mwsrcrgvxpvgo\",\"zlfmisgwbnbbeld\",\"wkz\",\"ali\"],\"networkIds\":[\"qhakauhashsf\",\"xosow\",\"xcug\"],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"xdje\",\"name\":\"pucwwfvovbvme\"},\"kind\":\"ivyhzceuojgjrwju\",\"location\":\"iotwmcdytdxwit\",\"tags\":{\"hniskxfbkpyc\":\"jawgqwg\"},\"id\":\"klwndnhjdauwhv\",\"name\":\"l\",\"type\":\"zbtd\"}") - .toObject(HostModelInner.class); - Assertions.assertEquals("iotwmcdytdxwit", model.location()); - Assertions.assertEquals("jawgqwg", model.tags().get("hniskxfbkpyc")); - Assertions.assertEquals("xdje", model.extendedLocation().type()); - Assertions.assertEquals("pucwwfvovbvme", model.extendedLocation().name()); - Assertions.assertEquals("ivyhzceuojgjrwju", model.kind()); - Assertions.assertEquals("udxytlmoyrx", model.vCenterId()); - Assertions.assertEquals("fudwpznt", model.moRefId()); - Assertions.assertEquals("dzhlrq", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HostModelInner model = new HostModelInner().withLocation("iotwmcdytdxwit") - .withTags(mapOf("hniskxfbkpyc", "jawgqwg")) - .withExtendedLocation(new ExtendedLocation().withType("xdje").withName("pucwwfvovbvme")) - .withKind("ivyhzceuojgjrwju") - .withVCenterId("udxytlmoyrx") - .withMoRefId("fudwpznt") - .withInventoryItemId("dzhlrq"); - model = BinaryData.fromObject(model).toObject(HostModelInner.class); - Assertions.assertEquals("iotwmcdytdxwit", model.location()); - Assertions.assertEquals("jawgqwg", model.tags().get("hniskxfbkpyc")); - Assertions.assertEquals("xdje", model.extendedLocation().type()); - Assertions.assertEquals("pucwwfvovbvme", model.extendedLocation().name()); - Assertions.assertEquals("ivyhzceuojgjrwju", model.kind()); - Assertions.assertEquals("udxytlmoyrx", model.vCenterId()); - Assertions.assertEquals("fudwpznt", model.moRefId()); - Assertions.assertEquals("dzhlrq", model.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostPropertiesTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostPropertiesTests.java deleted file mode 100644 index b675b1c96f05..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostPropertiesTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.HostProperties; -import org.junit.jupiter.api.Assertions; - -public final class HostPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HostProperties model = BinaryData.fromString( - "{\"uuid\":\"ujznb\",\"vCenterId\":\"ow\",\"moRefId\":\"przqlveu\",\"inventoryItemId\":\"upjm\",\"moName\":\"fxobbcsws\",\"statuses\":[{\"type\":\"iplrbpbewtghfgb\",\"status\":\"gw\",\"reason\":\"vlvqhjkbegi\",\"message\":\"nmxiebwwaloayqc\",\"severity\":\"rtzju\",\"lastUpdatedAt\":\"2021-08-18T20:27:18Z\"},{\"type\":\"zmh\",\"status\":\"ongmtsa\",\"reason\":\"cbpwxqpsrknft\",\"message\":\"vriuhprwmdyvx\",\"severity\":\"ayriwwroyqbexrm\",\"lastUpdatedAt\":\"2021-02-15T11:45:28Z\"},{\"type\":\"ycnojvknmefqsg\",\"status\":\"ah\",\"reason\":\"jyzhpvgq\",\"message\":\"j\",\"severity\":\"xdjzlmwlxk\",\"lastUpdatedAt\":\"2021-11-03T14:53:04Z\"},{\"type\":\"hzovawjvzunlut\",\"status\":\"n\",\"reason\":\"nxipeil\",\"message\":\"zuaejxd\",\"severity\":\"tskzbbtdzumveek\",\"lastUpdatedAt\":\"2021-02-08T12:29:03Z\"}],\"customResourceName\":\"zuhkfpbsjyof\",\"overallMemoryUsageGB\":2440593564933545315,\"memorySizeGB\":2245300278286998069,\"overallCpuUsageMHz\":2482891464624859950,\"cpuMhz\":5379568998060993412,\"datastoreIds\":[\"ekqvkeln\",\"mvb\"],\"networkIds\":[\"jsflhhcaalnjix\",\"sxyawjoyaqcs\",\"yjpkiidzyexz\",\"eli\"],\"provisioningState\":\"Succeeded\"}") - .toObject(HostProperties.class); - Assertions.assertEquals("ow", model.vCenterId()); - Assertions.assertEquals("przqlveu", model.moRefId()); - Assertions.assertEquals("upjm", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HostProperties model - = new HostProperties().withVCenterId("ow").withMoRefId("przqlveu").withInventoryItemId("upjm"); - model = BinaryData.fromObject(model).toObject(HostProperties.class); - Assertions.assertEquals("ow", model.vCenterId()); - Assertions.assertEquals("przqlveu", model.moRefId()); - Assertions.assertEquals("upjm", model.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsCreateMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsCreateMockTests.java deleted file mode 100644 index b5d95cab07fa..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsCreateMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.HostModel; -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 reactor.core.publisher.Mono; - -public final class HostsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"kufykhvu\",\"vCenterId\":\"epmrut\",\"moRefId\":\"abaobnslujdjltym\",\"inventoryItemId\":\"vguihywar\",\"moName\":\"pphkixkykxds\",\"statuses\":[{\"type\":\"mmuc\",\"status\":\"hikkflrmy\",\"reason\":\"incqlhriswsl\",\"message\":\"iiovgqcgxu\",\"severity\":\"qkctotiowlxte\",\"lastUpdatedAt\":\"2021-04-15T08:31:11Z\"},{\"type\":\"jgwdtgukranbl\",\"status\":\"hqlkccuzgygqwaho\",\"reason\":\"lwgniiprglvawu\",\"message\":\"d\",\"severity\":\"ypivlsbb\",\"lastUpdatedAt\":\"2021-04-29T01:29:01Z\"},{\"type\":\"ubkmifo\",\"status\":\"ku\",\"reason\":\"phavpmhbrb\",\"message\":\"vgovpbbttefjokn\",\"severity\":\"qyzqedikdfrdb\",\"lastUpdatedAt\":\"2021-06-22T11:56:18Z\"}],\"customResourceName\":\"jgeihfqlggwfi\",\"overallMemoryUsageGB\":3713162382247099392,\"memorySizeGB\":3041349716165954671,\"overallCpuUsageMHz\":8400849047416618449,\"cpuMhz\":7984888059357254959,\"datastoreIds\":[\"vljvrc\"],\"networkIds\":[\"qipgx\"],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"yqwcabvnuil\",\"name\":\"yaswlpaugmr\"},\"kind\":\"lrxw\",\"location\":\"oauk\",\"tags\":{\"oaedsxjwuivedwcg\":\"vcisiz\"},\"id\":\"eewxeiqbpsmg\",\"name\":\"mguaml\",\"type\":\"dlrgms\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - HostModel response = manager.hosts() - .define("gjekglklby") - .withRegion("lktgjc") - .withExistingResourceGroup("fiqgeaar") - .withTags(mapOf("bukklels", "uxhemlwywaeeczg", "srlsmd", "xblycsxzuj")) - .withExtendedLocation(new ExtendedLocation().withType("aoyankcoeqswa").withName("ltytmhdr")) - .withKind("nhd") - .withVCenterId("jirwgdnqzbrfk") - .withMoRefId("zhzmtksjci") - .withInventoryItemId("igsxcdgljplk") - .create(); - - Assertions.assertEquals("oauk", response.location()); - Assertions.assertEquals("vcisiz", response.tags().get("oaedsxjwuivedwcg")); - Assertions.assertEquals("yqwcabvnuil", response.extendedLocation().type()); - Assertions.assertEquals("yaswlpaugmr", response.extendedLocation().name()); - Assertions.assertEquals("lrxw", response.kind()); - Assertions.assertEquals("epmrut", response.vCenterId()); - Assertions.assertEquals("abaobnslujdjltym", response.moRefId()); - Assertions.assertEquals("vguihywar", response.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsDeleteMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsDeleteMockTests.java deleted file mode 100644 index f09dbbc23f80..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class HostsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.hosts().delete("aimmoiroqb", "shbraga", true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsGetByResourceGroupWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 421f33f01ef2..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsGetByResourceGroupWithResponseMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.HostModel; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class HostsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"vrh\",\"vCenterId\":\"jyoogwxh\",\"moRefId\":\"duugwbsre\",\"inventoryItemId\":\"fqkfuarenl\",\"moName\":\"htkln\",\"statuses\":[{\"type\":\"vvkyfedevjboslcq\",\"status\":\"p\",\"reason\":\"khminqcymc\",\"message\":\"gn\",\"severity\":\"xxewu\",\"lastUpdatedAt\":\"2021-12-10T01:41:50Z\"},{\"type\":\"udbchaqdtv\",\"status\":\"crqctmxxdtddmflh\",\"reason\":\"tx\",\"message\":\"tznapxbannovv\",\"severity\":\"czytprwn\",\"lastUpdatedAt\":\"2021-09-15T03:43:23Z\"}],\"customResourceName\":\"ev\",\"overallMemoryUsageGB\":714202887842253439,\"memorySizeGB\":5614821000884332657,\"overallCpuUsageMHz\":6747447163145822843,\"cpuMhz\":6999852526015460929,\"datastoreIds\":[\"sasbcrymodizrx\"],\"networkIds\":[\"bdxnaz\",\"mkmlmvevfx\",\"op\",\"hbzxli\"],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"dtfgxqbawpcbb\",\"name\":\"qcy\"},\"kind\":\"p\",\"location\":\"ofyuicd\",\"tags\":{\"wgbdvibidmhmwffp\":\"dyb\"},\"id\":\"fmuvapckccr\",\"name\":\"vwe\",\"type\":\"oxoyyukp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - HostModel response = manager.hosts() - .getByResourceGroupWithResponse("hpfpazjzoywjxhp", "ulontacnpqwteht", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ofyuicd", response.location()); - Assertions.assertEquals("dyb", response.tags().get("wgbdvibidmhmwffp")); - Assertions.assertEquals("dtfgxqbawpcbb", response.extendedLocation().type()); - Assertions.assertEquals("qcy", response.extendedLocation().name()); - Assertions.assertEquals("p", response.kind()); - Assertions.assertEquals("jyoogwxh", response.vCenterId()); - Assertions.assertEquals("duugwbsre", response.moRefId()); - Assertions.assertEquals("fqkfuarenl", response.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListByResourceGroupMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListByResourceGroupMockTests.java deleted file mode 100644 index d19ca11e5fbc..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListByResourceGroupMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.HostModel; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class HostsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"emhooclutnpq\",\"vCenterId\":\"mczjkm\",\"moRefId\":\"kyujxsglhsrrr\",\"inventoryItemId\":\"jylmbkzudnigr\",\"moName\":\"hotj\",\"statuses\":[{\"type\":\"xuzzjgnrefq\",\"status\":\"qotoihiqakydiwfb\",\"reason\":\"wpzdqtvhcspo\",\"message\":\"qaxsipietgbebjf\",\"severity\":\"bmoichd\",\"lastUpdatedAt\":\"2021-02-22T21:48:45Z\"},{\"type\":\"pubntnbatz\",\"status\":\"qs\",\"reason\":\"saaelca\",\"message\":\"cjuhplrvkm\",\"severity\":\"wmj\",\"lastUpdatedAt\":\"2021-03-03T06:49:15Z\"},{\"type\":\"ggcvk\",\"status\":\"lizrzbjpsfxsfuz\",\"reason\":\"vtmva\",\"message\":\"w\",\"severity\":\"qlvh\",\"lastUpdatedAt\":\"2021-03-03T15:39:40Z\"},{\"type\":\"eofiz\",\"status\":\"jfnmjmvlwyz\",\"reason\":\"blkujrllfojuidjp\",\"message\":\"yjucejikzoeo\",\"severity\":\"tzejetjklnt\",\"lastUpdatedAt\":\"2021-05-29T06:35:10Z\"}],\"customResourceName\":\"uzk\",\"overallMemoryUsageGB\":4359795110481373493,\"memorySizeGB\":3276001010985311867,\"overallCpuUsageMHz\":5622137267556803146,\"cpuMhz\":4405347795145754212,\"datastoreIds\":[\"rhtgvgzpcrrkol\",\"w\",\"mjsmwr\",\"kcdxfzzzw\"],\"networkIds\":[\"fitlhguynuchl\",\"mltx\",\"whmozusgzvlnsnnj\",\"fpafolpymwamxq\"],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"gdphtvdula\",\"name\":\"lejchcsr\"},\"kind\":\"nmzlanru\",\"location\":\"dwv\",\"tags\":{\"v\":\"cnzqtpjhmqr\",\"xsmlz\":\"hlaiwd\"},\"id\":\"hzdtxetlgydlh\",\"name\":\"vlnnpx\",\"type\":\"b\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.hosts().listByResourceGroup("lrocuyzlwh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dwv", response.iterator().next().location()); - Assertions.assertEquals("cnzqtpjhmqr", response.iterator().next().tags().get("v")); - Assertions.assertEquals("gdphtvdula", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("lejchcsr", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("nmzlanru", response.iterator().next().kind()); - Assertions.assertEquals("mczjkm", response.iterator().next().vCenterId()); - Assertions.assertEquals("kyujxsglhsrrr", response.iterator().next().moRefId()); - Assertions.assertEquals("jylmbkzudnigr", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListMockTests.java deleted file mode 100644 index 7765dc23d7c4..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.HostModel; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class HostsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"rmfsvbpav\",\"vCenterId\":\"pfppd\",\"moRefId\":\"nupgahxku\",\"inventoryItemId\":\"sjcaacfdmmcpugm\",\"moName\":\"qepvufhbzeh\",\"statuses\":[{\"type\":\"qhnlbqnbld\",\"status\":\"aclgschorimk\",\"reason\":\"r\",\"message\":\"oucs\",\"severity\":\"ldpuviy\",\"lastUpdatedAt\":\"2021-12-05T00:02:56Z\"},{\"type\":\"beolh\",\"status\":\"lvbmxuqibsxtkcu\",\"reason\":\"b\",\"message\":\"arfsi\",\"severity\":\"lkjxnqpvwgf\",\"lastUpdatedAt\":\"2021-04-12T06:32:21Z\"}],\"customResourceName\":\"qyki\",\"overallMemoryUsageGB\":293283490118699723,\"memorySizeGB\":3998193682786371340,\"overallCpuUsageMHz\":7863098536449541482,\"cpuMhz\":6674248213519143445,\"datastoreIds\":[\"xmycjimryvwgcw\",\"pbmz\",\"w\"],\"networkIds\":[\"dsxwefoh\"],\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"pwndyqlea\",\"name\":\"klmtkhlowkx\"},\"kind\":\"br\",\"location\":\"fjmzsyzfho\",\"tags\":{\"unsjlpjrtwszhvvu\":\"ikcyyc\"},\"id\":\"c\",\"name\":\"hvtrrmhwrbfdpyf\",\"type\":\"ubhvj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.hosts().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fjmzsyzfho", response.iterator().next().location()); - Assertions.assertEquals("ikcyyc", response.iterator().next().tags().get("unsjlpjrtwszhvvu")); - Assertions.assertEquals("pwndyqlea", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("klmtkhlowkx", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("br", response.iterator().next().kind()); - Assertions.assertEquals("pfppd", response.iterator().next().vCenterId()); - Assertions.assertEquals("nupgahxku", response.iterator().next().moRefId()); - Assertions.assertEquals("sjcaacfdmmcpugm", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListTests.java deleted file mode 100644 index 807f98f42307..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HostsListTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.HostModelInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.HostsList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class HostsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HostsList model = BinaryData.fromString( - "{\"nextLink\":\"ztfolhbnxk\",\"value\":[{\"properties\":{\"uuid\":\"aulppggd\",\"vCenterId\":\"napnyiropuhpigv\",\"moRefId\":\"ylgqgitxmedjvcsl\",\"inventoryItemId\":\"qwwncw\",\"moName\":\"hxg\",\"statuses\":[{\"type\":\"gucnapkte\",\"status\":\"llwptfdy\",\"reason\":\"fqbuaceopzf\",\"message\":\"hhuao\",\"severity\":\"pcqeqx\",\"lastUpdatedAt\":\"2021-02-19T08:33:13Z\"},{\"type\":\"ahzxctobgbk\",\"status\":\"oizpostmgrcfbun\",\"reason\":\"fqjhhkxbpvjymj\",\"message\":\"xjyngudivk\",\"severity\":\"swbxqz\",\"lastUpdatedAt\":\"2021-10-26T13:42:02Z\"}],\"customResourceName\":\"fauvjfdxx\",\"overallMemoryUsageGB\":246485485455680585,\"memorySizeGB\":186339366809590099,\"overallCpuUsageMHz\":1691424509403284517,\"cpuMhz\":5418508363199916719,\"datastoreIds\":[\"cbxvwvxyslqbh\",\"fxoblytkb\",\"mpew\"],\"networkIds\":[\"bkrvrnsvshqj\",\"hxcr\",\"bfovasrruvwbhsq\"],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"gjb\",\"name\":\"xb\"},\"kind\":\"srfbjfdtwss\",\"location\":\"t\",\"tags\":{\"exilzznfqqnvwpmq\":\"vjz\",\"r\":\"aruoujmkcjhwqyt\"},\"id\":\"bnw\",\"name\":\"ewgdrjervn\",\"type\":\"enq\"},{\"properties\":{\"uuid\":\"hin\",\"vCenterId\":\"ygmi\",\"moRefId\":\"hnzdndslgnayqi\",\"inventoryItemId\":\"nduhavhqlkthum\",\"moName\":\"olbgycduiertgccy\",\"statuses\":[{\"type\":\"l\",\"status\":\"slqlfmmdn\",\"reason\":\"glzpswiydm\",\"message\":\"yhz\",\"severity\":\"ss\",\"lastUpdatedAt\":\"2021-03-20T02:21:45Z\"},{\"type\":\"mnvdfzn\",\"status\":\"ao\",\"reason\":\"xzb\",\"message\":\"blylpstdbh\",\"severity\":\"srzdzucerscdn\",\"lastUpdatedAt\":\"2021-05-15T10:38:25Z\"}],\"customResourceName\":\"fiwjmygtdssls\",\"overallMemoryUsageGB\":1995934686601657592,\"memorySizeGB\":1708954452668375735,\"overallCpuUsageMHz\":2319180534572952806,\"cpuMhz\":7993353797121101484,\"datastoreIds\":[\"mwabnetshhszhedp\",\"vwiwubmwmbesld\"],\"networkIds\":[\"wtppjflcxogaoko\",\"z\"],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"vmkqzeqq\",\"name\":\"l\"},\"kind\":\"xmhhvhgureo\",\"location\":\"kwobdagxtibq\",\"tags\":{\"ogqxndlkzgxhuri\":\"xwak\",\"ebxmubyynt\":\"lbpodxunk\"},\"id\":\"lrb\",\"name\":\"tkoievseotgq\",\"type\":\"l\"},{\"properties\":{\"uuid\":\"muwlauwzizxbm\",\"vCenterId\":\"cjefuzmu\",\"moRefId\":\"bttdumorppxe\",\"inventoryItemId\":\"nzbtbhj\",\"moName\":\"lkfg\",\"statuses\":[{\"type\":\"euel\",\"status\":\"hsd\",\"reason\":\"t\",\"message\":\"fikdowwqu\",\"severity\":\"xzxcl\",\"lastUpdatedAt\":\"2021-10-23T21:40:50Z\"}],\"customResourceName\":\"hqzonosggbhcoh\",\"overallMemoryUsageGB\":6411320489884269010,\"memorySizeGB\":865048723597164706,\"overallCpuUsageMHz\":4626193574706169830,\"cpuMhz\":1682623003142529215,\"datastoreIds\":[\"wacf\",\"gdkz\",\"ewkfvhqcrai\"],\"networkIds\":[\"n\",\"pfuflrw\"],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"xyjrxsagafcnih\",\"name\":\"qapnedgfbcv\"},\"kind\":\"q\",\"location\":\"pkeqdcvdrhvoo\",\"tags\":{\"opcjwvnhd\":\"tbobz\",\"mgxcxrslpm\":\"d\",\"qsluicp\":\"twuoegrpkhjwni\"},\"id\":\"ggkzzlvmbmpa\",\"name\":\"modfvuefywsbpfvm\",\"type\":\"yhrfouyftaakcpw\"},{\"properties\":{\"uuid\":\"zvqtmnubexkp\",\"vCenterId\":\"smond\",\"moRefId\":\"quxvypomgkop\",\"inventoryItemId\":\"hojvpajqgxysmocm\",\"moName\":\"fqvm\",\"statuses\":[{\"type\":\"zapvhelx\",\"status\":\"glyatddckcbcuej\",\"reason\":\"xgc\",\"message\":\"ibrhosxsdqr\",\"severity\":\"o\",\"lastUpdatedAt\":\"2021-01-19T18:37:38Z\"},{\"type\":\"m\",\"status\":\"yiba\",\"reason\":\"fluszdtm\",\"message\":\"kwofyyvoq\",\"severity\":\"piexpbtgiw\",\"lastUpdatedAt\":\"2021-01-16T18:36:12Z\"}],\"customResourceName\":\"nwashrtd\",\"overallMemoryUsageGB\":5267748012493523201,\"memorySizeGB\":4226927042414197543,\"overallCpuUsageMHz\":456816387828721622,\"cpuMhz\":5768697708302228972,\"datastoreIds\":[\"ujw\",\"asipqiio\"],\"networkIds\":[\"qerpqlpqwcc\",\"uqgbdbutauvfbt\",\"uwhhmhykojoxafn\"],\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"chkoymkcdyh\",\"name\":\"kkpwdreqnovvq\"},\"kind\":\"ljxywsu\",\"location\":\"syrsndsytgadgvra\",\"tags\":{\"arrwlquu\":\"neqn\"},\"id\":\"jfqka\",\"name\":\"e\",\"type\":\"iipfpubj\"}]}") - .toObject(HostsList.class); - Assertions.assertEquals("ztfolhbnxk", model.nextLink()); - Assertions.assertEquals("t", model.value().get(0).location()); - Assertions.assertEquals("vjz", model.value().get(0).tags().get("exilzznfqqnvwpmq")); - Assertions.assertEquals("gjb", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("xb", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("srfbjfdtwss", model.value().get(0).kind()); - Assertions.assertEquals("napnyiropuhpigv", model.value().get(0).vCenterId()); - Assertions.assertEquals("ylgqgitxmedjvcsl", model.value().get(0).moRefId()); - Assertions.assertEquals("qwwncw", model.value().get(0).inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HostsList model = new HostsList().withNextLink("ztfolhbnxk") - .withValue(Arrays.asList( - new HostModelInner().withLocation("t") - .withTags(mapOf("exilzznfqqnvwpmq", "vjz", "r", "aruoujmkcjhwqyt")) - .withExtendedLocation(new ExtendedLocation().withType("gjb").withName("xb")) - .withKind("srfbjfdtwss") - .withVCenterId("napnyiropuhpigv") - .withMoRefId("ylgqgitxmedjvcsl") - .withInventoryItemId("qwwncw"), - new HostModelInner().withLocation("kwobdagxtibq") - .withTags(mapOf("ogqxndlkzgxhuri", "xwak", "ebxmubyynt", "lbpodxunk")) - .withExtendedLocation(new ExtendedLocation().withType("vmkqzeqq").withName("l")) - .withKind("xmhhvhgureo") - .withVCenterId("ygmi") - .withMoRefId("hnzdndslgnayqi") - .withInventoryItemId("nduhavhqlkthum"), - new HostModelInner().withLocation("pkeqdcvdrhvoo") - .withTags(mapOf("opcjwvnhd", "tbobz", "mgxcxrslpm", "d", "qsluicp", "twuoegrpkhjwni")) - .withExtendedLocation(new ExtendedLocation().withType("xyjrxsagafcnih").withName("qapnedgfbcv")) - .withKind("q") - .withVCenterId("cjefuzmu") - .withMoRefId("bttdumorppxe") - .withInventoryItemId("nzbtbhj"), - new HostModelInner().withLocation("syrsndsytgadgvra") - .withTags(mapOf("arrwlquu", "neqn")) - .withExtendedLocation(new ExtendedLocation().withType("chkoymkcdyh").withName("kkpwdreqnovvq")) - .withKind("ljxywsu") - .withVCenterId("smond") - .withMoRefId("quxvypomgkop") - .withInventoryItemId("hojvpajqgxysmocm"))); - model = BinaryData.fromObject(model).toObject(HostsList.class); - Assertions.assertEquals("ztfolhbnxk", model.nextLink()); - Assertions.assertEquals("t", model.value().get(0).location()); - Assertions.assertEquals("vjz", model.value().get(0).tags().get("exilzznfqqnvwpmq")); - Assertions.assertEquals("gjb", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("xb", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("srfbjfdtwss", model.value().get(0).kind()); - Assertions.assertEquals("napnyiropuhpigv", model.value().get(0).vCenterId()); - Assertions.assertEquals("ylgqgitxmedjvcsl", model.value().get(0).moRefId()); - Assertions.assertEquals("qwwncw", model.value().get(0).inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HttpProxyConfigurationTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HttpProxyConfigurationTests.java deleted file mode 100644 index ea3106a5fbfa..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/HttpProxyConfigurationTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.HttpProxyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class HttpProxyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpProxyConfiguration model - = BinaryData.fromString("{\"httpsProxy\":\"ah\"}").toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("ah", model.httpsProxy()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpProxyConfiguration model = new HttpProxyConfiguration().withHttpsProxy("ah"); - model = BinaryData.fromObject(model).toObject(HttpProxyConfiguration.class); - Assertions.assertEquals("ah", model.httpsProxy()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InfrastructureProfileTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InfrastructureProfileTests.java deleted file mode 100644 index 6b7d6fadef80..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InfrastructureProfileTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.FirmwareType; -import com.azure.resourcemanager.connectedvmware.models.InfrastructureProfile; -import org.junit.jupiter.api.Assertions; - -public final class InfrastructureProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InfrastructureProfile model = BinaryData.fromString( - "{\"templateId\":\"azul\",\"vCenterId\":\"ethwwnpjhlfz\",\"moRefId\":\"pchwa\",\"inventoryItemId\":\"bousn\",\"moName\":\"pgfewetwlyx\",\"folderPath\":\"cxy\",\"instanceUuid\":\"hdjhlimmbcx\",\"smbiosUuid\":\"bcporxvxcjzhqizx\",\"firmwareType\":\"efi\",\"customResourceName\":\"gqscj\"}") - .toObject(InfrastructureProfile.class); - Assertions.assertEquals("azul", model.templateId()); - Assertions.assertEquals("ethwwnpjhlfz", model.vCenterId()); - Assertions.assertEquals("bousn", model.inventoryItemId()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.smbiosUuid()); - Assertions.assertEquals(FirmwareType.EFI, model.firmwareType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InfrastructureProfile model = new InfrastructureProfile().withTemplateId("azul") - .withVCenterId("ethwwnpjhlfz") - .withInventoryItemId("bousn") - .withSmbiosUuid("bcporxvxcjzhqizx") - .withFirmwareType(FirmwareType.EFI); - model = BinaryData.fromObject(model).toObject(InfrastructureProfile.class); - Assertions.assertEquals("azul", model.templateId()); - Assertions.assertEquals("ethwwnpjhlfz", model.vCenterId()); - Assertions.assertEquals("bousn", model.inventoryItemId()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.smbiosUuid()); - Assertions.assertEquals(FirmwareType.EFI, model.firmwareType()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemDetailsTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemDetailsTests.java deleted file mode 100644 index 88565b3cf524..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemDetailsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemDetails; -import com.azure.resourcemanager.connectedvmware.models.InventoryType; -import org.junit.jupiter.api.Assertions; - -public final class InventoryItemDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InventoryItemDetails model = BinaryData.fromString( - "{\"inventoryItemId\":\"rteeamm\",\"moName\":\"iekkkzddrtkgdojb\",\"inventoryType\":\"VirtualMachine\"}") - .toObject(InventoryItemDetails.class); - Assertions.assertEquals("rteeamm", model.inventoryItemId()); - Assertions.assertEquals("iekkkzddrtkgdojb", model.moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_MACHINE, model.inventoryType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InventoryItemDetails model = new InventoryItemDetails().withInventoryItemId("rteeamm") - .withMoName("iekkkzddrtkgdojb") - .withInventoryType(InventoryType.VIRTUAL_MACHINE); - model = BinaryData.fromObject(model).toObject(InventoryItemDetails.class); - Assertions.assertEquals("rteeamm", model.inventoryItemId()); - Assertions.assertEquals("iekkkzddrtkgdojb", model.moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_MACHINE, model.inventoryType()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemInnerTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemInnerTests.java deleted file mode 100644 index 1437c1c54d34..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemInnerTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.InventoryItemInner; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemProperties; -import org.junit.jupiter.api.Assertions; - -public final class InventoryItemInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InventoryItemInner model = BinaryData.fromString( - "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"ezwwv\",\"moRefId\":\"qyuvvfonkp\",\"moName\":\"qyikvy\",\"provisioningState\":\"Failed\"},\"kind\":\"avluwmncs\",\"id\":\"ijf\",\"name\":\"bvpoekrsgsgbdhu\",\"type\":\"qgnjdgkynscli\"}") - .toObject(InventoryItemInner.class); - Assertions.assertEquals("ezwwv", model.properties().managedResourceId()); - Assertions.assertEquals("qyuvvfonkp", model.properties().moRefId()); - Assertions.assertEquals("qyikvy", model.properties().moName()); - Assertions.assertEquals("avluwmncs", model.kind()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InventoryItemInner model = new InventoryItemInner().withProperties( - new InventoryItemProperties().withManagedResourceId("ezwwv").withMoRefId("qyuvvfonkp").withMoName("qyikvy")) - .withKind("avluwmncs"); - model = BinaryData.fromObject(model).toObject(InventoryItemInner.class); - Assertions.assertEquals("ezwwv", model.properties().managedResourceId()); - Assertions.assertEquals("qyuvvfonkp", model.properties().moRefId()); - Assertions.assertEquals("qyikvy", model.properties().moName()); - Assertions.assertEquals("avluwmncs", model.kind()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemPropertiesTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemPropertiesTests.java deleted file mode 100644 index 5d05d9c3b689..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemPropertiesTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemProperties; -import org.junit.jupiter.api.Assertions; - -public final class InventoryItemPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InventoryItemProperties model = BinaryData.fromString( - "{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"zvhxnk\",\"moRefId\":\"tkubotppn\",\"moName\":\"xz\",\"provisioningState\":\"Deleting\"}") - .toObject(InventoryItemProperties.class); - Assertions.assertEquals("zvhxnk", model.managedResourceId()); - Assertions.assertEquals("tkubotppn", model.moRefId()); - Assertions.assertEquals("xz", model.moName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InventoryItemProperties model - = new InventoryItemProperties().withManagedResourceId("zvhxnk").withMoRefId("tkubotppn").withMoName("xz"); - model = BinaryData.fromObject(model).toObject(InventoryItemProperties.class); - Assertions.assertEquals("zvhxnk", model.managedResourceId()); - Assertions.assertEquals("tkubotppn", model.moRefId()); - Assertions.assertEquals("xz", model.moName()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsCreateWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsCreateWithResponseMockTests.java deleted file mode 100644 index 1c2b31b24e1f..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsCreateWithResponseMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.InventoryItem; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class InventoryItemsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"bewreswmowegmmut\",\"moRefId\":\"xeyg\",\"moName\":\"igijiitnspxlz\",\"provisioningState\":\"Provisioning\"},\"kind\":\"grijwaiufanrayb\",\"id\":\"eqfrojs\",\"name\":\"dgrhydkygywezs\",\"type\":\"iecafygzmxi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - InventoryItem response = manager.inventoryItems() - .define("hpzfngqj") - .withExistingVcenter("zulo", "saeuzanhsfnhsenw") - .withProperties(new InventoryItemProperties().withManagedResourceId("idftujwjjufwbe") - .withMoRefId("k") - .withMoName("rhtssr")) - .withKind("dvhazcvjy") - .create(); - - Assertions.assertEquals("bewreswmowegmmut", response.properties().managedResourceId()); - Assertions.assertEquals("xeyg", response.properties().moRefId()); - Assertions.assertEquals("igijiitnspxlz", response.properties().moName()); - Assertions.assertEquals("grijwaiufanrayb", response.kind()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsDeleteWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsDeleteWithResponseMockTests.java deleted file mode 100644 index 542e8b35b2ad..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class InventoryItemsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.inventoryItems().deleteWithResponse("rcssbzhddubbnq", "b", "h", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsGetWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsGetWithResponseMockTests.java deleted file mode 100644 index dc29e3958604..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsGetWithResponseMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.InventoryItem; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class InventoryItemsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"iryky\",\"moRefId\":\"dzfqivjreuy\",\"moName\":\"bmnwa\",\"provisioningState\":\"Canceled\"},\"kind\":\"xoe\",\"id\":\"nqlnfwmyymvqd\",\"name\":\"pb\",\"type\":\"fckdvez\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - InventoryItem response = manager.inventoryItems() - .getWithResponse("mx", "okcvtlubses", "vcuartrhun", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("iryky", response.properties().managedResourceId()); - Assertions.assertEquals("dzfqivjreuy", response.properties().moRefId()); - Assertions.assertEquals("bmnwa", response.properties().moName()); - Assertions.assertEquals("xoe", response.kind()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListByVCenterMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListByVCenterMockTests.java deleted file mode 100644 index 161f9156dcef..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListByVCenterMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.InventoryItem; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class InventoryItemsListByVCenterMockTests { - @Test - public void testListByVCenter() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"qgdm\",\"moRefId\":\"i\",\"moName\":\"teajohiyg\",\"provisioningState\":\"Succeeded\"},\"kind\":\"onhpcz\",\"id\":\"mktp\",\"name\":\"wxqcsehchkhufmpq\",\"type\":\"mqyjgy\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.inventoryItems().listByVCenter("alehpav", "wugiqjti", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qgdm", response.iterator().next().properties().managedResourceId()); - Assertions.assertEquals("i", response.iterator().next().properties().moRefId()); - Assertions.assertEquals("teajohiyg", response.iterator().next().properties().moName()); - Assertions.assertEquals("onhpcz", response.iterator().next().kind()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListTests.java deleted file mode 100644 index 72978c86478a..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/InventoryItemsListTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.InventoryItemInner; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemProperties; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class InventoryItemsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InventoryItemsList model = BinaryData.fromString( - "{\"nextLink\":\"frbbc\",\"value\":[{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"agtltdhlfkqoj\",\"moRefId\":\"kvgtrdcn\",\"moName\":\"mzzs\",\"provisioningState\":\"Succeeded\"},\"kind\":\"rnysux\",\"id\":\"rafwgckhocxvdf\",\"name\":\"fwafqrouda\",\"type\":\"pavehhr\"},{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"bunzozudh\",\"moRefId\":\"gkmoyxcdyuibhmfd\",\"moName\":\"zydvfvf\",\"provisioningState\":\"Failed\"},\"kind\":\"eoisrvhmgor\",\"id\":\"ukiscvwmzhw\",\"name\":\"lefaxvxilcbtgn\",\"type\":\"nzeyqxtjj\"},{\"properties\":{\"inventoryType\":\"InventoryItemProperties\",\"managedResourceId\":\"qlqhycavodg\",\"moRefId\":\"dbeesmie\",\"moName\":\"lrariaawiu\",\"provisioningState\":\"Deleting\"},\"kind\":\"wqfbylyrfgiagt\",\"id\":\"jocqwogfnzjvusf\",\"name\":\"ld\",\"type\":\"ozuxylfsbtkadpys\"}]}") - .toObject(InventoryItemsList.class); - Assertions.assertEquals("frbbc", model.nextLink()); - Assertions.assertEquals("agtltdhlfkqoj", model.value().get(0).properties().managedResourceId()); - Assertions.assertEquals("kvgtrdcn", model.value().get(0).properties().moRefId()); - Assertions.assertEquals("mzzs", model.value().get(0).properties().moName()); - Assertions.assertEquals("rnysux", model.value().get(0).kind()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InventoryItemsList model = new InventoryItemsList().withNextLink("frbbc") - .withValue(Arrays.asList( - new InventoryItemInner() - .withProperties(new InventoryItemProperties().withManagedResourceId("agtltdhlfkqoj") - .withMoRefId("kvgtrdcn") - .withMoName("mzzs")) - .withKind("rnysux"), - new InventoryItemInner().withProperties(new InventoryItemProperties().withManagedResourceId("bunzozudh") - .withMoRefId("gkmoyxcdyuibhmfd") - .withMoName("zydvfvf")).withKind("eoisrvhmgor"), - new InventoryItemInner() - .withProperties(new InventoryItemProperties().withManagedResourceId("qlqhycavodg") - .withMoRefId("dbeesmie") - .withMoName("lrariaawiu")) - .withKind("wqfbylyrfgiagt"))); - model = BinaryData.fromObject(model).toObject(InventoryItemsList.class); - Assertions.assertEquals("frbbc", model.nextLink()); - Assertions.assertEquals("agtltdhlfkqoj", model.value().get(0).properties().managedResourceId()); - Assertions.assertEquals("kvgtrdcn", model.value().get(0).properties().moRefId()); - Assertions.assertEquals("mzzs", model.value().get(0).properties().moName()); - Assertions.assertEquals("rnysux", model.value().get(0).kind()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/NicIpAddressSettingsTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/NicIpAddressSettingsTests.java deleted file mode 100644 index 54bcf79dcd6e..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/NicIpAddressSettingsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.NicIpAddressSettings; - -public final class NicIpAddressSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NicIpAddressSettings model = BinaryData - .fromString( - "{\"allocationMethod\":\"ool\",\"ipAddress\":\"tpkiwkkbnujry\",\"subnetMask\":\"tylbfpncurdoiw\"}") - .toObject(NicIpAddressSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NicIpAddressSettings model = new NicIpAddressSettings(); - model = BinaryData.fromObject(model).toObject(NicIpAddressSettings.class); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/NicIpSettingsTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/NicIpSettingsTests.java deleted file mode 100644 index ae4c8de3a157..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/NicIpSettingsTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.IpAddressAllocationMethod; -import com.azure.resourcemanager.connectedvmware.models.NicIpSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class NicIpSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NicIpSettings model = BinaryData.fromString( - "{\"allocationMethod\":\"random\",\"dnsServers\":[\"vfelfktgplcrpwj\"],\"gateway\":[\"noigbrnjwmwk\",\"nbsazejjoqkag\"],\"ipAddress\":\"sxtta\",\"subnetMask\":\"zxnfaaz\",\"primaryWinsServer\":\"dtnkdmkq\",\"secondaryWinsServer\":\"lwuenvrkp\",\"ipAddressInfo\":[{\"allocationMethod\":\"ibreb\",\"ipAddress\":\"aysjkixqtnqttez\",\"subnetMask\":\"fffiak\"},{\"allocationMethod\":\"pqqmted\",\"ipAddress\":\"mmji\",\"subnetMask\":\"eozphv\"},{\"allocationMethod\":\"uyqncygupkvipmd\",\"ipAddress\":\"wx\",\"subnetMask\":\"pevzhfst\"},{\"allocationMethod\":\"xhojuj\",\"ipAddress\":\"pelmcuvhixbjxyf\",\"subnetMask\":\"yl\"}]}") - .toObject(NicIpSettings.class); - Assertions.assertEquals(IpAddressAllocationMethod.RANDOM, model.allocationMethod()); - Assertions.assertEquals("vfelfktgplcrpwj", model.dnsServers().get(0)); - Assertions.assertEquals("noigbrnjwmwk", model.gateway().get(0)); - Assertions.assertEquals("sxtta", model.ipAddress()); - Assertions.assertEquals("zxnfaaz", model.subnetMask()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NicIpSettings model = new NicIpSettings().withAllocationMethod(IpAddressAllocationMethod.RANDOM) - .withDnsServers(Arrays.asList("vfelfktgplcrpwj")) - .withGateway(Arrays.asList("noigbrnjwmwk", "nbsazejjoqkag")) - .withIpAddress("sxtta") - .withSubnetMask("zxnfaaz"); - model = BinaryData.fromObject(model).toObject(NicIpSettings.class); - Assertions.assertEquals(IpAddressAllocationMethod.RANDOM, model.allocationMethod()); - Assertions.assertEquals("vfelfktgplcrpwj", model.dnsServers().get(0)); - Assertions.assertEquals("noigbrnjwmwk", model.gateway().get(0)); - Assertions.assertEquals("sxtta", model.ipAddress()); - Assertions.assertEquals("zxnfaaz", model.subnetMask()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationDisplayTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationDisplayTests.java deleted file mode 100644 index 6ebff6e581da..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationDisplayTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"kwm\",\"resource\":\"ktsizntocipaou\",\"operation\":\"psqucmpoyf\",\"description\":\"fogknygjofjdde\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("kwm", model.provider()); - Assertions.assertEquals("ktsizntocipaou", model.resource()); - Assertions.assertEquals("psqucmpoyf", model.operation()); - Assertions.assertEquals("fogknygjofjdde", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("kwm") - .withResource("ktsizntocipaou") - .withOperation("psqucmpoyf") - .withDescription("fogknygjofjdde"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("kwm", model.provider()); - Assertions.assertEquals("ktsizntocipaou", model.resource()); - Assertions.assertEquals("psqucmpoyf", model.operation()); - Assertions.assertEquals("fogknygjofjdde", model.description()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationInnerTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationInnerTests.java deleted file mode 100644 index fc0cfa163949..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationInnerTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.OperationInner; -import com.azure.resourcemanager.connectedvmware.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"qglhq\",\"isDataAction\":false,\"display\":{\"provider\":\"oo\",\"resource\":\"wifsq\",\"operation\":\"aagdfmg\",\"description\":\"lhjxr\"}}") - .toObject(OperationInner.class); - Assertions.assertEquals("qglhq", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("oo", model.display().provider()); - Assertions.assertEquals("wifsq", model.display().resource()); - Assertions.assertEquals("aagdfmg", model.display().operation()); - Assertions.assertEquals("lhjxr", model.display().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("qglhq") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("oo") - .withResource("wifsq") - .withOperation("aagdfmg") - .withDescription("lhjxr")); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("qglhq", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("oo", model.display().provider()); - Assertions.assertEquals("wifsq", model.display().resource()); - Assertions.assertEquals("aagdfmg", model.display().operation()); - Assertions.assertEquals("lhjxr", model.display().description()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListMockTests.java deleted file mode 100644 index 6a39e3fdc7b6..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListMockTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"tvasy\",\"isDataAction\":false,\"display\":{\"provider\":\"aumweoohguufu\",\"resource\":\"oyjathwtzol\",\"operation\":\"emwmdxmebwjs\",\"description\":\"p\"}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tvasy", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("aumweoohguufu", response.iterator().next().display().provider()); - Assertions.assertEquals("oyjathwtzol", response.iterator().next().display().resource()); - Assertions.assertEquals("emwmdxmebwjs", response.iterator().next().display().operation()); - Assertions.assertEquals("p", response.iterator().next().display().description()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListTests.java deleted file mode 100644 index 9c4285b9e227..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/OperationsListTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.OperationInner; -import com.azure.resourcemanager.connectedvmware.models.OperationDisplay; -import com.azure.resourcemanager.connectedvmware.models.OperationsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationsList model = BinaryData.fromString( - "{\"nextLink\":\"mhquvgjxp\",\"value\":[{\"name\":\"zm\",\"isDataAction\":false,\"display\":{\"provider\":\"opb\",\"resource\":\"h\",\"operation\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"}},{\"name\":\"tbmufpo\",\"isDataAction\":false,\"display\":{\"provider\":\"hwlrx\",\"resource\":\"qsoqijgkd\",\"operation\":\"pazlobcufpdz\",\"description\":\"btcqq\"}}]}") - .toObject(OperationsList.class); - Assertions.assertEquals("mhquvgjxp", model.nextLink()); - Assertions.assertEquals("zm", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("opb", model.value().get(0).display().provider()); - Assertions.assertEquals("h", model.value().get(0).display().resource()); - Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().operation()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationsList model = new OperationsList().withNextLink("mhquvgjxp") - .withValue(Arrays.asList( - new OperationInner().withName("zm") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("opb") - .withResource("h") - .withOperation("pidgsybbejhphoyc") - .withDescription("xaobhdxbmtqioqjz")), - new OperationInner().withName("tbmufpo") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("hwlrx") - .withResource("qsoqijgkd") - .withOperation("pazlobcufpdz") - .withDescription("btcqq")))); - model = BinaryData.fromObject(model).toObject(OperationsList.class); - Assertions.assertEquals("mhquvgjxp", model.nextLink()); - Assertions.assertEquals("zm", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("opb", model.value().get(0).display().provider()); - Assertions.assertEquals("h", model.value().get(0).display().resource()); - Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().operation()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/PlacementProfileTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/PlacementProfileTests.java deleted file mode 100644 index a4459ee2e563..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/PlacementProfileTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.PlacementProfile; -import org.junit.jupiter.api.Assertions; - -public final class PlacementProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PlacementProfile model = BinaryData.fromString( - "{\"resourcePoolId\":\"qibrtalme\",\"clusterId\":\"t\",\"hostId\":\"dslqxihhrmooizqs\",\"datastoreId\":\"pxiutc\"}") - .toObject(PlacementProfile.class); - Assertions.assertEquals("qibrtalme", model.resourcePoolId()); - Assertions.assertEquals("t", model.clusterId()); - Assertions.assertEquals("dslqxihhrmooizqs", model.hostId()); - Assertions.assertEquals("pxiutc", model.datastoreId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PlacementProfile model = new PlacementProfile().withResourcePoolId("qibrtalme") - .withClusterId("t") - .withHostId("dslqxihhrmooizqs") - .withDatastoreId("pxiutc"); - model = BinaryData.fromObject(model).toObject(PlacementProfile.class); - Assertions.assertEquals("qibrtalme", model.resourcePoolId()); - Assertions.assertEquals("t", model.clusterId()); - Assertions.assertEquals("dslqxihhrmooizqs", model.hostId()); - Assertions.assertEquals("pxiutc", model.datastoreId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePatchTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePatchTests.java deleted file mode 100644 index 3baada3069f2..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePatchTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.ResourcePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourcePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourcePatch model = BinaryData - .fromString("{\"tags\":{\"k\":\"wyiftyhxhur\",\"kjfkg\":\"tyxolniwpwc\",\"plwckbas\":\"awxklr\"}}") - .toObject(ResourcePatch.class); - Assertions.assertEquals("wyiftyhxhur", model.tags().get("k")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourcePatch model - = new ResourcePatch().withTags(mapOf("k", "wyiftyhxhur", "kjfkg", "tyxolniwpwc", "plwckbas", "awxklr")); - model = BinaryData.fromObject(model).toObject(ResourcePatch.class); - Assertions.assertEquals("wyiftyhxhur", model.tags().get("k")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolInnerTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolInnerTests.java deleted file mode 100644 index b424448b14ea..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolInnerTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.ResourcePoolInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourcePoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourcePoolInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"rd\",\"vCenterId\":\"pewnw\",\"moRefId\":\"itjz\",\"inventoryItemId\":\"lusarh\",\"moName\":\"fcqhsmyurkd\",\"cpuSharesLevel\":\"lx\",\"cpuReservationMHz\":4178590504492637721,\"cpuLimitMHz\":1357587298187996304,\"memSharesLevel\":\"xukcdmpar\",\"memReservationMB\":743663973345531285,\"memLimitMB\":7105688458172828807,\"memOverallUsageGB\":8444265625651342832,\"memCapacityGB\":1140479818693475214,\"cpuOverallUsageMHz\":680048985091356612,\"cpuCapacityMHz\":5153006235521521190,\"customResourceName\":\"whfpmrqobmtu\",\"datastoreIds\":[\"ryrtihfxtijbpzv\",\"nwzsymg\"],\"networkIds\":[\"fcyzkohdbihanufh\"],\"statuses\":[{\"type\":\"y\",\"status\":\"git\",\"reason\":\"qhabifpikxwcz\",\"message\":\"scnpqxuhivy\",\"severity\":\"iwbybrkxvdumjg\",\"lastUpdatedAt\":\"2020-12-24T14:06:57Z\"}],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"xgaudccs\",\"name\":\"s\"},\"kind\":\"yejhk\",\"location\":\"yhtnapczwlokjye\",\"tags\":{\"jnchgej\":\"vnipjox\",\"huxinpmqnj\":\"podmailzydehojwy\",\"vcputegj\":\"qwixjspro\"},\"id\":\"wmfdatscmdvpjhul\",\"name\":\"uuvmkjozkrwfnd\",\"type\":\"odjpslwejd\"}") - .toObject(ResourcePoolInner.class); - Assertions.assertEquals("yhtnapczwlokjye", model.location()); - Assertions.assertEquals("vnipjox", model.tags().get("jnchgej")); - Assertions.assertEquals("xgaudccs", model.extendedLocation().type()); - Assertions.assertEquals("s", model.extendedLocation().name()); - Assertions.assertEquals("yejhk", model.kind()); - Assertions.assertEquals("pewnw", model.vCenterId()); - Assertions.assertEquals("itjz", model.moRefId()); - Assertions.assertEquals("lusarh", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourcePoolInner model = new ResourcePoolInner().withLocation("yhtnapczwlokjye") - .withTags(mapOf("jnchgej", "vnipjox", "huxinpmqnj", "podmailzydehojwy", "vcputegj", "qwixjspro")) - .withExtendedLocation(new ExtendedLocation().withType("xgaudccs").withName("s")) - .withKind("yejhk") - .withVCenterId("pewnw") - .withMoRefId("itjz") - .withInventoryItemId("lusarh"); - model = BinaryData.fromObject(model).toObject(ResourcePoolInner.class); - Assertions.assertEquals("yhtnapczwlokjye", model.location()); - Assertions.assertEquals("vnipjox", model.tags().get("jnchgej")); - Assertions.assertEquals("xgaudccs", model.extendedLocation().type()); - Assertions.assertEquals("s", model.extendedLocation().name()); - Assertions.assertEquals("yejhk", model.kind()); - Assertions.assertEquals("pewnw", model.vCenterId()); - Assertions.assertEquals("itjz", model.moRefId()); - Assertions.assertEquals("lusarh", model.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolInventoryItemTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolInventoryItemTests.java deleted file mode 100644 index 209683144691..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolInventoryItemTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemDetails; -import com.azure.resourcemanager.connectedvmware.models.InventoryType; -import com.azure.resourcemanager.connectedvmware.models.ResourcePoolInventoryItem; -import org.junit.jupiter.api.Assertions; - -public final class ResourcePoolInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourcePoolInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"ResourcePool\",\"parent\":{\"inventoryItemId\":\"nljlageuaulx\",\"moName\":\"smjbnkppxyn\",\"inventoryType\":\"Datastore\"},\"managedResourceId\":\"vxei\",\"moRefId\":\"gwklnsr\",\"moName\":\"feycxcktp\",\"provisioningState\":\"Accepted\"}") - .toObject(ResourcePoolInventoryItem.class); - Assertions.assertEquals("vxei", model.managedResourceId()); - Assertions.assertEquals("gwklnsr", model.moRefId()); - Assertions.assertEquals("feycxcktp", model.moName()); - Assertions.assertEquals("nljlageuaulx", model.parent().inventoryItemId()); - Assertions.assertEquals("smjbnkppxyn", model.parent().moName()); - Assertions.assertEquals(InventoryType.DATASTORE, model.parent().inventoryType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourcePoolInventoryItem model = new ResourcePoolInventoryItem().withManagedResourceId("vxei") - .withMoRefId("gwklnsr") - .withMoName("feycxcktp") - .withParent(new InventoryItemDetails().withInventoryItemId("nljlageuaulx") - .withMoName("smjbnkppxyn") - .withInventoryType(InventoryType.DATASTORE)); - model = BinaryData.fromObject(model).toObject(ResourcePoolInventoryItem.class); - Assertions.assertEquals("vxei", model.managedResourceId()); - Assertions.assertEquals("gwklnsr", model.moRefId()); - Assertions.assertEquals("feycxcktp", model.moName()); - Assertions.assertEquals("nljlageuaulx", model.parent().inventoryItemId()); - Assertions.assertEquals("smjbnkppxyn", model.parent().moName()); - Assertions.assertEquals(InventoryType.DATASTORE, model.parent().inventoryType()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolPropertiesTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolPropertiesTests.java deleted file mode 100644 index f2a2155b4ff7..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.ResourcePoolProperties; -import org.junit.jupiter.api.Assertions; - -public final class ResourcePoolPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourcePoolProperties model = BinaryData.fromString( - "{\"uuid\":\"wryoqpsoacc\",\"vCenterId\":\"zakljlahbc\",\"moRefId\":\"ffdfdosygexpa\",\"inventoryItemId\":\"akhmsbzjhcrz\",\"moName\":\"dphlxaolt\",\"cpuSharesLevel\":\"trg\",\"cpuReservationMHz\":2908308735087138118,\"cpuLimitMHz\":944566396017418310,\"memSharesLevel\":\"inzgvfcj\",\"memReservationMB\":7824790174257851163,\"memLimitMB\":4946734162442896103,\"memOverallUsageGB\":6186462241741426226,\"memCapacityGB\":8522131427631788859,\"cpuOverallUsageMHz\":5924201566480225751,\"cpuCapacityMHz\":5636651603478237083,\"customResourceName\":\"peqfpjkjl\",\"datastoreIds\":[\"pdvhpfxxypin\",\"nmayhuybb\",\"podepoo\"],\"networkIds\":[\"uvamiheognarxzxt\",\"eotusivyevc\",\"iqihn\"],\"statuses\":[{\"type\":\"bwjzr\",\"status\":\"ygxgispemvtz\",\"reason\":\"ufubl\",\"message\":\"fxqeof\",\"severity\":\"e\",\"lastUpdatedAt\":\"2021-01-23T13:20:17Z\"},{\"type\":\"jbasvmsmjqulngs\",\"status\":\"nbybkzgcwrwcl\",\"reason\":\"wrljdouskc\",\"message\":\"kocrcjdkwtnhx\",\"severity\":\"jbiksqrglssai\",\"lastUpdatedAt\":\"2021-09-05T10:45:28Z\"}],\"provisioningState\":\"Accepted\"}") - .toObject(ResourcePoolProperties.class); - Assertions.assertEquals("zakljlahbc", model.vCenterId()); - Assertions.assertEquals("ffdfdosygexpa", model.moRefId()); - Assertions.assertEquals("akhmsbzjhcrz", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourcePoolProperties model = new ResourcePoolProperties().withVCenterId("zakljlahbc") - .withMoRefId("ffdfdosygexpa") - .withInventoryItemId("akhmsbzjhcrz"); - model = BinaryData.fromObject(model).toObject(ResourcePoolProperties.class); - Assertions.assertEquals("zakljlahbc", model.vCenterId()); - Assertions.assertEquals("ffdfdosygexpa", model.moRefId()); - Assertions.assertEquals("akhmsbzjhcrz", model.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsCreateMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsCreateMockTests.java deleted file mode 100644 index 6995a0fb817c..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsCreateMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.ResourcePool; -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 reactor.core.publisher.Mono; - -public final class ResourcePoolsCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"ylnio\",\"vCenterId\":\"zgb\",\"moRefId\":\"edm\",\"inventoryItemId\":\"kvnlvxbcuiiznkt\",\"moName\":\"ansnvp\",\"cpuSharesLevel\":\"bmikost\",\"cpuReservationMHz\":4326566704546612095,\"cpuLimitMHz\":4946452508128515048,\"memSharesLevel\":\"qnyophzfyls\",\"memReservationMB\":1557828548687606223,\"memLimitMB\":2804347969541145358,\"memOverallUsageGB\":8283915751167918851,\"memCapacityGB\":3624952235307178463,\"cpuOverallUsageMHz\":51966962354029378,\"cpuCapacityMHz\":4477654614915843418,\"customResourceName\":\"fwlwxjwetnps\",\"datastoreIds\":[\"lafzvaylptr\",\"qqwzt\",\"mwqkchcxwaxf\"],\"networkIds\":[\"jkjexf\",\"eqvhpsylkk\",\"hkbffmbm\"],\"statuses\":[{\"type\":\"gywwpgjxs\",\"status\":\"tf\",\"reason\":\"gicgaaoepttaq\",\"message\":\"dewemxswv\",\"severity\":\"unzzjgehk\",\"lastUpdatedAt\":\"2021-10-15T08:21:58Z\"},{\"type\":\"rtixokff\",\"status\":\"inljqepqwhixmo\",\"reason\":\"tshi\",\"message\":\"gvelfc\",\"severity\":\"uccbirdsvuw\",\"lastUpdatedAt\":\"2021-09-01T15:39:22Z\"},{\"type\":\"egstmninwjizci\",\"status\":\"ghgshejjtbxqmu\",\"reason\":\"xlxqzvn\",\"message\":\"sbycucrwnamikz\",\"severity\":\"rqbsmswziq\",\"lastUpdatedAt\":\"2021-08-26T22:22:09Z\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"ruswhv\",\"name\":\"zznvfbyc\"},\"kind\":\"jww\",\"location\":\"xzv\",\"tags\":{\"aohdjh\":\"mxqhndvnoamldse\",\"pelnjetag\":\"flzokxco\",\"npbs\":\"tsxoatftgz\",\"g\":\"vefloccsrmozihmi\"},\"id\":\"wtxxpkyjcx\",\"name\":\"jxgrytfmp\",\"type\":\"ycilrmcaykggnox\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ResourcePool response = manager.resourcePools() - .define("ygznmmaxrizk") - .withRegion("bcblemb") - .withExistingResourceGroup("aabzmif") - .withTags(mapOf("xk", "wvq", "tswbzuwfmd", "ivqiheb", "vcjfelisdjubggb", "ragegi")) - .withExtendedLocation(new ExtendedLocation().withType("wdofdbxiqx").withName("iqbi")) - .withKind("mwwinhehfqpofv") - .withVCenterId("eixynllxecwcroj") - .withMoRefId("slhcawjutifd") - .withInventoryItemId("mvi") - .create(); - - Assertions.assertEquals("xzv", response.location()); - Assertions.assertEquals("mxqhndvnoamldse", response.tags().get("aohdjh")); - Assertions.assertEquals("ruswhv", response.extendedLocation().type()); - Assertions.assertEquals("zznvfbyc", response.extendedLocation().name()); - Assertions.assertEquals("jww", response.kind()); - Assertions.assertEquals("zgb", response.vCenterId()); - Assertions.assertEquals("edm", response.moRefId()); - Assertions.assertEquals("kvnlvxbcuiiznkt", response.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsDeleteMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsDeleteMockTests.java deleted file mode 100644 index e5eefde5ede2..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourcePoolsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.resourcePools().delete("uncuw", "qspkcdqzhlctd", true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsGetByResourceGroupWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 196fe3999d66..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsGetByResourceGroupWithResponseMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.ResourcePool; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourcePoolsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"nmwmqtibx\",\"vCenterId\":\"jddtvqct\",\"moRefId\":\"dija\",\"inventoryItemId\":\"kmr\",\"moName\":\"eekpndz\",\"cpuSharesLevel\":\"pmudqmeqwig\",\"cpuReservationMHz\":1602038748333470502,\"cpuLimitMHz\":2895883377575243380,\"memSharesLevel\":\"xebeybpmz\",\"memReservationMB\":2659167645361302478,\"memLimitMB\":7788648309029183931,\"memOverallUsageGB\":6216202256317875925,\"memCapacityGB\":2351276297783847180,\"cpuOverallUsageMHz\":2269669619896016049,\"cpuCapacityMHz\":1564244716535718272,\"customResourceName\":\"hvseufuqyrx\",\"datastoreIds\":[\"cgq\",\"sismjqfrddga\",\"quhiosrsjuivf\"],\"networkIds\":[\"syirnx\"],\"statuses\":[{\"type\":\"exrxzbujrtrhq\",\"status\":\"revkhgnlnzo\",\"reason\":\"lrpiqywnc\",\"message\":\"tszcofizehtdhgb\",\"severity\":\"vreljea\",\"lastUpdatedAt\":\"2021-11-11T12:18:44Z\"},{\"type\":\"zmlovuanash\",\"status\":\"lpmjerb\",\"reason\":\"elvidizozsdbccx\",\"message\":\"on\",\"severity\":\"gnwncypuuwwlt\",\"lastUpdatedAt\":\"2021-11-20T18:00Z\"},{\"type\":\"ctzenkeifzzhmkd\",\"status\":\"vflyhbxcu\",\"reason\":\"hxgsrboldfor\",\"message\":\"wjlvizbfhfov\",\"severity\":\"cqpbtuo\",\"lastUpdatedAt\":\"2021-01-13T00:41:11Z\"},{\"type\":\"zab\",\"status\":\"l\",\"reason\":\"umuaslzkwrrwoycq\",\"message\":\"wyh\",\"severity\":\"nomdrkywuhpsv\",\"lastUpdatedAt\":\"2021-05-26T05:35:58Z\"}],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"we\",\"name\":\"wlalniexzsrzp\"},\"kind\":\"q\",\"location\":\"yb\",\"tags\":{\"q\":\"pgdakchzyvli\",\"bn\":\"rkcxkj\"},\"id\":\"mysu\",\"name\":\"swqrntvlwijp\",\"type\":\"ttexoqqpwcyyufmh\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ResourcePool response = manager.resourcePools() - .getByResourceGroupWithResponse("hlxvea", "f", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("yb", response.location()); - Assertions.assertEquals("pgdakchzyvli", response.tags().get("q")); - Assertions.assertEquals("we", response.extendedLocation().type()); - Assertions.assertEquals("wlalniexzsrzp", response.extendedLocation().name()); - Assertions.assertEquals("q", response.kind()); - Assertions.assertEquals("jddtvqct", response.vCenterId()); - Assertions.assertEquals("dija", response.moRefId()); - Assertions.assertEquals("kmr", response.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListByResourceGroupMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListByResourceGroupMockTests.java deleted file mode 100644 index 9be52f296719..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListByResourceGroupMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.ResourcePool; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourcePoolsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"sufco\",\"vCenterId\":\"xbzlmc\",\"moRefId\":\"apcvhdbe\",\"inventoryItemId\":\"qqxeyskon\",\"moName\":\"inkfkbgbz\",\"cpuSharesLevel\":\"wxeqocljmygvkzqk\",\"cpuReservationMHz\":6840851965786880952,\"cpuLimitMHz\":7293408626017162403,\"memSharesLevel\":\"fezrx\",\"memReservationMB\":7858948374904708355,\"memLimitMB\":2096730824064656722,\"memOverallUsageGB\":5192277708355571160,\"memCapacityGB\":5656206728888374015,\"cpuOverallUsageMHz\":2834445186156751088,\"cpuCapacityMHz\":5401595898507177425,\"customResourceName\":\"v\",\"datastoreIds\":[\"zdix\",\"mqpnoda\"],\"networkIds\":[\"qhewj\"],\"statuses\":[{\"type\":\"gsbos\",\"status\":\"eln\",\"reason\":\"atutmzlbiojlvfhr\",\"message\":\"pn\",\"severity\":\"vcwwyyurmochppr\",\"lastUpdatedAt\":\"2021-07-30T06:29:45Z\"},{\"type\":\"mo\",\"status\":\"yzejnhlbk\",\"reason\":\"z\",\"message\":\"piljhahzvech\",\"severity\":\"bnwieholew\",\"lastUpdatedAt\":\"2021-04-16T07:06:36Z\"},{\"type\":\"ubwefqs\",\"status\":\"paq\",\"reason\":\"e\",\"message\":\"q\",\"severity\":\"x\",\"lastUpdatedAt\":\"2021-01-01T10:51:26Z\"},{\"type\":\"xap\",\"status\":\"og\",\"reason\":\"nobpudcdabtqwpw\",\"message\":\"wbzasqbuclj\",\"severity\":\"yexaoguy\",\"lastUpdatedAt\":\"2021-08-28T08:30:08Z\"}],\"provisioningState\":\"Accepted\"},\"extendedLocation\":{\"type\":\"ault\",\"name\":\"jjum\"},\"kind\":\"azlnqnmcjngzqdqx\",\"location\":\"bjwgnyfus\",\"tags\":{\"lcfhmlrqryxy\":\"vtuikzhajq\",\"sovwxznptgoeiyb\":\"qnzrd\"},\"id\":\"abpfhvfs\",\"name\":\"kvntjlrigjkskyri\",\"type\":\"ovzidsx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.resourcePools().listByResourceGroup("gqcwdhohsdtmc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bjwgnyfus", response.iterator().next().location()); - Assertions.assertEquals("vtuikzhajq", response.iterator().next().tags().get("lcfhmlrqryxy")); - Assertions.assertEquals("ault", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("jjum", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("azlnqnmcjngzqdqx", response.iterator().next().kind()); - Assertions.assertEquals("xbzlmc", response.iterator().next().vCenterId()); - Assertions.assertEquals("apcvhdbe", response.iterator().next().moRefId()); - Assertions.assertEquals("qqxeyskon", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListMockTests.java deleted file mode 100644 index 67efdd421d2f..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.ResourcePool; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ResourcePoolsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"qn\",\"vCenterId\":\"fpch\",\"moRefId\":\"bnjj\",\"inventoryItemId\":\"gegydcwboxjum\",\"moName\":\"qoli\",\"cpuSharesLevel\":\"raiouaubrjtl\",\"cpuReservationMHz\":7313245137237683770,\"cpuLimitMHz\":1602845993561098649,\"memSharesLevel\":\"ngiflrzpasccbi\",\"memReservationMB\":6146616583927063148,\"memLimitMB\":8285848251032513410,\"memOverallUsageGB\":698736176074570590,\"memCapacityGB\":7996059228480805157,\"cpuOverallUsageMHz\":1642641561666020981,\"cpuCapacityMHz\":7468151687790427261,\"customResourceName\":\"vruzslzojhpctfnm\",\"datastoreIds\":[\"tngfdgugeyzihgr\",\"yui\"],\"networkIds\":[\"snmfpphojeevy\",\"yhsgz\"],\"statuses\":[{\"type\":\"gomfgbeglq\",\"status\":\"eohibet\",\"reason\":\"uankrrfxeeeb\",\"message\":\"j\",\"severity\":\"cvbmqzb\",\"lastUpdatedAt\":\"2021-07-24T22:10:06Z\"},{\"type\":\"aj\",\"status\":\"wxacevehj\",\"reason\":\"yxoaf\",\"message\":\"oqltfae\",\"severity\":\"inmfgvxirp\",\"lastUpdatedAt\":\"2021-10-29T21:02:05Z\"},{\"type\":\"ypoq\",\"status\":\"hlqhykprlpy\",\"reason\":\"uciqdsme\",\"message\":\"itdfuxtyasiib\",\"severity\":\"ybnnustg\",\"lastUpdatedAt\":\"2021-05-02T07:22:39Z\"}],\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"ixhcmavmqfoudor\",\"name\":\"gyyprotwy\"},\"kind\":\"d\",\"location\":\"bxhugcmjkavlgorb\",\"tags\":{\"jltfvnzcyjtotpv\":\"pmdtz\"},\"id\":\"pvpbdbzqgqqiheds\",\"name\":\"qwthmky\",\"type\":\"bcysih\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.resourcePools().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bxhugcmjkavlgorb", response.iterator().next().location()); - Assertions.assertEquals("pmdtz", response.iterator().next().tags().get("jltfvnzcyjtotpv")); - Assertions.assertEquals("ixhcmavmqfoudor", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("gyyprotwy", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("d", response.iterator().next().kind()); - Assertions.assertEquals("fpch", response.iterator().next().vCenterId()); - Assertions.assertEquals("bnjj", response.iterator().next().moRefId()); - Assertions.assertEquals("gegydcwboxjum", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListTests.java deleted file mode 100644 index 3e8e68f2aa21..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourcePoolsListTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.ResourcePoolInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.ResourcePoolsList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourcePoolsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourcePoolsList model = BinaryData.fromString( - "{\"nextLink\":\"pnddhsgcbacphejk\",\"value\":[{\"properties\":{\"uuid\":\"nqgoulzndli\",\"vCenterId\":\"yqkgfg\",\"moRefId\":\"madgakeqsrxyb\",\"inventoryItemId\":\"qedqytbciqfoufl\",\"moName\":\"nkzsmodmglou\",\"cpuSharesLevel\":\"b\",\"cpuReservationMHz\":3504538577144527643,\"cpuLimitMHz\":9064339058448952534,\"memSharesLevel\":\"qktapspwgcuert\",\"memReservationMB\":7020809285560485144,\"memLimitMB\":6338655194328976084,\"memOverallUsageGB\":4689863445512368729,\"memCapacityGB\":1046762399333359388,\"cpuOverallUsageMHz\":6432231641159211987,\"cpuCapacityMHz\":2979857989241942,\"customResourceName\":\"gmbmbexppbh\",\"datastoreIds\":[\"rolfpfp\",\"algbquxigjyjg\"],\"networkIds\":[\"o\",\"fhrtxilnerkujysv\",\"eju\",\"fqawrlyxw\"],\"statuses\":[{\"type\":\"rbnwbxgjvtbvpy\",\"status\":\"zdn\",\"reason\":\"jq\",\"message\":\"hmuouqfprwzwbn\",\"severity\":\"itnwuizgazxufi\",\"lastUpdatedAt\":\"2021-07-05T04:35:30Z\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"hr\",\"name\":\"dfvzwdzuhty\"},\"kind\":\"sdkf\",\"location\":\"hwxmnteiwa\",\"tags\":{\"jcmmxdcufufsrp\":\"km\",\"sgfyccsnew\":\"mzidnsezcxtb\",\"oosflnr\":\"dwzjeiach\",\"vypyqrimzinpv\":\"sfqpteehz\"},\"id\":\"wjdk\",\"name\":\"rsoodqxhcrmnoh\",\"type\":\"t\"},{\"properties\":{\"uuid\":\"whdsoifiyip\",\"vCenterId\":\"sqwpgrjb\",\"moRefId\":\"orcjxvsnby\",\"inventoryItemId\":\"abnmocpcyshu\",\"moName\":\"afbljjgpbtoqcjmk\",\"cpuSharesLevel\":\"a\",\"cpuReservationMHz\":1289808063070531024,\"cpuLimitMHz\":8304735873585257815,\"memSharesLevel\":\"jzyulpk\",\"memReservationMB\":5292140963008321434,\"memLimitMB\":5090033425355731207,\"memOverallUsageGB\":5301305904738744047,\"memCapacityGB\":7860487098364913435,\"cpuOverallUsageMHz\":425051225083018289,\"cpuCapacityMHz\":3011777543730351640,\"customResourceName\":\"zloc\",\"datastoreIds\":[\"paierh\"],\"networkIds\":[\"sglumma\",\"tjaodxobnb\"],\"statuses\":[{\"type\":\"pxokajionp\",\"status\":\"ex\",\"reason\":\"txgcpodgmaajr\",\"message\":\"djwzrlov\",\"severity\":\"lwhijcoejctbzaq\",\"lastUpdatedAt\":\"2021-02-04T17:33:10Z\"}],\"provisioningState\":\"Provisioning\"},\"extendedLocation\":{\"type\":\"bfkgukdkex\",\"name\":\"pofm\"},\"kind\":\"c\",\"location\":\"jpgd\",\"tags\":{\"j\":\"c\",\"hd\":\"hvpmoue\",\"bzv\":\"xibqeojnx\",\"pzaoqvuhr\":\"dntwndeicbtw\"},\"id\":\"cffcyddglmj\",\"name\":\"hjq\",\"type\":\"wpyeicxmqciwqvh\"}]}") - .toObject(ResourcePoolsList.class); - Assertions.assertEquals("pnddhsgcbacphejk", model.nextLink()); - Assertions.assertEquals("hwxmnteiwa", model.value().get(0).location()); - Assertions.assertEquals("km", model.value().get(0).tags().get("jcmmxdcufufsrp")); - Assertions.assertEquals("hr", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("dfvzwdzuhty", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("sdkf", model.value().get(0).kind()); - Assertions.assertEquals("yqkgfg", model.value().get(0).vCenterId()); - Assertions.assertEquals("madgakeqsrxyb", model.value().get(0).moRefId()); - Assertions.assertEquals("qedqytbciqfoufl", model.value().get(0).inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourcePoolsList model = new ResourcePoolsList().withNextLink("pnddhsgcbacphejk") - .withValue(Arrays.asList( - new ResourcePoolInner().withLocation("hwxmnteiwa") - .withTags(mapOf("jcmmxdcufufsrp", "km", "sgfyccsnew", "mzidnsezcxtb", "oosflnr", "dwzjeiach", - "vypyqrimzinpv", "sfqpteehz")) - .withExtendedLocation(new ExtendedLocation().withType("hr").withName("dfvzwdzuhty")) - .withKind("sdkf") - .withVCenterId("yqkgfg") - .withMoRefId("madgakeqsrxyb") - .withInventoryItemId("qedqytbciqfoufl"), - new ResourcePoolInner().withLocation("jpgd") - .withTags(mapOf("j", "c", "hd", "hvpmoue", "bzv", "xibqeojnx", "pzaoqvuhr", "dntwndeicbtw")) - .withExtendedLocation(new ExtendedLocation().withType("bfkgukdkex").withName("pofm")) - .withKind("c") - .withVCenterId("sqwpgrjb") - .withMoRefId("orcjxvsnby") - .withInventoryItemId("abnmocpcyshu"))); - model = BinaryData.fromObject(model).toObject(ResourcePoolsList.class); - Assertions.assertEquals("pnddhsgcbacphejk", model.nextLink()); - Assertions.assertEquals("hwxmnteiwa", model.value().get(0).location()); - Assertions.assertEquals("km", model.value().get(0).tags().get("jcmmxdcufufsrp")); - Assertions.assertEquals("hr", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("dfvzwdzuhty", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("sdkf", model.value().get(0).kind()); - Assertions.assertEquals("yqkgfg", model.value().get(0).vCenterId()); - Assertions.assertEquals("madgakeqsrxyb", model.value().get(0).moRefId()); - Assertions.assertEquals("qedqytbciqfoufl", model.value().get(0).inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourceStatusTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourceStatusTests.java deleted file mode 100644 index e9c8244b8f60..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/ResourceStatusTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.ResourceStatus; - -public final class ResourceStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceStatus model = BinaryData.fromString( - "{\"type\":\"zlljfmppeebvm\",\"status\":\"sabkyqduujitcjcz\",\"reason\":\"evndh\",\"message\":\"wpdappdsbdkv\",\"severity\":\"wjfeusnhutjel\",\"lastUpdatedAt\":\"2021-04-28T11:05:16Z\"}") - .toObject(ResourceStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceStatus model = new ResourceStatus(); - model = BinaryData.fromObject(model).toObject(ResourceStatus.class); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/SecurityProfileTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/SecurityProfileTests.java deleted file mode 100644 index 217474b40f87..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/SecurityProfileTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.SecurityProfile; -import com.azure.resourcemanager.connectedvmware.models.UefiSettings; -import org.junit.jupiter.api.Assertions; - -public final class SecurityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SecurityProfile model - = BinaryData.fromString("{\"uefiSettings\":{\"secureBootEnabled\":true}}").toObject(SecurityProfile.class); - Assertions.assertEquals(true, model.uefiSettings().secureBootEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SecurityProfile model = new SecurityProfile().withUefiSettings(new UefiSettings().withSecureBootEnabled(true)); - model = BinaryData.fromObject(model).toObject(SecurityProfile.class); - Assertions.assertEquals(true, model.uefiSettings().secureBootEnabled()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/StopVirtualMachineOptionsTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/StopVirtualMachineOptionsTests.java deleted file mode 100644 index a3d1c5ea70a8..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/StopVirtualMachineOptionsTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.StopVirtualMachineOptions; -import org.junit.jupiter.api.Assertions; - -public final class StopVirtualMachineOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StopVirtualMachineOptions model - = BinaryData.fromString("{\"skipShutdown\":true}").toObject(StopVirtualMachineOptions.class); - Assertions.assertEquals(true, model.skipShutdown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StopVirtualMachineOptions model = new StopVirtualMachineOptions().withSkipShutdown(true); - model = BinaryData.fromObject(model).toObject(StopVirtualMachineOptions.class); - Assertions.assertEquals(true, model.skipShutdown()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/UefiSettingsTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/UefiSettingsTests.java deleted file mode 100644 index 58d01a955f17..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/UefiSettingsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.UefiSettings; -import org.junit.jupiter.api.Assertions; - -public final class UefiSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UefiSettings model = BinaryData.fromString("{\"secureBootEnabled\":false}").toObject(UefiSettings.class); - Assertions.assertEquals(false, model.secureBootEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UefiSettings model = new UefiSettings().withSecureBootEnabled(false); - model = BinaryData.fromObject(model).toObject(UefiSettings.class); - Assertions.assertEquals(false, model.secureBootEnabled()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VCentersDeleteMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VCentersDeleteMockTests.java deleted file mode 100644 index ada81889a7fa..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VCentersDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VCentersDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.vCenters().delete("hf", "zv", false, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInventoryItemTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInventoryItemTests.java deleted file mode 100644 index 1d0ba619d56f..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineInventoryItemTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.InventoryItemDetails; -import com.azure.resourcemanager.connectedvmware.models.InventoryType; -import com.azure.resourcemanager.connectedvmware.models.OsType; -import com.azure.resourcemanager.connectedvmware.models.VirtualMachineInventoryItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"VirtualMachine\",\"osType\":\"Windows\",\"osName\":\"efdeesve\",\"ipAddresses\":[\"jpxtxsuwprtuj\",\"sawddjibabxvi\"],\"folderPath\":\"tvtzeexavoxtfg\",\"host\":{\"inventoryItemId\":\"dmdqb\",\"moName\":\"ypq\",\"inventoryType\":\"VirtualMachine\"},\"resourcePool\":{\"inventoryItemId\":\"acbslhhxu\",\"moName\":\"xvodhtnsir\",\"inventoryType\":\"Host\"},\"cluster\":{\"inventoryItemId\":\"mes\",\"moName\":\"dlpagzrcxfail\",\"inventoryType\":\"VirtualMachineTemplate\"},\"instanceUuid\":\"m\",\"smbiosUuid\":\"oxdfgsftu\",\"powerState\":\"obrjlnacgcc\",\"toolsRunningStatus\":\"nhxk\",\"toolsVersionStatus\":\"v\",\"toolsVersion\":\"nrzvuljraaer\",\"managedResourceId\":\"okqgukkjq\",\"moRefId\":\"broyla\",\"moName\":\"ulcdisdosf\",\"provisioningState\":\"Failed\"}") - .toObject(VirtualMachineInventoryItem.class); - Assertions.assertEquals("okqgukkjq", model.managedResourceId()); - Assertions.assertEquals("broyla", model.moRefId()); - Assertions.assertEquals("ulcdisdosf", model.moName()); - Assertions.assertEquals(OsType.WINDOWS, model.osType()); - Assertions.assertEquals("efdeesve", model.osName()); - Assertions.assertEquals("jpxtxsuwprtuj", model.ipAddresses().get(0)); - Assertions.assertEquals("tvtzeexavoxtfg", model.folderPath()); - Assertions.assertEquals("dmdqb", model.host().inventoryItemId()); - Assertions.assertEquals("ypq", model.host().moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_MACHINE, model.host().inventoryType()); - Assertions.assertEquals("acbslhhxu", model.resourcePool().inventoryItemId()); - Assertions.assertEquals("xvodhtnsir", model.resourcePool().moName()); - Assertions.assertEquals(InventoryType.HOST, model.resourcePool().inventoryType()); - Assertions.assertEquals("mes", model.cluster().inventoryItemId()); - Assertions.assertEquals("dlpagzrcxfail", model.cluster().moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_MACHINE_TEMPLATE, model.cluster().inventoryType()); - Assertions.assertEquals("m", model.instanceUuid()); - Assertions.assertEquals("oxdfgsftu", model.smbiosUuid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineInventoryItem model = new VirtualMachineInventoryItem().withManagedResourceId("okqgukkjq") - .withMoRefId("broyla") - .withMoName("ulcdisdosf") - .withOsType(OsType.WINDOWS) - .withOsName("efdeesve") - .withIpAddresses(Arrays.asList("jpxtxsuwprtuj", "sawddjibabxvi")) - .withFolderPath("tvtzeexavoxtfg") - .withHost(new InventoryItemDetails().withInventoryItemId("dmdqb") - .withMoName("ypq") - .withInventoryType(InventoryType.VIRTUAL_MACHINE)) - .withResourcePool(new InventoryItemDetails().withInventoryItemId("acbslhhxu") - .withMoName("xvodhtnsir") - .withInventoryType(InventoryType.HOST)) - .withCluster(new InventoryItemDetails().withInventoryItemId("mes") - .withMoName("dlpagzrcxfail") - .withInventoryType(InventoryType.VIRTUAL_MACHINE_TEMPLATE)) - .withInstanceUuid("m") - .withSmbiosUuid("oxdfgsftu"); - model = BinaryData.fromObject(model).toObject(VirtualMachineInventoryItem.class); - Assertions.assertEquals("okqgukkjq", model.managedResourceId()); - Assertions.assertEquals("broyla", model.moRefId()); - Assertions.assertEquals("ulcdisdosf", model.moName()); - Assertions.assertEquals(OsType.WINDOWS, model.osType()); - Assertions.assertEquals("efdeesve", model.osName()); - Assertions.assertEquals("jpxtxsuwprtuj", model.ipAddresses().get(0)); - Assertions.assertEquals("tvtzeexavoxtfg", model.folderPath()); - Assertions.assertEquals("dmdqb", model.host().inventoryItemId()); - Assertions.assertEquals("ypq", model.host().moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_MACHINE, model.host().inventoryType()); - Assertions.assertEquals("acbslhhxu", model.resourcePool().inventoryItemId()); - Assertions.assertEquals("xvodhtnsir", model.resourcePool().moName()); - Assertions.assertEquals(InventoryType.HOST, model.resourcePool().inventoryType()); - Assertions.assertEquals("mes", model.cluster().inventoryItemId()); - Assertions.assertEquals("dlpagzrcxfail", model.cluster().moName()); - Assertions.assertEquals(InventoryType.VIRTUAL_MACHINE_TEMPLATE, model.cluster().inventoryType()); - Assertions.assertEquals("m", model.instanceUuid()); - Assertions.assertEquals("oxdfgsftu", model.smbiosUuid()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplateInventoryItemTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplateInventoryItemTests.java deleted file mode 100644 index a939bc02c29e..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplateInventoryItemTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.OsType; -import com.azure.resourcemanager.connectedvmware.models.VirtualMachineTemplateInventoryItem; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineTemplateInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineTemplateInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"VirtualMachineTemplate\",\"memorySizeMB\":1666163860,\"numCPUs\":2108712904,\"numCoresPerSocket\":1047902295,\"osType\":\"Windows\",\"osName\":\"vyc\",\"toolsVersionStatus\":\"dclxgc\",\"toolsVersion\":\"nfnw\",\"folderPath\":\"tmvpdvjdhtt\",\"managedResourceId\":\"efedxihchrphkm\",\"moRefId\":\"jdqnsdfzpbgt\",\"moName\":\"ylkdghrje\",\"provisioningState\":\"Succeeded\"}") - .toObject(VirtualMachineTemplateInventoryItem.class); - Assertions.assertEquals("efedxihchrphkm", model.managedResourceId()); - Assertions.assertEquals("jdqnsdfzpbgt", model.moRefId()); - Assertions.assertEquals("ylkdghrje", model.moName()); - Assertions.assertEquals(1666163860, model.memorySizeMB()); - Assertions.assertEquals(2108712904, model.numCPUs()); - Assertions.assertEquals(1047902295, model.numCoresPerSocket()); - Assertions.assertEquals(OsType.WINDOWS, model.osType()); - Assertions.assertEquals("vyc", model.osName()); - Assertions.assertEquals("tmvpdvjdhtt", model.folderPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineTemplateInventoryItem model - = new VirtualMachineTemplateInventoryItem().withManagedResourceId("efedxihchrphkm") - .withMoRefId("jdqnsdfzpbgt") - .withMoName("ylkdghrje") - .withMemorySizeMB(1666163860) - .withNumCPUs(2108712904) - .withNumCoresPerSocket(1047902295) - .withOsType(OsType.WINDOWS) - .withOsName("vyc") - .withFolderPath("tmvpdvjdhtt"); - model = BinaryData.fromObject(model).toObject(VirtualMachineTemplateInventoryItem.class); - Assertions.assertEquals("efedxihchrphkm", model.managedResourceId()); - Assertions.assertEquals("jdqnsdfzpbgt", model.moRefId()); - Assertions.assertEquals("ylkdghrje", model.moName()); - Assertions.assertEquals(1666163860, model.memorySizeMB()); - Assertions.assertEquals(2108712904, model.numCPUs()); - Assertions.assertEquals(1047902295, model.numCoresPerSocket()); - Assertions.assertEquals(OsType.WINDOWS, model.osType()); - Assertions.assertEquals("vyc", model.osName()); - Assertions.assertEquals("tmvpdvjdhtt", model.folderPath()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesDeleteMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesDeleteMockTests.java deleted file mode 100644 index 9a251e8869ca..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualMachineTemplatesDeleteMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualMachineTemplatesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.virtualMachineTemplates() - .delete("xfkndlqvtwknvgm", "bugtywatmqa", true, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkInnerTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkInnerTests.java deleted file mode 100644 index 1d9a42b35542..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkInnerTests.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.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.VirtualNetworkInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkInner model = BinaryData.fromString( - "{\"properties\":{\"uuid\":\"orgguf\",\"vCenterId\":\"aomtbghhavgrvkff\",\"moRefId\":\"jzhpjbibgjmfx\",\"inventoryItemId\":\"vfcluyovwxnbkfe\",\"moName\":\"xscyhwzdgirujbz\",\"customResourceName\":\"mvzzbtdcqvp\",\"statuses\":[{\"type\":\"jviylwdshfs\",\"status\":\"rbgyefry\",\"reason\":\"gaojf\",\"message\":\"nc\",\"severity\":\"mrfhirctymox\",\"lastUpdatedAt\":\"2021-09-02T06:19:11Z\"},{\"type\":\"ipiwy\",\"status\":\"uh\",\"reason\":\"cpqjlihhyu\",\"message\":\"skasdvlmfwdgzxu\",\"severity\":\"cvpa\",\"lastUpdatedAt\":\"2021-10-14T22:40:57Z\"},{\"type\":\"euzvx\",\"status\":\"i\",\"reason\":\"nhn\",\"message\":\"xifqjzgxm\",\"severity\":\"ublwpcesutrg\",\"lastUpdatedAt\":\"2020-12-26T09:45:30Z\"},{\"type\":\"uutpwoqhih\",\"status\":\"qg\",\"reason\":\"pnfqntcyp\",\"message\":\"jv\",\"severity\":\"imwkslircizj\",\"lastUpdatedAt\":\"2021-01-01T11:30:07Z\"}],\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"acvlhv\",\"name\":\"dyftumrtwna\"},\"kind\":\"lbiw\",\"location\":\"ojgcyzt\",\"tags\":{\"baeqphc\":\"z\",\"gaifmvik\":\"qnrnrpxehuwryk\",\"xcv\":\"bydvkhbejdz\"},\"id\":\"srhnjivo\",\"name\":\"v\",\"type\":\"novqfzge\"}") - .toObject(VirtualNetworkInner.class); - Assertions.assertEquals("ojgcyzt", model.location()); - Assertions.assertEquals("z", model.tags().get("baeqphc")); - Assertions.assertEquals("acvlhv", model.extendedLocation().type()); - Assertions.assertEquals("dyftumrtwna", model.extendedLocation().name()); - Assertions.assertEquals("lbiw", model.kind()); - Assertions.assertEquals("aomtbghhavgrvkff", model.vCenterId()); - Assertions.assertEquals("jzhpjbibgjmfx", model.moRefId()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkInner model = new VirtualNetworkInner().withLocation("ojgcyzt") - .withTags(mapOf("baeqphc", "z", "gaifmvik", "qnrnrpxehuwryk", "xcv", "bydvkhbejdz")) - .withExtendedLocation(new ExtendedLocation().withType("acvlhv").withName("dyftumrtwna")) - .withKind("lbiw") - .withVCenterId("aomtbghhavgrvkff") - .withMoRefId("jzhpjbibgjmfx") - .withInventoryItemId("vfcluyovwxnbkfe"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkInner.class); - Assertions.assertEquals("ojgcyzt", model.location()); - Assertions.assertEquals("z", model.tags().get("baeqphc")); - Assertions.assertEquals("acvlhv", model.extendedLocation().type()); - Assertions.assertEquals("dyftumrtwna", model.extendedLocation().name()); - Assertions.assertEquals("lbiw", model.kind()); - Assertions.assertEquals("aomtbghhavgrvkff", model.vCenterId()); - Assertions.assertEquals("jzhpjbibgjmfx", model.moRefId()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkInventoryItemTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkInventoryItemTests.java deleted file mode 100644 index f6a029103fa0..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkInventoryItemTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.models.VirtualNetworkInventoryItem; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkInventoryItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkInventoryItem model = BinaryData.fromString( - "{\"inventoryType\":\"VirtualNetwork\",\"managedResourceId\":\"wxezwzhok\",\"moRefId\":\"wnhhtqlgehgppip\",\"moName\":\"hpfeoajvgcxtxjc\",\"provisioningState\":\"Accepted\"}") - .toObject(VirtualNetworkInventoryItem.class); - Assertions.assertEquals("wxezwzhok", model.managedResourceId()); - Assertions.assertEquals("wnhhtqlgehgppip", model.moRefId()); - Assertions.assertEquals("hpfeoajvgcxtxjc", model.moName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkInventoryItem model = new VirtualNetworkInventoryItem().withManagedResourceId("wxezwzhok") - .withMoRefId("wnhhtqlgehgppip") - .withMoName("hpfeoajvgcxtxjc"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkInventoryItem.class); - Assertions.assertEquals("wxezwzhok", model.managedResourceId()); - Assertions.assertEquals("wnhhtqlgehgppip", model.moRefId()); - Assertions.assertEquals("hpfeoajvgcxtxjc", model.moName()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkPropertiesTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkPropertiesTests.java deleted file mode 100644 index df10b8ceb182..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworkPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.VirtualNetworkProperties; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkProperties model = BinaryData.fromString( - "{\"uuid\":\"dftuljltduce\",\"vCenterId\":\"tmczuomejwcwwqi\",\"moRefId\":\"nssxmojmsvpk\",\"inventoryItemId\":\"rvkwc\",\"moName\":\"ql\",\"customResourceName\":\"x\",\"statuses\":[{\"type\":\"heyd\",\"status\":\"dshmkxmaehvbbx\",\"reason\":\"iplt\",\"message\":\"htba\",\"severity\":\"gx\",\"lastUpdatedAt\":\"2021-06-15T04:05:50Z\"},{\"type\":\"kpyklyhp\",\"status\":\"odpvruudlgzib\",\"reason\":\"ostgkts\",\"message\":\"dxeclzedqbcvh\",\"severity\":\"h\",\"lastUpdatedAt\":\"2021-02-21T17:52:27Z\"}],\"provisioningState\":\"Canceled\"}") - .toObject(VirtualNetworkProperties.class); - Assertions.assertEquals("tmczuomejwcwwqi", model.vCenterId()); - Assertions.assertEquals("nssxmojmsvpk", model.moRefId()); - Assertions.assertEquals("rvkwc", model.inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkProperties model = new VirtualNetworkProperties().withVCenterId("tmczuomejwcwwqi") - .withMoRefId("nssxmojmsvpk") - .withInventoryItemId("rvkwc"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkProperties.class); - Assertions.assertEquals("tmczuomejwcwwqi", model.vCenterId()); - Assertions.assertEquals("nssxmojmsvpk", model.moRefId()); - Assertions.assertEquals("rvkwc", model.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksCreateMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksCreateMockTests.java deleted file mode 100644 index 43a753c7d6c5..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksCreateMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.VirtualNetwork; -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 reactor.core.publisher.Mono; - -public final class VirtualNetworksCreateMockTests { - @Test - public void testCreate() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"h\",\"vCenterId\":\"ndnelqkaadlknw\",\"moRefId\":\"anniyopetxivcnr\",\"inventoryItemId\":\"xnucaephblkwqp\",\"moName\":\"vbqsdt\",\"customResourceName\":\"bctvivuzqym\",\"statuses\":[{\"type\":\"o\",\"status\":\"gitsqh\",\"reason\":\"b\",\"message\":\"cdb\",\"severity\":\"fzndscxmxeatkd\",\"lastUpdatedAt\":\"2021-06-16T10:55:30Z\"}],\"provisioningState\":\"Succeeded\"},\"extendedLocation\":{\"type\":\"yibqbnao\",\"name\":\"jrmkuhmaxljalf\"},\"kind\":\"jmobca\",\"location\":\"cd\",\"tags\":{\"jjzr\":\"qcwgaxfgvaknokz\",\"x\":\"tixldzyyfytpqs\"},\"id\":\"mmpuj\",\"name\":\"vyqlkjuvsmbmslzo\",\"type\":\"ovwzdbpqvybefg\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualNetwork response = manager.virtualNetworks() - .define("udqll") - .withRegion("l") - .withExistingResourceGroup("pnwy") - .withTags(mapOf("gvfltgvdihoynkr", "oithg")) - .withExtendedLocation(new ExtendedLocation().withType("fdfa").withName("yzyzeyuu")) - .withKind("ds") - .withVCenterId("huxiqhzlraymez") - .withMoRefId("skihmxrfd") - .withInventoryItemId("jrednwyysh") - .create(); - - Assertions.assertEquals("cd", response.location()); - Assertions.assertEquals("qcwgaxfgvaknokz", response.tags().get("jjzr")); - Assertions.assertEquals("yibqbnao", response.extendedLocation().type()); - Assertions.assertEquals("jrmkuhmaxljalf", response.extendedLocation().name()); - Assertions.assertEquals("jmobca", response.kind()); - Assertions.assertEquals("ndnelqkaadlknw", response.vCenterId()); - Assertions.assertEquals("anniyopetxivcnr", response.moRefId()); - Assertions.assertEquals("xnucaephblkwqp", response.inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksDeleteMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksDeleteMockTests.java deleted file mode 100644 index 383e374ba6f9..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualNetworksDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.virtualNetworks().delete("wugyx", "qi", false, com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksGetByResourceGroupWithResponseMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 4a6a19a83bc2..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksGetByResourceGroupWithResponseMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.VirtualNetwork; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualNetworksGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"uuid\":\"jselpkpbafvafh\",\"vCenterId\":\"ylcc\",\"moRefId\":\"vxrh\",\"inventoryItemId\":\"d\",\"moName\":\"rsofpltdbmairrh\",\"customResourceName\":\"fnrac\",\"statuses\":[{\"type\":\"igtuu\",\"status\":\"ouhdawsigrb\",\"reason\":\"xsjybvitvqk\",\"message\":\"az\",\"severity\":\"mtggmu\",\"lastUpdatedAt\":\"2021-05-02T12:21:31Z\"},{\"type\":\"ozfnkfexlvx\",\"status\":\"akizvoaikna\",\"reason\":\"nuwiguyxlykwph\",\"message\":\"zc\",\"severity\":\"hmpejtlkexaonw\",\"lastUpdatedAt\":\"2021-08-12T17:38:45Z\"},{\"type\":\"qhr\",\"status\":\"xk\",\"reason\":\"ccrmmk\",\"message\":\"pijubyq\",\"severity\":\"kakfqfr\",\"lastUpdatedAt\":\"2021-10-05T02:02:46Z\"},{\"type\":\"il\",\"status\":\"dxjascowvfdj\",\"reason\":\"dxphlk\",\"message\":\"nmgzvyfijdkzuqnw\",\"severity\":\"thuqolyahluq\",\"lastUpdatedAt\":\"2021-09-29T05:28Z\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"rjb\",\"name\":\"ykfhyqezvqqugdrf\"},\"kind\":\"ve\",\"location\":\"reuquowtljvf\",\"tags\":{\"yxvrqtvbczsul\":\"eagk\",\"ykgsangpszng\":\"dgglmepjpfs\",\"jujcngoad\":\"fpgylkve\"},\"id\":\"edmzrgjfoknub\",\"name\":\"oitpkpztrgdgx\",\"type\":\"coqra\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualNetwork response = manager.virtualNetworks() - .getByResourceGroupWithResponse("dynojpziuwfb", "kkdtnhqsy", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("reuquowtljvf", response.location()); - Assertions.assertEquals("eagk", response.tags().get("yxvrqtvbczsul")); - Assertions.assertEquals("rjb", response.extendedLocation().type()); - Assertions.assertEquals("ykfhyqezvqqugdrf", response.extendedLocation().name()); - Assertions.assertEquals("ve", response.kind()); - Assertions.assertEquals("ylcc", response.vCenterId()); - Assertions.assertEquals("vxrh", response.moRefId()); - Assertions.assertEquals("d", response.inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListByResourceGroupMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListByResourceGroupMockTests.java deleted file mode 100644 index dc17d5ed4b11..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListByResourceGroupMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.VirtualNetwork; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualNetworksListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"mvmmagoaqylkjz\",\"vCenterId\":\"iua\",\"moRefId\":\"cgm\",\"inventoryItemId\":\"tpfinzcpdltkr\",\"moName\":\"jmtbd\",\"customResourceName\":\"cqguef\",\"statuses\":[{\"type\":\"p\",\"status\":\"qdurelyujlfyoum\",\"reason\":\"kyeclcdigpta\",\"message\":\"rzmq\",\"severity\":\"cycijoclxiut\",\"lastUpdatedAt\":\"2021-08-12T23:35:09Z\"},{\"type\":\"z\",\"status\":\"jdnrqjbt\",\"reason\":\"eaoqaqbzgyhf\",\"message\":\"v\",\"severity\":\"tbwbqamteuli\",\"lastUpdatedAt\":\"2021-10-20T21:56:22Z\"},{\"type\":\"kcvmwfauxxepmy\",\"status\":\"ormcqmic\",\"reason\":\"jqpkzfbo\",\"message\":\"jmcsmyqwixvcpwn\",\"severity\":\"ywzwofalickd\",\"lastUpdatedAt\":\"2021-08-28T15:59:58Z\"}],\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"t\",\"name\":\"sknxrwzawnvsbcf\"},\"kind\":\"gxnvhyc\",\"location\":\"dimwrzregzgyu\",\"tags\":{\"weryekzk\":\"rw\",\"w\":\"hmeott\"},\"id\":\"yos\",\"name\":\"wwhnhjtfvpn\",\"type\":\"pmil\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.virtualNetworks().listByResourceGroup("pag", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dimwrzregzgyu", response.iterator().next().location()); - Assertions.assertEquals("rw", response.iterator().next().tags().get("weryekzk")); - Assertions.assertEquals("t", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("sknxrwzawnvsbcf", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("gxnvhyc", response.iterator().next().kind()); - Assertions.assertEquals("iua", response.iterator().next().vCenterId()); - Assertions.assertEquals("cgm", response.iterator().next().moRefId()); - Assertions.assertEquals("tpfinzcpdltkr", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListMockTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListMockTests.java deleted file mode 100644 index 0d6cbff79bd7..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListMockTests.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.connectedvmware.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.connectedvmware.ConnectedVMwareManager; -import com.azure.resourcemanager.connectedvmware.models.VirtualNetwork; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class VirtualNetworksListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"uuid\":\"ialwv\",\"vCenterId\":\"buhzacaq\",\"moRefId\":\"ltcoqc\",\"inventoryItemId\":\"pdsxzakuejkm\",\"moName\":\"iztjof\",\"customResourceName\":\"vovjufycsjmlbe\",\"statuses\":[{\"type\":\"iriuxegthortu\",\"status\":\"wlpjfelqerppt\",\"reason\":\"gqnzm\",\"message\":\"iilialwc\",\"severity\":\"ckbbcc\",\"lastUpdatedAt\":\"2020-12-30T16:06:38Z\"}],\"provisioningState\":\"Updating\"},\"extendedLocation\":{\"type\":\"xnyuffatsgftipwc\",\"name\":\"yubhiqdx\"},\"kind\":\"npnuhzafccnuhi\",\"location\":\"gbylbuig\",\"tags\":{\"vhcs\":\"atvcrkdlbnbq\",\"vurex\":\"hzlwxaea\"},\"id\":\"ndsbdw\",\"name\":\"aderzmw\",\"type\":\"t\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ConnectedVMwareManager manager = ConnectedVMwareManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.virtualNetworks().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gbylbuig", response.iterator().next().location()); - Assertions.assertEquals("atvcrkdlbnbq", response.iterator().next().tags().get("vhcs")); - Assertions.assertEquals("xnyuffatsgftipwc", response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("yubhiqdx", response.iterator().next().extendedLocation().name()); - Assertions.assertEquals("npnuhzafccnuhi", response.iterator().next().kind()); - Assertions.assertEquals("buhzacaq", response.iterator().next().vCenterId()); - Assertions.assertEquals("ltcoqc", response.iterator().next().moRefId()); - Assertions.assertEquals("pdsxzakuejkm", response.iterator().next().inventoryItemId()); - } -} diff --git a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListTests.java b/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListTests.java deleted file mode 100644 index 7a22b1aa462a..000000000000 --- a/sdk/connectedvmware/azure-resourcemanager-connectedvmware/src/test/java/com/azure/resourcemanager/connectedvmware/generated/VirtualNetworksListTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.connectedvmware.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.connectedvmware.fluent.models.VirtualNetworkInner; -import com.azure.resourcemanager.connectedvmware.models.ExtendedLocation; -import com.azure.resourcemanager.connectedvmware.models.VirtualNetworksList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworksListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworksList model = BinaryData.fromString( - "{\"nextLink\":\"dlwwqfbumlkxt\",\"value\":[{\"properties\":{\"uuid\":\"fsmlmbtxhwgfw\",\"vCenterId\":\"tawc\",\"moRefId\":\"zbrhubskhudyg\",\"inventoryItemId\":\"okkqfqjbvleo\",\"moName\":\"ml\",\"customResourceName\":\"qtqzfavyv\",\"statuses\":[{\"type\":\"bar\",\"status\":\"uayjkqa\",\"reason\":\"gzslesjcbhernnti\",\"message\":\"djc\",\"severity\":\"quwrbehwag\",\"lastUpdatedAt\":\"2021-10-18T14:47:31Z\"},{\"type\":\"f\",\"status\":\"mrqemvvhmx\",\"reason\":\"rjfut\",\"message\":\"oe\",\"severity\":\"vewzcj\",\"lastUpdatedAt\":\"2021-07-10T06:35:01Z\"},{\"type\":\"cpmguaadraufact\",\"status\":\"hzovaj\",\"reason\":\"iuxxpshneekulfg\",\"message\":\"qubkw\",\"severity\":\"enr\",\"lastUpdatedAt\":\"2021-04-26T16:34:12Z\"}],\"provisioningState\":\"Created\"},\"extendedLocation\":{\"type\":\"a\",\"name\":\"juohminyflnorw\"},\"kind\":\"vwpklvxwmygdxp\",\"location\":\"pqchiszep\",\"tags\":{\"ozauorsukokwb\":\"jcrxgibbdaxcon\",\"wzsoldweyuqdunv\":\"plhlvnuuepzlrp\",\"alywjhhgdn\":\"nnrwrbiork\",\"iqndieuzaofj\":\"xmsivfomiloxggdu\"},\"id\":\"hvcyyysfg\",\"name\":\"otcubi\",\"type\":\"p\"},{\"properties\":{\"uuid\":\"pwoqo\",\"vCenterId\":\"acjekni\",\"moRefId\":\"hqvcimpevfgmblr\",\"inventoryItemId\":\"lbywdxsm\",\"moName\":\"cwrwfs\",\"customResourceName\":\"fnynszqujizdvoqy\",\"statuses\":[{\"type\":\"owbb\",\"status\":\"yavutpthjoxois\",\"reason\":\"ksbpimlqoljx\",\"message\":\"gxxlxsffgcvizq\",\"severity\":\"wlvwlyoupf\",\"lastUpdatedAt\":\"2021-07-15T15:51:01Z\"},{\"type\":\"jub\",\"status\":\"hgkfmin\",\"reason\":\"owzfttsttkt\",\"message\":\"hbq\",\"severity\":\"tx\",\"lastUpdatedAt\":\"2021-10-19T02:59:28Z\"},{\"type\":\"kxitmmqtgqqqxhr\",\"status\":\"rxcpjuisavo\",\"reason\":\"dzf\",\"message\":\"zivj\",\"severity\":\"rqttbajlkatnw\",\"lastUpdatedAt\":\"2021-05-31T00:28:24Z\"},{\"type\":\"pidkqqfkuvscxkdm\",\"status\":\"govibrxkpmloazu\",\"reason\":\"ocbgoorbteoyb\",\"message\":\"jxakv\",\"severity\":\"gslordilmyww\",\"lastUpdatedAt\":\"2021-05-30T05:31:16Z\"}],\"provisioningState\":\"Canceled\"},\"extendedLocation\":{\"type\":\"edabgyvudtjue\",\"name\":\"cihxuuwhcjyx\"},\"kind\":\"bvpa\",\"location\":\"akkud\",\"tags\":{\"tcyohpfkyrk\":\"gwjplmag\",\"nwqjnoba\":\"bdgiogsjk\",\"egfnmntfpmvmemfn\":\"yhddvia\",\"lchpodbzevwrdn\":\"zdwvvbalxl\"},\"id\":\"fukuvsjcswsmystu\",\"name\":\"uqypfcvle\",\"type\":\"chpqbmfpjba\"},{\"properties\":{\"uuid\":\"idfcxsspuunnoxyh\",\"vCenterId\":\"g\",\"moRefId\":\"drihpfhoqcaaewda\",\"inventoryItemId\":\"djvlpj\",\"moName\":\"kzbrmsgeivsiy\",\"customResourceName\":\"kdncj\",\"statuses\":[{\"type\":\"bzo\",\"status\":\"culapzwyrpgogtq\",\"reason\":\"pnylb\",\"message\":\"ajlyjtlvofqzhv\",\"severity\":\"ibyfmo\",\"lastUpdatedAt\":\"2021-08-08T19:27:36Z\"},{\"type\":\"kjpvdwxf\",\"status\":\"iivwzjbhyzsxjrka\",\"reason\":\"trnegvmnvuqeqvld\",\"message\":\"astjbkkdmflvestm\",\"severity\":\"xrrilozapee\",\"lastUpdatedAt\":\"2020-12-23T19:56:30Z\"},{\"type\":\"xlktwkuzi\",\"status\":\"slevufuztc\",\"reason\":\"yhjtqedcgzu\",\"message\":\"mmrqz\",\"severity\":\"rjvpglydzgkrvqee\",\"lastUpdatedAt\":\"2021-04-21T12:17:49Z\"},{\"type\":\"pryu\",\"status\":\"wytpzdmovz\",\"reason\":\"va\",\"message\":\"zqadf\",\"severity\":\"z\",\"lastUpdatedAt\":\"2021-05-05T00:43:37Z\"}],\"provisioningState\":\"Deleting\"},\"extendedLocation\":{\"type\":\"cx\",\"name\":\"t\"},\"kind\":\"kpvzmlq\",\"location\":\"mldgxobfirc\",\"tags\":{\"khyawfvjlboxqv\":\"kciayzri\"},\"id\":\"jlmxhomdynhd\",\"name\":\"digumbnr\",\"type\":\"auzzptjazysd\"}]}") - .toObject(VirtualNetworksList.class); - Assertions.assertEquals("dlwwqfbumlkxt", model.nextLink()); - Assertions.assertEquals("pqchiszep", model.value().get(0).location()); - Assertions.assertEquals("jcrxgibbdaxcon", model.value().get(0).tags().get("ozauorsukokwb")); - Assertions.assertEquals("a", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("juohminyflnorw", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("vwpklvxwmygdxp", model.value().get(0).kind()); - Assertions.assertEquals("tawc", model.value().get(0).vCenterId()); - Assertions.assertEquals("zbrhubskhudyg", model.value().get(0).moRefId()); - Assertions.assertEquals("okkqfqjbvleo", model.value().get(0).inventoryItemId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworksList model = new VirtualNetworksList().withNextLink("dlwwqfbumlkxt") - .withValue(Arrays.asList( - new VirtualNetworkInner().withLocation("pqchiszep") - .withTags(mapOf("ozauorsukokwb", "jcrxgibbdaxcon", "wzsoldweyuqdunv", "plhlvnuuepzlrp", - "alywjhhgdn", "nnrwrbiork", "iqndieuzaofj", "xmsivfomiloxggdu")) - .withExtendedLocation(new ExtendedLocation().withType("a").withName("juohminyflnorw")) - .withKind("vwpklvxwmygdxp") - .withVCenterId("tawc") - .withMoRefId("zbrhubskhudyg") - .withInventoryItemId("okkqfqjbvleo"), - new VirtualNetworkInner().withLocation("akkud") - .withTags(mapOf("tcyohpfkyrk", "gwjplmag", "nwqjnoba", "bdgiogsjk", "egfnmntfpmvmemfn", "yhddvia", - "lchpodbzevwrdn", "zdwvvbalxl")) - .withExtendedLocation(new ExtendedLocation().withType("edabgyvudtjue").withName("cihxuuwhcjyx")) - .withKind("bvpa") - .withVCenterId("acjekni") - .withMoRefId("hqvcimpevfgmblr") - .withInventoryItemId("lbywdxsm"), - new VirtualNetworkInner().withLocation("mldgxobfirc") - .withTags(mapOf("khyawfvjlboxqv", "kciayzri")) - .withExtendedLocation(new ExtendedLocation().withType("cx").withName("t")) - .withKind("kpvzmlq") - .withVCenterId("g") - .withMoRefId("drihpfhoqcaaewda") - .withInventoryItemId("djvlpj"))); - model = BinaryData.fromObject(model).toObject(VirtualNetworksList.class); - Assertions.assertEquals("dlwwqfbumlkxt", model.nextLink()); - Assertions.assertEquals("pqchiszep", model.value().get(0).location()); - Assertions.assertEquals("jcrxgibbdaxcon", model.value().get(0).tags().get("ozauorsukokwb")); - Assertions.assertEquals("a", model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("juohminyflnorw", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals("vwpklvxwmygdxp", model.value().get(0).kind()); - Assertions.assertEquals("tawc", model.value().get(0).vCenterId()); - Assertions.assertEquals("zbrhubskhudyg", model.value().get(0).moRefId()); - Assertions.assertEquals("okkqfqjbvleo", model.value().get(0).inventoryItemId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -}