diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md index 074412b3c3a8..5fbe06933898 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2025-04-30) + +- Azure Resource Manager HDInsightContainers client library for Java. This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-preview-2024-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md index e6781b7f47ae..4a57f65c1202 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md @@ -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 @@ HDInsightContainersManager manager = HDInsightContainersManager .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/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md index fb4e97399eb4..cadccebdfb31 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md @@ -69,23 +69,159 @@ ### AvailableClusterPoolVersions_ListByLocation ```java +import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; +import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; +import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; +import com.azure.resourcemanager.hdinsight.containers.models.Cluster; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; +import com.azure.resourcemanager.hdinsight.containers.models.Schedule; +import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; +import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; +import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; +import com.azure.resourcemanager.hdinsight.containers.models.UpdatableClusterProfile; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for AvailableClusterPoolVersions ListByLocation. + * Samples for Clusters Update. */ -public final class AvailableClusterPoolVersionsListByLocationSamples { +public final class ClustersUpdateSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListAvailableClusterPoolVersions.json + * PatchRangerCluster.json */ /** - * Sample code: ClusterPoolVersionListResult. + * Sample code: HDInsightRangerClusterPatchTags. * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolVersionListResult( + public static void hDInsightRangerClusterPatchTags( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.availableClusterPoolVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); + Cluster resource = manager.clusters() + .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new ClusterPatchProperties() + .withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile() + .withRangerAdmin(new RangerAdminSpec() + .withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")) + .withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net") + .withName("testdb") + .withPasswordSecretRef("fakeTokenPlaceholder") + .withUsername("admin"))) + .withRangerAudit( + new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) + .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) + .withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", + "13be6971-79db-4f33-9d41-b25589ca25ac")) + .withMode(RangerUsersyncMode.AUTOMATIC) + .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")))))) + .apply(); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * PatchCluster.json + */ + /** + * Sample code: HDInsightClustersPatchTags. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + hDInsightClustersPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + Cluster resource = manager.clusters() + .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties( + new ClusterPatchProperties() + .withClusterProfile( + new UpdatableClusterProfile() + .withServiceConfigsProfiles( + Arrays + .asList( + new ClusterServiceConfigsProfile().withServiceName("TestService1") + .withConfigs( + Arrays + .asList( + new ClusterServiceConfig().withComponent("TestComp1") + .withFiles( + Arrays.asList( + new ClusterConfigFile().withFileName("TestFile1") + .withValues(mapOf("Test.config.1", "1", + "Test.config.2", "2")), + new ClusterConfigFile().withFileName("TestFile2") + .withValues(mapOf("Test.config.3", "3", + "Test.config.4", "4")))), + new ClusterServiceConfig().withComponent("TestComp2") + .withFiles(Arrays + .asList( + new ClusterConfigFile().withFileName("TestFile3") + .withContent("TestContent") + .withPath("TestPath"), + new ClusterConfigFile() + .withFileName("TestFile4") + .withValues(mapOf("Test.config.7", "7", + "Test.config.8", "8")))))), + new ClusterServiceConfigsProfile().withServiceName("TestService2") + .withConfigs( + Arrays + .asList(new ClusterServiceConfig().withComponent("TestComp3") + .withFiles(Arrays + .asList(new ClusterConfigFile().withFileName("TestFile5") + .withValues(mapOf("Test.config.9", "9")))))))) + .withSshProfile(new SshProfile().withCount(2)) + .withAutoscaleProfile( + new AutoscaleProfile().withEnabled(true) + .withGracefulDecommissionTimeout(-1) + .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) + .withScheduleBasedConfig(new ScheduleBasedConfig() + .withTimeZone("Cen. Australia Standard Time") + .withDefaultCount(3) + .withSchedules(Arrays.asList( + new Schedule().withStartTime("00:00") + .withEndTime("12:00") + .withCount(3) + .withDays(Arrays + .asList(ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), + new Schedule().withStartTime("00:00") + .withEndTime("12:00") + .withCount(3) + .withDays(Arrays.asList(ScheduleDay.SUNDAY)))))) + .withAuthorizationProfile( + new AuthorizationProfile().withUserIds(Arrays.asList("Testuser1", "Testuser2"))) + .withLogAnalyticsProfile(new ClusterLogAnalyticsProfile().withEnabled(true) + .withApplicationLogs(new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true) + .withStdErrorEnabled(true)) + .withMetricsEnabled(true)))) + .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; } } ``` @@ -93,23 +229,42 @@ public final class AvailableClusterPoolVersionsListByLocationSamples { ### AvailableClusterVersions_ListByLocation ```java +import com.azure.resourcemanager.hdinsight.containers.models.Category; + /** - * Samples for AvailableClusterVersions ListByLocation. + * Samples for ClusterLibraries List. */ -public final class AvailableClusterVersionsListByLocationSamples { +public final class ClusterLibrariesListSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListAvailableClusterVersions.json + * ListPredefinedClusterLibraries.json */ /** - * Sample code: ClusterVersionListResult. + * Sample code: ListPredefinedClusterLibraries. * * @param manager Entry point to HDInsightContainersManager. */ - public static void - clusterVersionListResult(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.availableClusterVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); + public static void listPredefinedClusterLibraries( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterLibraries() + .list("hiloResourceGroup", "clusterPool", "cluster", Category.PREDEFINED, com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * ListUserCustomClusterLibraries.json + */ + /** + * Sample code: ListUserCustomClusterLibraries. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void listUserCustomClusterLibraries( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterLibraries() + .list("hiloResourceGroup", "clusterPool", "cluster", Category.CUSTOM, com.azure.core.util.Context.NONE); } } ``` @@ -118,23 +273,22 @@ public final class AvailableClusterVersionsListByLocationSamples { ```java /** - * Samples for ClusterAvailableUpgrades List. + * Samples for ClusterPools Delete. */ -public final class ClusterAvailableUpgradesListSamples { +public final class ClusterPoolsDeleteSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterAvailableUpgrades.json + * DeleteClusterPool.json */ /** - * Sample code: GetClusterAvailableUpgrade. + * Sample code: ClusterPoolDelete. * * @param manager Entry point to HDInsightContainersManager. */ public static void - getClusterAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterAvailableUpgrades() - .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); + clusterPoolDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().delete("rg1", "clusterpool1", com.azure.core.util.Context.NONE); } } ``` @@ -142,24 +296,50 @@ public final class ClusterAvailableUpgradesListSamples { ### ClusterJobs_List ```java +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; + /** - * Samples for ClusterJobs List. + * Samples for ClusterPools Upgrade. */ -public final class ClusterJobsListSamples { +public final class ClusterPoolsUpgradeSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterJobs.json + * UpgradeNodeOsForClusterPool.json */ /** - * Sample code: ListClusterJobs. + * Sample code: ClusterPoolsUpgradeNodeOs. * * @param manager Entry point to HDInsightContainersManager. */ public static void - listClusterJobs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs() - .list("hiloResourcegroup", "clusterPool1", "cluster1", null, com.azure.core.util.Context.NONE); + clusterPoolsUpgradeNodeOs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools() + .upgrade("hiloResourcegroup", "clusterpool1", + new ClusterPoolUpgrade().withProperties(new ClusterPoolNodeOsImageUpdateProperties()), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * UpgradeAKSPatchVersionForClusterPool.json + */ + /** + * Sample code: ClusterPoolsUpgradeAKSPatchVersion. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clusterPoolsUpgradeAKSPatchVersion( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools() + .upgrade("hiloResourcegroup", "clusterpool1", + new ClusterPoolUpgrade() + .withProperties(new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true) + .withUpgradeAllClusterNodes(false)), + com.azure.core.util.Context.NONE); } } ``` @@ -167,337 +347,473 @@ public final class ClusterJobsListSamples { ### ClusterJobs_RunJob ```java -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.Action; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollbackProperties; /** - * Samples for ClusterJobs RunJob. + * Samples for Clusters UpgradeManualRollback. */ -public final class ClusterJobsRunJobSamples { +public final class ClustersUpgradeManualRollbackSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * RunClusterJob.json + * ClusterUpgradeRollback.json */ /** - * Sample code: RunClusterJob. + * Sample code: ClusterUpgradeRollback. * * @param manager Entry point to HDInsightContainersManager. */ public static void - runClusterJob(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs() - .runJob("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterJobInner() - .withProperties(new FlinkJobProperties().withJobName("flink-job-name") - .withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars") - .withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar") - .withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob") - .withAction(Action.START) - .withFlinkConfiguration(mapOf("parallelism", "1", "savepoint.directory", - "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), + clusterUpgradeRollback(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters() + .upgradeManualRollback("hiloResourcegroup", "clusterpool1", "cluster1", + new ClusterUpgradeRollback().withProperties(new ClusterUpgradeRollbackProperties().withUpgradeHistory( + "/subscriptions/10e32bab-26da-4cc4-a441-52b318f824e6/resourceGroups/hiloResourcegroup/providers/Microsoft.HDInsight/clusterpools/clusterpool1/clusters/cluster1/upgradeHistories/01_11_2024_02_35_03_AM-HotfixUpgrade")), com.azure.core.util.Context.NONE); } +} +``` - // 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; +### ClusterLibraries_List + +```java +/** + * Samples for Operations List. + */ +public final class OperationsListSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * GetOperations.json + */ + /** + * Sample code: ListOperations. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + listOperations(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` -### ClusterLibraries_List +### ClusterLibraries_ManageLibraries ```java -import com.azure.resourcemanager.hdinsight.containers.models.Category; +/** + * Samples for AvailableClusterVersions ListByLocation. + */ +public final class AvailableClusterVersionsListByLocationSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * ListAvailableClusterVersions.json + */ + /** + * Sample code: ClusterVersionListResult. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + clusterVersionListResult(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.availableClusterVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); + } +} +``` + +### ClusterPoolAvailableUpgrades_List + +```java +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; +import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; +import java.util.Arrays; /** - * Samples for ClusterLibraries List. + * Samples for ClusterPools CreateOrUpdate. */ -public final class ClusterLibrariesListSamples { +public final class ClusterPoolsCreateOrUpdateSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListPredefinedClusterLibraries.json + * CreateClusterPoolWithPrivateAks.json */ /** - * Sample code: ListPredefinedClusterLibraries. + * Sample code: ClusterPoolPutWithPrivateAks. * * @param manager Entry point to HDInsightContainersManager. */ - public static void listPredefinedClusterLibraries( + public static void clusterPoolPutWithPrivateAks( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterLibraries() - .list("hiloResourceGroup", "clusterPool", "cluster", Category.PREDEFINED, com.azure.core.util.Context.NONE); + manager.clusterPools() + .define("clusterpool1") + .withRegion("West US 2") + .withExistingResourceGroup("hiloResourcegroup") + .withProperties(new ClusterPoolResourceProperties() + .withClusterPoolProfile( + new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) + .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") + .withAvailabilityZones(Arrays.asList("1", "2", "3"))) + .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withEnablePrivateApiServer(true))) + .create(); } /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListUserCustomClusterLibraries.json + * CreateClusterPoolWithUDRAks.json + */ + /** + * Sample code: ClusterPoolPutWithUDRAks. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + clusterPoolPutWithUDRAks(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools() + .define("clusterpool1") + .withRegion("West US 2") + .withExistingResourceGroup("hiloResourcegroup") + .withProperties(new ClusterPoolResourceProperties() + .withClusterPoolProfile( + new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) + .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") + .withAvailabilityZones(Arrays.asList("1", "2", "3"))) + .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withOutboundType(OutboundType.USER_DEFINED_ROUTING))) + .create(); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * CreateClusterPool.json + */ + /** + * Sample code: ClusterPoolPut. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + clusterPoolPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools() + .define("clusterpool1") + .withRegion("West US 2") + .withExistingResourceGroup("hiloResourcegroup") + .withProperties(new ClusterPoolResourceProperties() + .withClusterPoolProfile( + new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) + .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") + .withAvailabilityZones(Arrays.asList("1", "2", "3")))) + .create(); + } +} +``` + +### ClusterPoolUpgradeHistories_List + +```java +/** + * Samples for Clusters Get. + */ +public final class ClustersGetSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * GetCluster.json + */ + /** + * Sample code: HDInsightClusterGet. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + hDInsightClusterGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters() + .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + +### ClusterPools_CreateOrUpdate + +```java +/** + * Samples for Clusters ListByClusterPoolName. + */ +public final class ClustersListByClusterPoolNameSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * ListClustersByClusterPoolName.json + */ + /** + * Sample code: HDInsightClustersListByClusterPoolName. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightClustersListByClusterPoolName( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().listByClusterPoolName("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); + } +} +``` + +### ClusterPools_Delete + +```java +import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; + +/** + * Samples for Locations CheckNameAvailability. + */ +public final class LocationsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * LocationsNameAvailability.json + */ + /** + * Sample code: LocationsNameAvailability. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + locationsNameAvailability(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.locations() + .checkNameAvailabilityWithResponse("southeastasia", + new NameAvailabilityParameters().withName("contosemember1") + .withType("Microsoft.HDInsight/clusterPools/clusters"), + com.azure.core.util.Context.NONE); + } +} +``` + +### ClusterPools_GetByResourceGroup + +```java +/** + * Samples for ClusterPoolUpgradeHistories List. + */ +public final class ClusterPoolUpgradeHistoriesListSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ + * ListClusterPoolUpgradeHistory.json */ /** - * Sample code: ListUserCustomClusterLibraries. + * Sample code: ClusterPoolUpgradeHistoriesListResult. * * @param manager Entry point to HDInsightContainersManager. */ - public static void listUserCustomClusterLibraries( + public static void clusterPoolUpgradeHistoriesListResult( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterLibraries() - .list("hiloResourceGroup", "clusterPool", "cluster", Category.CUSTOM, com.azure.core.util.Context.NONE); + manager.clusterPoolUpgradeHistories() + .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); } } ``` -### ClusterLibraries_ManageLibraries +### ClusterPools_List ```java -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperationProperties; -import com.azure.resourcemanager.hdinsight.containers.models.LibraryManagementAction; -import com.azure.resourcemanager.hdinsight.containers.models.MavenLibraryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.PyPiLibraryProperties; -import java.util.Arrays; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; /** - * Samples for ClusterLibraries ManageLibraries. + * Samples for Clusters Upgrade. */ -public final class ClusterLibrariesManageLibrariesSamples { +public final class ClustersUpgradeSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UninstallExistingClusterLibraries.json + * UpgradeAKSPatchVersionForCluster.json */ /** - * Sample code: UninstallExistingClusterLibraries. + * Sample code: ClustersUpgradeAKSPatchVersion. * * @param manager Entry point to HDInsightContainersManager. */ - public static void uninstallExistingClusterLibraries( + public static void clustersUpgradeAKSPatchVersion( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterLibraries() - .manageLibraries("hiloResourceGroup", "clusterPool", "cluster", - new ClusterLibraryManagementOperation().withProperties(new ClusterLibraryManagementOperationProperties() - .withAction(LibraryManagementAction.UNINSTALL) - .withLibraries(Arrays.asList( - new ClusterLibraryInner().withProperties(new PyPiLibraryProperties().withName("tensorflow")), - new ClusterLibraryInner() - .withProperties(new MavenLibraryProperties().withGroupId("org.apache.flink") - .withName("flink-connector-hudi"))))), + manager.clusters() + .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", + new ClusterUpgrade().withProperties(new ClusterAksPatchVersionUpgradeProperties()), com.azure.core.util.Context.NONE); } /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * InstallNewClusterLibraries.json + * UpgradeHotfixForCluster.json */ /** - * Sample code: InstallNewClusterLibraries. + * Sample code: ClustersUpgradeHotfix. * * @param manager Entry point to HDInsightContainersManager. */ public static void - installNewClusterLibraries(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterLibraries() - .manageLibraries("hiloResourceGroup", "clusterPool", "cluster", - new ClusterLibraryManagementOperation().withProperties( - new ClusterLibraryManagementOperationProperties().withAction(LibraryManagementAction.INSTALL) - .withLibraries(Arrays.asList( - new ClusterLibraryInner() - .withProperties(new PyPiLibraryProperties().withRemarks("PyPi packages.") - .withName("requests") - .withVersion("2.31.0")), - new ClusterLibraryInner() - .withProperties(new MavenLibraryProperties().withRemarks("Maven packages.") - .withGroupId("org.apache.flink") - .withName("flink-connector-kafka") - .withVersion("3.0.2-1.18"))))), + clustersUpgradeHotfix(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters() + .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", + new ClusterUpgrade().withProperties(new ClusterHotfixUpgradeProperties().withTargetOssVersion("1.16.0") + .withTargetClusterVersion("1.0.6") + .withTargetBuildNumber("3") + .withComponentName("historyserver")), com.azure.core.util.Context.NONE); } } ``` -### ClusterPoolAvailableUpgrades_List +### ClusterPools_ListByResourceGroup ```java /** - * Samples for ClusterPoolAvailableUpgrades List. + * Samples for AvailableClusterPoolVersions ListByLocation. */ -public final class ClusterPoolAvailableUpgradesListSamples { +public final class AvailableClusterPoolVersionsListByLocationSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPoolAvailableUpgrades.json + * ListAvailableClusterPoolVersions.json */ /** - * Sample code: GetClusterPoolAvailableUpgrade. + * Sample code: ClusterPoolVersionListResult. * * @param manager Entry point to HDInsightContainersManager. */ - public static void getClusterPoolAvailableUpgrade( + public static void clusterPoolVersionListResult( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPoolAvailableUpgrades() - .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); + manager.availableClusterPoolVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); } } ``` -### ClusterPoolUpgradeHistories_List +### ClusterPools_UpdateTags ```java /** - * Samples for ClusterPoolUpgradeHistories List. + * Samples for Clusters Delete. */ -public final class ClusterPoolUpgradeHistoriesListSamples { +public final class ClustersDeleteSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPoolUpgradeHistory.json + * DeleteCluster.json */ /** - * Sample code: ClusterPoolUpgradeHistoriesListResult. + * Sample code: HDInsightClustersDelete. * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolUpgradeHistoriesListResult( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPoolUpgradeHistories() - .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); + public static void + hDInsightClustersDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().delete("rg1", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` -### ClusterPools_CreateOrUpdate +### ClusterPools_Upgrade ```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; +import java.util.HashMap; +import java.util.Map; /** - * Samples for ClusterPools CreateOrUpdate. + * Samples for ClusterPools UpdateTags. */ -public final class ClusterPoolsCreateOrUpdateSamples { +public final class ClusterPoolsUpdateTagsSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPoolWithPrivateAks.json + * PatchClusterPool.json */ /** - * Sample code: ClusterPoolPutWithPrivateAks. + * Sample code: ClusterPoolsPatchTags. * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolPutWithPrivateAks( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withEnablePrivateApiServer(true))) - .create(); + public static void + clusterPoolsPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + ClusterPool resource = manager.clusterPools() + .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPoolWithUDRAks.json - */ - /** - * Sample code: ClusterPoolPutWithUDRAks. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolPutWithUDRAks(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") - .withOutboundType(OutboundType.USER_DEFINED_ROUTING))) - .create(); + // 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; } +} +``` + +### ClusterUpgradeHistories_List +```java +/** + * Samples for ClusterJobs List. + */ +public final class ClusterJobsListSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * CreateClusterPool.json + * ListClusterJobs.json */ /** - * Sample code: ClusterPoolPut. + * Sample code: ListClusterJobs. * * @param manager Entry point to HDInsightContainersManager. */ public static void - clusterPoolPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withProperties(new ClusterPoolResourceProperties() - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2") - .withAvailabilityZones(Arrays.asList("1", "2", "3")))) - .create(); + listClusterJobs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterJobs() + .list("hiloResourcegroup", "clusterPool1", "cluster1", null, com.azure.core.util.Context.NONE); } } ``` -### ClusterPools_Delete +### Clusters_Create ```java /** - * Samples for ClusterPools Delete. + * Samples for Clusters ListServiceConfigs. */ -public final class ClusterPoolsDeleteSamples { +public final class ClustersListServiceConfigsSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * DeleteClusterPool.json + * ListClusterServiceConfigs.json */ /** - * Sample code: ClusterPoolDelete. + * Sample code: HDInsightClusterGetServiceConfigs. * * @param manager Entry point to HDInsightContainersManager. */ - public static void - clusterPoolDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().delete("rg1", "clusterpool1", com.azure.core.util.Context.NONE); + public static void hDInsightClusterGetServiceConfigs( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().listServiceConfigs("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` -### ClusterPools_GetByResourceGroup +### Clusters_Delete ```java /** @@ -522,81 +838,112 @@ public final class ClusterPoolsGetByResourceGroupSamples { } ``` -### ClusterPools_List +### Clusters_Get ```java +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperationProperties; +import com.azure.resourcemanager.hdinsight.containers.models.LibraryManagementAction; +import com.azure.resourcemanager.hdinsight.containers.models.MavenLibraryProperties; +import com.azure.resourcemanager.hdinsight.containers.models.PyPiLibraryProperties; +import java.util.Arrays; + /** - * Samples for ClusterPools List. + * Samples for ClusterLibraries ManageLibraries. */ -public final class ClusterPoolsListSamples { +public final class ClusterLibrariesManageLibrariesSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPoolsSubscription.json + * UninstallExistingClusterLibraries.json */ /** - * Sample code: ClusterPoolsListBySubscription. + * Sample code: UninstallExistingClusterLibraries. * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolsListBySubscription( + public static void uninstallExistingClusterLibraries( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().list(com.azure.core.util.Context.NONE); + manager.clusterLibraries() + .manageLibraries("hiloResourceGroup", "clusterPool", "cluster", + new ClusterLibraryManagementOperation().withProperties(new ClusterLibraryManagementOperationProperties() + .withAction(LibraryManagementAction.UNINSTALL) + .withLibraries(Arrays.asList( + new ClusterLibraryInner().withProperties(new PyPiLibraryProperties().withName("tensorflow")), + new ClusterLibraryInner() + .withProperties(new MavenLibraryProperties().withGroupId("org.apache.flink") + .withName("flink-connector-hudi"))))), + com.azure.core.util.Context.NONE); } -} -``` - -### ClusterPools_ListByResourceGroup -```java -/** - * Samples for ClusterPools ListByResourceGroup. - */ -public final class ClusterPoolsListByResourceGroupSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterPools.json + * InstallNewClusterLibraries.json */ /** - * Sample code: ClusterPoolsListByResourceGroup. + * Sample code: InstallNewClusterLibraries. * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolsListByResourceGroup( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools().listByResourceGroup("hiloResourcegroup", com.azure.core.util.Context.NONE); + public static void + installNewClusterLibraries(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterLibraries() + .manageLibraries("hiloResourceGroup", "clusterPool", "cluster", + new ClusterLibraryManagementOperation().withProperties( + new ClusterLibraryManagementOperationProperties().withAction(LibraryManagementAction.INSTALL) + .withLibraries(Arrays.asList( + new ClusterLibraryInner() + .withProperties(new PyPiLibraryProperties().withRemarks("PyPi packages.") + .withName("requests") + .withVersion("2.31.0")), + new ClusterLibraryInner() + .withProperties(new MavenLibraryProperties().withRemarks("Maven packages.") + .withGroupId("org.apache.flink") + .withName("flink-connector-kafka") + .withVersion("3.0.2-1.18"))))), + com.azure.core.util.Context.NONE); } } ``` -### ClusterPools_UpdateTags +### Clusters_GetInstanceView ```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; +import com.azure.resourcemanager.hdinsight.containers.models.Action; +import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; import java.util.HashMap; import java.util.Map; /** - * Samples for ClusterPools UpdateTags. + * Samples for ClusterJobs RunJob. */ -public final class ClusterPoolsUpdateTagsSamples { +public final class ClusterJobsRunJobSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchClusterPool.json + * RunClusterJob.json */ /** - * Sample code: ClusterPoolsPatchTags. + * Sample code: RunClusterJob. * * @param manager Entry point to HDInsightContainersManager. */ public static void - clusterPoolsPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - ClusterPool resource = manager.clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + runClusterJob(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterJobs() + .runJob("hiloResourcegroup", "clusterpool1", "cluster1", + new ClusterJobInner() + .withProperties(new FlinkJobProperties().withJobName("flink-job-name") + .withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars") + .withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar") + .withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob") + .withAction(Action.START) + .withFlinkConfiguration(mapOf("parallelism", "1", "savepoint.directory", + "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -613,83 +960,31 @@ public final class ClusterPoolsUpdateTagsSamples { } ``` -### ClusterPools_Upgrade - -```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; - -/** - * Samples for ClusterPools Upgrade. - */ -public final class ClusterPoolsUpgradeSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeNodeOsForClusterPool.json - */ - /** - * Sample code: ClusterPoolsUpgradeNodeOs. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clusterPoolsUpgradeNodeOs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .upgrade("hiloResourcegroup", "clusterpool1", - new ClusterPoolUpgrade().withProperties(new ClusterPoolNodeOsImageUpdateProperties()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeAKSPatchVersionForClusterPool.json - */ - /** - * Sample code: ClusterPoolsUpgradeAKSPatchVersion. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void clusterPoolsUpgradeAKSPatchVersion( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterPools() - .upgrade("hiloResourcegroup", "clusterpool1", - new ClusterPoolUpgrade() - .withProperties(new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true) - .withUpgradeAllClusterNodes(false)), - com.azure.core.util.Context.NONE); - } -} -``` - -### ClusterUpgradeHistories_List +### Clusters_ListByClusterPoolName ```java /** - * Samples for ClusterUpgradeHistories List. + * Samples for Clusters ListInstanceViews. */ -public final class ClusterUpgradeHistoriesListSamples { +public final class ClustersListInstanceViewsSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterUpgradeHistory.json + * ListClusterInstanceViews.json */ /** - * Sample code: ClusterUpgradeHistoriesListResult. + * Sample code: HDInsightClusterGetInstanceViews. * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterUpgradeHistoriesListResult( + public static void hDInsightClusterGetInstanceViews( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterUpgradeHistories() - .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); + manager.clusters().listInstanceViews("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` -### Clusters_Create +### Clusters_ListInstanceViews ```java import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; @@ -961,148 +1256,26 @@ public final class ClustersCreateSamples { } ``` -### Clusters_Delete - -```java -/** - * Samples for Clusters Delete. - */ -public final class ClustersDeleteSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * DeleteCluster.json - */ - /** - * Sample code: HDInsightClustersDelete. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClustersDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().delete("rg1", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_Get - -```java -/** - * Samples for Clusters Get. - */ -public final class ClustersGetSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetCluster.json - */ - /** - * Sample code: HDInsightClusterGet. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClusterGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_GetInstanceView - -```java -/** - * Samples for Clusters GetInstanceView. - */ -public final class ClustersGetInstanceViewSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetClusterInstanceView.json - */ - /** - * Sample code: HDInsightClusterGetInstanceView. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetInstanceView( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_ListByClusterPoolName - -```java -/** - * Samples for Clusters ListByClusterPoolName. - */ -public final class ClustersListByClusterPoolNameSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClustersByClusterPoolName.json - */ - /** - * Sample code: HDInsightClustersListByClusterPoolName. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClustersListByClusterPoolName( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listByClusterPoolName("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); - } -} -``` - -### Clusters_ListInstanceViews - -```java -/** - * Samples for Clusters ListInstanceViews. - */ -public final class ClustersListInstanceViewsSamples { - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterInstanceViews.json - */ - /** - * Sample code: HDInsightClusterGetInstanceViews. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterGetInstanceViews( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listInstanceViews("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); - } -} -``` - ### Clusters_ListServiceConfigs ```java /** - * Samples for Clusters ListServiceConfigs. + * Samples for ClusterPools ListByResourceGroup. */ -public final class ClustersListServiceConfigsSamples { +public final class ClusterPoolsListByResourceGroupSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ListClusterServiceConfigs.json + * ListClusterPools.json */ /** - * Sample code: HDInsightClusterGetServiceConfigs. + * Sample code: ClusterPoolsListByResourceGroup. * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterGetServiceConfigs( + public static void clusterPoolsListByResourceGroup( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters().listServiceConfigs("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); + manager.clusterPools().listByResourceGroup("hiloResourcegroup", com.azure.core.util.Context.NONE); } } ``` @@ -1141,159 +1314,24 @@ public final class ClustersResizeSamples { ### Clusters_Update ```java -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.Cluster; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; -import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import com.azure.resourcemanager.hdinsight.containers.models.UpdatableClusterProfile; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for Clusters Update. + * Samples for ClusterPoolAvailableUpgrades List. */ -public final class ClustersUpdateSamples { +public final class ClusterPoolAvailableUpgradesListSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchRangerCluster.json + * ListClusterPoolAvailableUpgrades.json */ /** - * Sample code: HDInsightRangerClusterPatchTags. + * Sample code: GetClusterPoolAvailableUpgrade. * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightRangerClusterPatchTags( + public static void getClusterPoolAvailableUpgrade( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new ClusterPatchProperties() - .withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile() - .withRangerAdmin(new RangerAdminSpec() - .withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")) - .withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net") - .withName("testdb") - .withPasswordSecretRef("fakeTokenPlaceholder") - .withUsername("admin"))) - .withRangerAudit( - new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) - .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) - .withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", - "13be6971-79db-4f33-9d41-b25589ca25ac")) - .withMode(RangerUsersyncMode.AUTOMATIC) - .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")))))) - .apply(); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * PatchCluster.json - */ - /** - * Sample code: HDInsightClustersPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - hDInsightClustersPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = manager.clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties( - new ClusterPatchProperties() - .withClusterProfile( - new UpdatableClusterProfile() - .withServiceConfigsProfiles( - Arrays - .asList( - new ClusterServiceConfigsProfile().withServiceName("TestService1") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig().withComponent("TestComp1") - .withFiles( - Arrays.asList( - new ClusterConfigFile().withFileName("TestFile1") - .withValues(mapOf("Test.config.1", "1", - "Test.config.2", "2")), - new ClusterConfigFile().withFileName("TestFile2") - .withValues(mapOf("Test.config.3", "3", - "Test.config.4", "4")))), - new ClusterServiceConfig().withComponent("TestComp2") - .withFiles(Arrays - .asList( - new ClusterConfigFile().withFileName("TestFile3") - .withContent("TestContent") - .withPath("TestPath"), - new ClusterConfigFile() - .withFileName("TestFile4") - .withValues(mapOf("Test.config.7", "7", - "Test.config.8", "8")))))), - new ClusterServiceConfigsProfile().withServiceName("TestService2") - .withConfigs( - Arrays - .asList(new ClusterServiceConfig().withComponent("TestComp3") - .withFiles(Arrays - .asList(new ClusterConfigFile().withFileName("TestFile5") - .withValues(mapOf("Test.config.9", "9")))))))) - .withSshProfile(new SshProfile().withCount(2)) - .withAutoscaleProfile( - new AutoscaleProfile().withEnabled(true) - .withGracefulDecommissionTimeout(-1) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) - .withScheduleBasedConfig(new ScheduleBasedConfig() - .withTimeZone("Cen. Australia Standard Time") - .withDefaultCount(3) - .withSchedules(Arrays.asList( - new Schedule().withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays - .asList(ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), - new Schedule().withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays.asList(ScheduleDay.SUNDAY)))))) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("Testuser1", "Testuser2"))) - .withLogAnalyticsProfile(new ClusterLogAnalyticsProfile().withEnabled(true) - .withApplicationLogs(new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true) - .withStdErrorEnabled(true)) - .withMetricsEnabled(true)))) - .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; + manager.clusterPoolAvailableUpgrades() + .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); } } ``` @@ -1301,51 +1339,24 @@ public final class ClustersUpdateSamples { ### Clusters_Upgrade ```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; - /** - * Samples for Clusters Upgrade. + * Samples for ClusterUpgradeHistories List. */ -public final class ClustersUpgradeSamples { +public final class ClusterUpgradeHistoriesListSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeAKSPatchVersionForCluster.json + * ListClusterUpgradeHistory.json */ /** - * Sample code: ClustersUpgradeAKSPatchVersion. + * Sample code: ClusterUpgradeHistoriesListResult. * * @param manager Entry point to HDInsightContainersManager. */ - public static void clustersUpgradeAKSPatchVersion( + public static void clusterUpgradeHistoriesListResult( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterUpgrade().withProperties(new ClusterAksPatchVersionUpgradeProperties()), - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * UpgradeHotfixForCluster.json - */ - /** - * Sample code: ClustersUpgradeHotfix. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void - clustersUpgradeHotfix(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .upgrade("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterUpgrade().withProperties(new ClusterHotfixUpgradeProperties().withTargetOssVersion("1.16.0") - .withTargetClusterVersion("1.0.6") - .withTargetBuildNumber("3") - .withComponentName("historyserver")), - com.azure.core.util.Context.NONE); + manager.clusterUpgradeHistories() + .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1353,30 +1364,24 @@ public final class ClustersUpgradeSamples { ### Clusters_UpgradeManualRollback ```java -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollbackProperties; - /** - * Samples for Clusters UpgradeManualRollback. + * Samples for ClusterAvailableUpgrades List. */ -public final class ClustersUpgradeManualRollbackSamples { +public final class ClusterAvailableUpgradesListSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * ClusterUpgradeRollback.json + * ListClusterAvailableUpgrades.json */ /** - * Sample code: ClusterUpgradeRollback. + * Sample code: GetClusterAvailableUpgrade. * * @param manager Entry point to HDInsightContainersManager. */ public static void - clusterUpgradeRollback(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusters() - .upgradeManualRollback("hiloResourcegroup", "clusterpool1", "cluster1", - new ClusterUpgradeRollback().withProperties(new ClusterUpgradeRollbackProperties().withUpgradeHistory( - "/subscriptions/10e32bab-26da-4cc4-a441-52b318f824e6/resourceGroups/hiloResourcegroup/providers/Microsoft.HDInsight/clusterpools/clusterpool1/clusters/cluster1/upgradeHistories/01_11_2024_02_35_03_AM-HotfixUpgrade")), - com.azure.core.util.Context.NONE); + getClusterAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterAvailableUpgrades() + .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1384,29 +1389,24 @@ public final class ClustersUpgradeManualRollbackSamples { ### Locations_CheckNameAvailability ```java -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; - /** - * Samples for Locations CheckNameAvailability. + * Samples for Clusters GetInstanceView. */ -public final class LocationsCheckNameAvailabilitySamples { +public final class ClustersGetInstanceViewSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * LocationsNameAvailability.json + * GetClusterInstanceView.json */ /** - * Sample code: LocationsNameAvailability. + * Sample code: HDInsightClusterGetInstanceView. * * @param manager Entry point to HDInsightContainersManager. */ - public static void - locationsNameAvailability(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.locations() - .checkNameAvailabilityWithResponse("southeastasia", - new NameAvailabilityParameters().withName("contosemember1") - .withType("Microsoft.HDInsight/clusterPools/clusters"), - com.azure.core.util.Context.NONE); + public static void hDInsightClusterGetInstanceView( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters() + .getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1415,22 +1415,22 @@ public final class LocationsCheckNameAvailabilitySamples { ```java /** - * Samples for Operations List. + * Samples for ClusterPools List. */ -public final class OperationsListSamples { +public final class ClusterPoolsListSamples { /* * x-ms-original-file: * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/ - * GetOperations.json + * ListClusterPoolsSubscription.json */ /** - * Sample code: ListOperations. + * Sample code: ClusterPoolsListBySubscription. * * @param manager Entry point to HDInsightContainersManager. */ - public static void - listOperations(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + public static void clusterPoolsListBySubscription( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().list(com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml index c0c036cbefda..9b80c5378c7a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml @@ -48,11 +48,6 @@ true - - com.azure - azure-json - 1.5.0 - com.azure azure-core @@ -63,6 +58,11 @@ azure-core-management 1.17.0 + + com.azure + azure-json + 1.5.0 + com.azure azure-core-test diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java index 838aa644c5cd..603baaec9840 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java @@ -11,17 +11,18 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; 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.hdinsight.containers.fluent.HDInsightContainersManagementClient; import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterPoolVersionsImpl; @@ -30,10 +31,10 @@ import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterJobsImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterLibrariesImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolAvailableUpgradesImpl; -import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolUpgradeHistoriesImpl; -import com.azure.resourcemanager.hdinsight.containers.implementation.ClustersImpl; +import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterUpgradeHistoriesImpl; +import com.azure.resourcemanager.hdinsight.containers.implementation.ClustersImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.HDInsightContainersManagementClientBuilder; import com.azure.resourcemanager.hdinsight.containers.implementation.LocationsImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.OperationsImpl; @@ -43,16 +44,17 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobs; import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraries; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrades; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistories; -import com.azure.resourcemanager.hdinsight.containers.models.Clusters; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools; import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistories; +import com.azure.resourcemanager.hdinsight.containers.models.Clusters; import com.azure.resourcemanager.hdinsight.containers.models.Locations; import com.azure.resourcemanager.hdinsight.containers.models.Operations; import java.time.Duration; 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-hdinsight-containers.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -244,12 +249,14 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure 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.hdinsight.containers") .append("/") - .append("1.0.0-beta.3"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -282,7 +289,7 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java index 1ffc775adb1e..89756fd96ece 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java @@ -29,9 +29,9 @@ public final class ClusterAvailableUpgradeInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class ClusterAvailableUpgradeInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterAvailableUpgradeInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java index 7292d9e2eb2d..39b3c4f68701 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java @@ -30,9 +30,9 @@ public final class ClusterInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ClusterInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java index 241650c87ebb..1feb2517efec 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java @@ -30,9 +30,9 @@ public final class ClusterJobInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ClusterJobInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterJobInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java index 5e974cf7dc7a..038ef1d1a73c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java @@ -30,9 +30,9 @@ public final class ClusterLibraryInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ClusterLibraryInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterLibraryInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java index 799614adf89f..f70e888bd4f9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java @@ -29,9 +29,9 @@ public final class ClusterPoolAvailableUpgradeInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class ClusterPoolAvailableUpgradeInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterPoolAvailableUpgradeInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java index ee1080e15394..d2740404f26a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java @@ -30,9 +30,9 @@ public final class ClusterPoolInner extends Resource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ClusterPoolInner extends Resource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterPoolInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java index 72761269ac31..a9f800416800 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java @@ -30,9 +30,9 @@ public final class ClusterPoolUpgradeHistoryInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ClusterPoolUpgradeHistoryInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterPoolUpgradeHistoryInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java index f907a9bf9727..f2027bd6d1e7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java @@ -29,9 +29,9 @@ public final class ClusterPoolVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class ClusterPoolVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterPoolVersionInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java index 41ebd3a02274..d24454c43b87 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java @@ -30,9 +30,9 @@ public final class ClusterUpgradeHistoryInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -40,9 +40,9 @@ public final class ClusterUpgradeHistoryInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterUpgradeHistoryInner class. @@ -80,13 +80,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -100,13 +100,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java index 4b015d370c51..0504d3d86efa 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java @@ -29,9 +29,9 @@ public final class ClusterVersionInner extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class ClusterVersionInner extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterVersionInner class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java index 6612ffcf9e1d..e093e25fc479 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java @@ -12,8 +12,8 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools; public final class ClusterPoolsImpl implements ClusterPools { private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolsImpl.class); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java index bd2897085453..0b4100d5e20e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java @@ -16,9 +16,9 @@ import com.azure.resourcemanager.hdinsight.containers.models.Cluster; import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.Clusters; import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; +import com.azure.resourcemanager.hdinsight.containers.models.Clusters; import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigResult; public final class ClustersImpl implements Clusters { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java index 541d950cff66..8c9d455001ed 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java @@ -13,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -29,10 +29,10 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterJobsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterLibrariesClient; import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolAvailableUpgradesClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolUpgradeHistoriesClient; -import com.azure.resourcemanager.hdinsight.containers.fluent.ClustersClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterUpgradeHistoriesClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClustersClient; import com.azure.resourcemanager.hdinsight.containers.fluent.HDInsightContainersManagementClient; import com.azure.resourcemanager.hdinsight.containers.fluent.LocationsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.OperationsClient; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java index 43006dc41153..eb212f7ea7c8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -55,9 +56,26 @@ public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiObjectId(Strin */ @Override public void validate() { - super.validate(); + if (msiResourceId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property msiResourceId in model AksClusterProfileAksClusterAgentPoolIdentityProfile")); + } + if (msiClientId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property msiClientId in model AksClusterProfileAksClusterAgentPoolIdentityProfile")); + } + if (msiObjectId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property msiObjectId in model AksClusterProfileAksClusterAgentPoolIdentityProfile")); + } } + private static final ClientLogger LOGGER + = new ClientLogger(AksClusterProfileAksClusterAgentPoolIdentityProfile.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java index acb18d9ef7b6..55deccb5d95c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -112,9 +113,20 @@ public ClusterAksPatchUpgradeHistoryProperties withUtcTime(String utcTime) { */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterAksPatchUpgradeHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterAksPatchUpgradeHistoryProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterAksPatchUpgradeHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java index 6683708201c4..453967f22921 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java @@ -43,7 +43,6 @@ public ClusterUpgradeType upgradeType() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java index e81320332020..810eed0815f9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java @@ -322,7 +322,6 @@ public ClusterAvailableInPlaceUpgradeProperties withCreatedTime(OffsetDateTime c */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java index 56c25d74df49..57e03c9aeb64 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java @@ -121,7 +121,6 @@ public ClusterAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(String */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java index 4dc1edca4de3..8c3db8082aa5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java @@ -145,7 +145,6 @@ public ClusterAvailableUpgradeHotfixUpgradeProperties withCreatedTime(OffsetDate */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java index 5e6a94b9e2a6..85129e92dbb1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java @@ -146,7 +146,6 @@ public ClusterAvailableUpgradePatchVersionUpgradeProperties withCreatedTime(Offs */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java index bedf2e9f0fff..e5defbfa7730 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -134,9 +135,20 @@ public ClusterHotfixUpgradeHistoryProperties withUtcTime(String utcTime) { */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterHotfixUpgradeHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterHotfixUpgradeHistoryProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterHotfixUpgradeHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java index bf40ad5b66f1..14aa249b9f50 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java @@ -79,7 +79,6 @@ public ClusterHotfixUpgradeProperties withComponentName(String componentName) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java index 4fb5702805e7..b5865ad832c4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -134,9 +135,20 @@ public ClusterHotfixUpgradeRollbackHistoryProperties withUtcTime(String utcTime) */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterHotfixUpgradeRollbackHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterHotfixUpgradeRollbackHistoryProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterHotfixUpgradeRollbackHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java index 84b8a8e65c98..793db3f90130 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -263,9 +264,20 @@ public ClusterInPlaceUpgradeHistoryProperties withUtcTime(String utcTime) { */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterInPlaceUpgradeHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterInPlaceUpgradeHistoryProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterInPlaceUpgradeHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java index b6bcd707bae2..e3a216c389f5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java @@ -143,7 +143,6 @@ public ClusterInPlaceUpgradeProperties withComponentName(String componentName) { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java index 14a8134d533b..50f25f132a56 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -55,9 +56,15 @@ public ClusterInstanceViewPropertiesStatus withMessage(String message) { */ @Override public void validate() { - super.validate(); + if (ready() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ready in model ClusterInstanceViewPropertiesStatus")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterInstanceViewPropertiesStatus.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java index d7961fddea6e..15d56b142851 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -47,9 +48,24 @@ public ClusterInstanceViewResultProperties withServiceStatuses(List e.validate()); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterInstanceViewResultProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java index d79c08eeebb0..7deebe0f9746 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java @@ -29,9 +29,9 @@ public final class ClusterLibraryManagementOperation extends ProxyResource { private SystemData systemData; /* - * Fully qualified resource Id for the resource. + * The type of the resource. */ - private String id; + private String type; /* * The name of the resource. @@ -39,9 +39,9 @@ public final class ClusterLibraryManagementOperation extends ProxyResource { private String name; /* - * The type of the resource. + * Fully qualified resource Id for the resource. */ - private String type; + private String id; /** * Creates an instance of ClusterLibraryManagementOperation class. @@ -79,13 +79,13 @@ public SystemData systemData() { } /** - * Get the id property: Fully qualified resource Id for the resource. + * Get the type property: The type of the resource. * - * @return the id value. + * @return the type value. */ @Override - public String id() { - return this.id; + public String type() { + return this.type; } /** @@ -99,13 +99,13 @@ public String name() { } /** - * Get the type property: The type of the resource. + * Get the id property: Fully qualified resource Id for the resource. * - * @return the type value. + * @return the id value. */ @Override - public String type() { - return this.type; + public String id() { + return this.id; } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java index ef765c8e9cf9..a5c03c2f179c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -134,9 +135,20 @@ public ClusterPatchVersionUpgradeHistoryProperties withUtcTime(String utcTime) { */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterPatchVersionUpgradeHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterPatchVersionUpgradeHistoryProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterPatchVersionUpgradeHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java index dab36780a385..57c93eb954de 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java @@ -79,7 +79,6 @@ public ClusterPatchVersionUpgradeProperties withComponentName(String componentNa */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java index 509c46d047d7..bd333dcb835f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -135,9 +136,21 @@ public ClusterPatchVersionUpgradeRollbackHistoryProperties withUtcTime(String ut */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterPatchVersionUpgradeRollbackHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterPatchVersionUpgradeRollbackHistoryProperties")); + } } + private static final ClientLogger LOGGER + = new ClientLogger(ClusterPatchVersionUpgradeRollbackHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java index dc7149e5f527..d63cf3f50869 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -162,9 +163,20 @@ public ClusterPoolAksPatchUpgradeHistoryProperties withUtcTime(String utcTime) { */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterPoolAksPatchUpgradeHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterPoolAksPatchUpgradeHistoryProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolAksPatchUpgradeHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java index a182dcf7bd7b..e78047c1f7ee 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java @@ -131,7 +131,6 @@ public ClusterPoolAksPatchVersionUpgradeProperties withTargetAksVersion(String t */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java index 68fd297ea328..b1c6fadd984c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java @@ -119,7 +119,6 @@ public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(St */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java index bd3696eb1bfe..a484a49edd9c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java @@ -68,7 +68,6 @@ public ClusterPoolAvailableUpgradeNodeOsUpgradeProperties withLatestVersion(Stri */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java index a72f80fe4266..9062c94c9658 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java @@ -43,7 +43,6 @@ public ClusterPoolUpgradeType upgradeType() { */ @Override public void validate() { - super.validate(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java index 107fdbaaaa47..111de8ba2652 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -87,9 +88,20 @@ public ClusterPoolNodeOsUpgradeHistoryProperties withUtcTime(String utcTime) { */ @Override public void validate() { - super.validate(); + if (utcTime() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property utcTime in model ClusterPoolNodeOsUpgradeHistoryProperties")); + } + if (upgradeResult() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property upgradeResult in model ClusterPoolNodeOsUpgradeHistoryProperties")); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolNodeOsUpgradeHistoryProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java index 7f662fbee750..b75081260459 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java @@ -62,7 +62,9 @@ public ClusterPoolResourcePropertiesAksClusterProfile withAksClusterAgentPoolIde */ @Override public void validate() { - super.validate(); + if (aksClusterAgentPoolIdentityProfile() != null) { + aksClusterAgentPoolIdentityProfile().validate(); + } } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java index d3a20985bf0b..5ecc9f0421d3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -46,9 +47,18 @@ public ClusterPoolResourcePropertiesClusterPoolProfile withPublicIpTag(IpTag pub */ @Override public void validate() { - super.validate(); + if (clusterPoolVersion() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property clusterPoolVersion in model ClusterPoolResourcePropertiesClusterPoolProfile")); + } + if (publicIpTag() != null) { + publicIpTag().validate(); + } } + private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolResourcePropertiesClusterPoolProfile.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java index eac314a9a3da..8cc24c92e823 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -62,9 +63,15 @@ public ClusterPoolResourcePropertiesComputeProfile withAvailabilityZones(List CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedMavenLibraryProperties.withTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("status".equals(fieldName)) { - deserializedMavenLibraryProperties.status = Status.fromString(reader.getString()); + deserializedMavenLibraryProperties.withStatus(Status.fromString(reader.getString())); } else if ("message".equals(fieldName)) { - deserializedMavenLibraryProperties.message = reader.getString(); + deserializedMavenLibraryProperties.withMessage(reader.getString()); } else if ("groupId".equals(fieldName)) { deserializedMavenLibraryProperties.groupId = reader.getString(); } else if ("name".equals(fieldName)) { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/PyPiLibraryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/PyPiLibraryProperties.java index ad0c7df477a2..760a2b44d641 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/PyPiLibraryProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/PyPiLibraryProperties.java @@ -11,7 +11,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.time.OffsetDateTime; /** * Properties of a PyPi library in the cluster. @@ -33,21 +32,6 @@ public final class PyPiLibraryProperties extends ClusterLibraryProperties { */ private String version; - /* - * Timestamp of the latest library management operation. - */ - private OffsetDateTime timestamp; - - /* - * Status of the library. - */ - private Status status; - - /* - * Error message of the library operation when a failure occurs. - */ - private String message; - /** * Creates an instance of PyPiLibraryProperties class. */ @@ -104,36 +88,6 @@ public PyPiLibraryProperties withVersion(String version) { return this; } - /** - * Get the timestamp property: Timestamp of the latest library management operation. - * - * @return the timestamp value. - */ - @Override - public OffsetDateTime timestamp() { - return this.timestamp; - } - - /** - * Get the status property: Status of the library. - * - * @return the status value. - */ - @Override - public Status status() { - return this.status; - } - - /** - * Get the message property: Error message of the library operation when a failure occurs. - * - * @return the message value. - */ - @Override - public String message() { - return this.message; - } - /** * {@inheritDoc} */ @@ -150,7 +104,6 @@ public PyPiLibraryProperties withRemarks(String remarks) { */ @Override public void validate() { - super.validate(); if (name() == null) { throw LOGGER.atError() .log(new IllegalArgumentException("Missing required property name in model PyPiLibraryProperties")); @@ -191,12 +144,12 @@ public static PyPiLibraryProperties fromJson(JsonReader jsonReader) throws IOExc if ("remarks".equals(fieldName)) { deserializedPyPiLibraryProperties.withRemarks(reader.getString()); } else if ("timestamp".equals(fieldName)) { - deserializedPyPiLibraryProperties.timestamp = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedPyPiLibraryProperties.withTimestamp(reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); } else if ("status".equals(fieldName)) { - deserializedPyPiLibraryProperties.status = Status.fromString(reader.getString()); + deserializedPyPiLibraryProperties.withStatus(Status.fromString(reader.getString())); } else if ("message".equals(fieldName)) { - deserializedPyPiLibraryProperties.message = reader.getString(); + deserializedPyPiLibraryProperties.withMessage(reader.getString()); } else if ("name".equals(fieldName)) { deserializedPyPiLibraryProperties.name = reader.getString(); } else if ("type".equals(fieldName)) { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResultProperties.java index d35ac2912890..e7f7abff77a4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResultProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResultProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -101,9 +102,32 @@ public ServiceConfigResultProperties withDefaultKeys(Map { + if (e != null) { + e.validate(); + } + }); + } } + private static final ClientLogger LOGGER = new ClientLogger(ServiceConfigResultProperties.class); + /** * {@inheritDoc} */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/azure-resourcemanager-hdinsight-containers.properties b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/azure-resourcemanager-hdinsight-containers.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/azure-resourcemanager-hdinsight-containers.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java deleted file mode 100644 index d59d962a8dde..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class AksClusterProfileAksClusterAgentPoolIdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksClusterProfileAksClusterAgentPoolIdentityProfile model - = BinaryData.fromString("{\"msiResourceId\":\"jfm\",\"msiClientId\":\"pee\",\"msiObjectId\":\"vmgxsab\"}") - .toObject(AksClusterProfileAksClusterAgentPoolIdentityProfile.class); - Assertions.assertEquals("jfm", model.msiResourceId()); - Assertions.assertEquals("pee", model.msiClientId()); - Assertions.assertEquals("vmgxsab", model.msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksClusterProfileAksClusterAgentPoolIdentityProfile model - = new AksClusterProfileAksClusterAgentPoolIdentityProfile().withMsiResourceId("jfm") - .withMsiClientId("pee") - .withMsiObjectId("vmgxsab"); - model = BinaryData.fromObject(model).toObject(AksClusterProfileAksClusterAgentPoolIdentityProfile.class); - Assertions.assertEquals("jfm", model.msiResourceId()); - Assertions.assertEquals("pee", model.msiClientId()); - Assertions.assertEquals("vmgxsab", model.msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java deleted file mode 100644 index f33376ce009a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class AksClusterProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksClusterProfile model = BinaryData.fromString( - "{\"aksClusterResourceId\":\"lxxwrljdouskc\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"kocrcjdkwtnhx\",\"msiClientId\":\"njbiksqrglssain\",\"msiObjectId\":\"p\"},\"aksVersion\":\"nzl\"}") - .toObject(AksClusterProfile.class); - Assertions.assertEquals("lxxwrljdouskc", model.aksClusterResourceId()); - Assertions.assertEquals("kocrcjdkwtnhx", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("njbiksqrglssain", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("p", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksClusterProfile model = new AksClusterProfile().withAksClusterResourceId("lxxwrljdouskc") - .withAksClusterAgentPoolIdentityProfile( - new AksClusterProfileAksClusterAgentPoolIdentityProfile().withMsiResourceId("kocrcjdkwtnhx") - .withMsiClientId("njbiksqrglssain") - .withMsiObjectId("p")); - model = BinaryData.fromObject(model).toObject(AksClusterProfile.class); - Assertions.assertEquals("lxxwrljdouskc", model.aksClusterResourceId()); - Assertions.assertEquals("kocrcjdkwtnhx", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("njbiksqrglssain", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("p", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java deleted file mode 100644 index edbc4d7efe56..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizationProfile model = BinaryData - .fromString( - "{\"userIds\":[\"clha\",\"xdbabphlwr\",\"lfktsths\",\"cocmnyyaztt\"],\"groupIds\":[\"wrqpue\"]}") - .toObject(AuthorizationProfile.class); - Assertions.assertEquals("clha", model.userIds().get(0)); - Assertions.assertEquals("wrqpue", model.groupIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizationProfile model - = new AuthorizationProfile().withUserIds(Arrays.asList("clha", "xdbabphlwr", "lfktsths", "cocmnyyaztt")) - .withGroupIds(Arrays.asList("wrqpue")); - model = BinaryData.fromObject(model).toObject(AuthorizationProfile.class); - Assertions.assertEquals("clha", model.userIds().get(0)); - Assertions.assertEquals("wrqpue", model.groupIds().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java deleted file mode 100644 index 211544a46c1a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AutoscaleProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleProfile model = BinaryData.fromString( - "{\"enabled\":false,\"gracefulDecommissionTimeout\":855265021,\"autoscaleType\":\"LoadBased\",\"scheduleBasedConfig\":{\"timeZone\":\"zvszj\",\"defaultCount\":928593835,\"schedules\":[{\"startTime\":\"vjfdx\",\"endTime\":\"ivetvtcq\",\"count\":928990245,\"days\":[\"Friday\"]},{\"startTime\":\"oqmcbxvwvxyslq\",\"endTime\":\"hsfxoblytkb\",\"count\":857226054,\"days\":[\"Monday\"]},{\"startTime\":\"wwwfbkr\",\"endTime\":\"rn\",\"count\":309197108,\"days\":[\"Saturday\",\"Wednesday\",\"Tuesday\"]}]},\"loadBasedConfig\":{\"minNodes\":925506689,\"maxNodes\":475216783,\"pollInterval\":1216343785,\"cooldownPeriod\":1861824237,\"scalingRules\":[{\"actionType\":\"scaledown\",\"evaluationCount\":249445305,\"scalingMetric\":\"asrru\",\"comparisonRule\":{\"operator\":\"lessThan\",\"threshold\":94.09205}},{\"actionType\":\"scaledown\",\"evaluationCount\":1393923794,\"scalingMetric\":\"qfsubcgjbirx\",\"comparisonRule\":{\"operator\":\"lessThan\",\"threshold\":79.85491}}]}}") - .toObject(AutoscaleProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(855265021, model.gracefulDecommissionTimeout()); - Assertions.assertEquals(AutoscaleType.LOAD_BASED, model.autoscaleType()); - Assertions.assertEquals("zvszj", model.scheduleBasedConfig().timeZone()); - Assertions.assertEquals(928593835, model.scheduleBasedConfig().defaultCount()); - Assertions.assertEquals("vjfdx", model.scheduleBasedConfig().schedules().get(0).startTime()); - Assertions.assertEquals("ivetvtcq", model.scheduleBasedConfig().schedules().get(0).endTime()); - Assertions.assertEquals(928990245, model.scheduleBasedConfig().schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.FRIDAY, model.scheduleBasedConfig().schedules().get(0).days().get(0)); - Assertions.assertEquals(925506689, model.loadBasedConfig().minNodes()); - Assertions.assertEquals(475216783, model.loadBasedConfig().maxNodes()); - Assertions.assertEquals(1216343785, model.loadBasedConfig().pollInterval()); - Assertions.assertEquals(1861824237, model.loadBasedConfig().cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.loadBasedConfig().scalingRules().get(0).actionType()); - Assertions.assertEquals(249445305, model.loadBasedConfig().scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("asrru", model.loadBasedConfig().scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, - model.loadBasedConfig().scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(94.09205f, model.loadBasedConfig().scalingRules().get(0).comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleProfile model = new AutoscaleProfile().withEnabled(false) - .withGracefulDecommissionTimeout(855265021) - .withAutoscaleType(AutoscaleType.LOAD_BASED) - .withScheduleBasedConfig(new ScheduleBasedConfig().withTimeZone("zvszj") - .withDefaultCount(928593835) - .withSchedules(Arrays.asList( - new Schedule().withStartTime("vjfdx") - .withEndTime("ivetvtcq") - .withCount(928990245) - .withDays(Arrays.asList(ScheduleDay.FRIDAY)), - new Schedule().withStartTime("oqmcbxvwvxyslq") - .withEndTime("hsfxoblytkb") - .withCount(857226054) - .withDays(Arrays.asList(ScheduleDay.MONDAY)), - new Schedule().withStartTime("wwwfbkr") - .withEndTime("rn") - .withCount(309197108) - .withDays(Arrays.asList(ScheduleDay.SATURDAY, ScheduleDay.WEDNESDAY, ScheduleDay.TUESDAY))))) - .withLoadBasedConfig( - new LoadBasedConfig().withMinNodes(925506689) - .withMaxNodes(475216783) - .withPollInterval(1216343785) - .withCooldownPeriod(1861824237) - .withScalingRules(Arrays.asList( - new ScalingRule().withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(249445305) - .withScalingMetric("asrru") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(94.09205f)), - new ScalingRule().withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(1393923794) - .withScalingMetric("qfsubcgjbirx") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(79.85491f))))); - model = BinaryData.fromObject(model).toObject(AutoscaleProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(855265021, model.gracefulDecommissionTimeout()); - Assertions.assertEquals(AutoscaleType.LOAD_BASED, model.autoscaleType()); - Assertions.assertEquals("zvszj", model.scheduleBasedConfig().timeZone()); - Assertions.assertEquals(928593835, model.scheduleBasedConfig().defaultCount()); - Assertions.assertEquals("vjfdx", model.scheduleBasedConfig().schedules().get(0).startTime()); - Assertions.assertEquals("ivetvtcq", model.scheduleBasedConfig().schedules().get(0).endTime()); - Assertions.assertEquals(928990245, model.scheduleBasedConfig().schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.FRIDAY, model.scheduleBasedConfig().schedules().get(0).days().get(0)); - Assertions.assertEquals(925506689, model.loadBasedConfig().minNodes()); - Assertions.assertEquals(475216783, model.loadBasedConfig().maxNodes()); - Assertions.assertEquals(1216343785, model.loadBasedConfig().pollInterval()); - Assertions.assertEquals(1861824237, model.loadBasedConfig().cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.loadBasedConfig().scalingRules().get(0).actionType()); - Assertions.assertEquals(249445305, model.loadBasedConfig().scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("asrru", model.loadBasedConfig().scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, - model.loadBasedConfig().scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(94.09205f, model.loadBasedConfig().scalingRules().get(0).comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java deleted file mode 100644 index 880f91222f78..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersion; -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 AvailableClusterPoolVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"clusterPoolVersion\":\"hxkumasjcaacfdmm\",\"aksVersion\":\"ugmehqepvufhbze\",\"isPreview\":true},\"id\":\"oqhnlb\",\"name\":\"nbldxeaclgschori\",\"type\":\"krsrrmoucs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.availableClusterPoolVersions().listByLocation("fppdbwnu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hxkumasjcaacfdmm", response.iterator().next().properties().clusterPoolVersion()); - Assertions.assertEquals("ugmehqepvufhbze", response.iterator().next().properties().aksVersion()); - Assertions.assertEquals(true, response.iterator().next().properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java deleted file mode 100644 index e85acbb03545..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersion; -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 AvailableClusterVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"clusterType\":\"eolhbhlvbmx\",\"clusterVersion\":\"ibsxtkcud\",\"ossVersion\":\"sfar\",\"clusterPoolVersion\":\"iowl\",\"isPreview\":false,\"components\":[{\"name\":\"vwgf\",\"version\":\"mhqykizmdksa\"},{\"name\":\"fcluqvo\",\"version\":\"ycjimryvwgcwwpbm\"}]},\"id\":\"w\",\"name\":\"sydsxwefohe\",\"type\":\"bvopwndyqle\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.availableClusterVersions().listByLocation("fldpuviyfc", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("eolhbhlvbmx", response.iterator().next().properties().clusterType()); - Assertions.assertEquals("ibsxtkcud", response.iterator().next().properties().clusterVersion()); - Assertions.assertEquals("sfar", response.iterator().next().properties().ossVersion()); - Assertions.assertEquals("iowl", response.iterator().next().properties().clusterPoolVersion()); - Assertions.assertEquals(false, response.iterator().next().properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAccessProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAccessProfileTests.java deleted file mode 100644 index 077c488fc9e7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAccessProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAccessProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAccessProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAccessProfile model - = BinaryData.fromString("{\"enableInternalIngress\":true,\"privateLinkServiceId\":\"bkdmo\"}") - .toObject(ClusterAccessProfile.class); - Assertions.assertEquals(true, model.enableInternalIngress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAccessProfile model = new ClusterAccessProfile().withEnableInternalIngress(true); - model = BinaryData.fromObject(model).toObject(ClusterAccessProfile.class); - Assertions.assertEquals(true, model.enableInternalIngress()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 57eadb2e347b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAksPatchUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAksPatchUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"originalVersion\":\"wnpjhlfzswpchwa\",\"newVersion\":\"bousn\",\"utcTime\":\"epgfew\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("epgfew", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("wnpjhlfzswpchwa", model.originalVersion()); - Assertions.assertEquals("bousn", model.newVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAksPatchUpgradeHistoryProperties model - = new ClusterAksPatchUpgradeHistoryProperties().withUtcTime("epgfew") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.SUCCEED) - .withOriginalVersion("wnpjhlfzswpchwa") - .withNewVersion("bousn"); - model = BinaryData.fromObject(model).toObject(ClusterAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("epgfew", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("wnpjhlfzswpchwa", model.originalVersion()); - Assertions.assertEquals("bousn", model.newVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchVersionUpgradePropertiesTests.java deleted file mode 100644 index ecd08c9bd96b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAksPatchVersionUpgradePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; - -public final class ClusterAksPatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAksPatchVersionUpgradeProperties model = BinaryData.fromString("{\"upgradeType\":\"AKSPatchUpgrade\"}") - .toObject(ClusterAksPatchVersionUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAksPatchVersionUpgradeProperties model = new ClusterAksPatchVersionUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterAksPatchVersionUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableInPlaceUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableInPlaceUpgradePropertiesTests.java deleted file mode 100644 index 9382ee631b12..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableInPlaceUpgradePropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableInPlaceUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.Severity; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableInPlaceUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableInPlaceUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterAvailableInPlaceUpgradeProperties\",\"description\":\"z\",\"sourceOssVersion\":\"rjvpglydzgkrvqee\",\"sourceClusterVersion\":\"oepry\",\"sourceBuildNumber\":\"nwy\",\"targetOssVersion\":\"zdmovzv\",\"targetClusterVersion\":\"aawzqadfl\",\"targetBuildNumber\":\"ur\",\"componentName\":\"laecxndticok\",\"severity\":\"high\",\"extendedProperties\":\"lqtmldgxob\",\"createdTime\":\"2021-09-19T17:45:42Z\"}") - .toObject(ClusterAvailableInPlaceUpgradeProperties.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("rjvpglydzgkrvqee", model.sourceOssVersion()); - Assertions.assertEquals("oepry", model.sourceClusterVersion()); - Assertions.assertEquals("nwy", model.sourceBuildNumber()); - Assertions.assertEquals("zdmovzv", model.targetOssVersion()); - Assertions.assertEquals("aawzqadfl", model.targetClusterVersion()); - Assertions.assertEquals("ur", model.targetBuildNumber()); - Assertions.assertEquals("laecxndticok", model.componentName()); - Assertions.assertEquals(Severity.HIGH, model.severity()); - Assertions.assertEquals("lqtmldgxob", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T17:45:42Z"), model.createdTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableInPlaceUpgradeProperties model - = new ClusterAvailableInPlaceUpgradeProperties().withDescription("z") - .withSourceOssVersion("rjvpglydzgkrvqee") - .withSourceClusterVersion("oepry") - .withSourceBuildNumber("nwy") - .withTargetOssVersion("zdmovzv") - .withTargetClusterVersion("aawzqadfl") - .withTargetBuildNumber("ur") - .withComponentName("laecxndticok") - .withSeverity(Severity.HIGH) - .withExtendedProperties("lqtmldgxob") - .withCreatedTime(OffsetDateTime.parse("2021-09-19T17:45:42Z")); - model = BinaryData.fromObject(model).toObject(ClusterAvailableInPlaceUpgradeProperties.class); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("rjvpglydzgkrvqee", model.sourceOssVersion()); - Assertions.assertEquals("oepry", model.sourceClusterVersion()); - Assertions.assertEquals("nwy", model.sourceBuildNumber()); - Assertions.assertEquals("zdmovzv", model.targetOssVersion()); - Assertions.assertEquals("aawzqadfl", model.targetClusterVersion()); - Assertions.assertEquals("ur", model.targetBuildNumber()); - Assertions.assertEquals("laecxndticok", model.componentName()); - Assertions.assertEquals(Severity.HIGH, model.severity()); - Assertions.assertEquals("lqtmldgxob", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-19T17:45:42Z"), model.createdTime()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeAksPatchUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeAksPatchUpgradePropertiesTests.java deleted file mode 100644 index 7410ca871b43..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeAksPatchUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeAksPatchUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.CurrentClusterAksVersionStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradeAksPatchUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeAksPatchUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"currentVersion\":\"slevufuztc\",\"currentVersionStatus\":\"Supported\",\"latestVersion\":\"jtqedcgzulwmm\"}") - .toObject(ClusterAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("slevufuztc", model.currentVersion()); - Assertions.assertEquals(CurrentClusterAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("jtqedcgzulwmm", model.latestVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeAksPatchUpgradeProperties model - = new ClusterAvailableUpgradeAksPatchUpgradeProperties().withCurrentVersion("slevufuztc") - .withCurrentVersionStatus(CurrentClusterAksVersionStatus.SUPPORTED) - .withLatestVersion("jtqedcgzulwmm"); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("slevufuztc", model.currentVersion()); - Assertions.assertEquals(CurrentClusterAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("jtqedcgzulwmm", model.latestVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeHotfixUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeHotfixUpgradePropertiesTests.java deleted file mode 100644 index 2e506fa14a0f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeHotfixUpgradePropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeHotfixUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.Severity; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradeHotfixUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeHotfixUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgrade\",\"description\":\"lnpkciay\",\"sourceOssVersion\":\"iykhy\",\"sourceClusterVersion\":\"fvjlboxqvkjlmx\",\"sourceBuildNumber\":\"mdy\",\"targetOssVersion\":\"dwdigumb\",\"targetClusterVersion\":\"aauzzptjazysd\",\"targetBuildNumber\":\"ezwwv\",\"componentName\":\"qyuvvfonkp\",\"severity\":\"medium\",\"extendedProperties\":\"ikvylauya\",\"createdTime\":\"2021-08-12T09:12:49Z\"}") - .toObject(ClusterAvailableUpgradeHotfixUpgradeProperties.class); - Assertions.assertEquals("lnpkciay", model.description()); - Assertions.assertEquals("iykhy", model.sourceOssVersion()); - Assertions.assertEquals("fvjlboxqvkjlmx", model.sourceClusterVersion()); - Assertions.assertEquals("mdy", model.sourceBuildNumber()); - Assertions.assertEquals("dwdigumb", model.targetOssVersion()); - Assertions.assertEquals("aauzzptjazysd", model.targetClusterVersion()); - Assertions.assertEquals("ezwwv", model.targetBuildNumber()); - Assertions.assertEquals("qyuvvfonkp", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("ikvylauya", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T09:12:49Z"), model.createdTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeHotfixUpgradeProperties model - = new ClusterAvailableUpgradeHotfixUpgradeProperties().withDescription("lnpkciay") - .withSourceOssVersion("iykhy") - .withSourceClusterVersion("fvjlboxqvkjlmx") - .withSourceBuildNumber("mdy") - .withTargetOssVersion("dwdigumb") - .withTargetClusterVersion("aauzzptjazysd") - .withTargetBuildNumber("ezwwv") - .withComponentName("qyuvvfonkp") - .withSeverity(Severity.MEDIUM) - .withExtendedProperties("ikvylauya") - .withCreatedTime(OffsetDateTime.parse("2021-08-12T09:12:49Z")); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeHotfixUpgradeProperties.class); - Assertions.assertEquals("lnpkciay", model.description()); - Assertions.assertEquals("iykhy", model.sourceOssVersion()); - Assertions.assertEquals("fvjlboxqvkjlmx", model.sourceClusterVersion()); - Assertions.assertEquals("mdy", model.sourceBuildNumber()); - Assertions.assertEquals("dwdigumb", model.targetOssVersion()); - Assertions.assertEquals("aauzzptjazysd", model.targetClusterVersion()); - Assertions.assertEquals("ezwwv", model.targetBuildNumber()); - Assertions.assertEquals("qyuvvfonkp", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("ikvylauya", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-12T09:12:49Z"), model.createdTime()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeInnerTests.java deleted file mode 100644 index 817c2bfa86bf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; - -public final class ClusterAvailableUpgradeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"lqiyntorzihl\",\"name\":\"osjswsr\",\"type\":\"slyzrpzbchckqq\"}") - .toObject(ClusterAvailableUpgradeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeInner model - = new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeListTests.java deleted file mode 100644 index af3abdd45380..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradeListTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradeListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"dyh\",\"name\":\"pkkpw\",\"type\":\"reqnovvqfov\"},{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"ywsuwsy\",\"name\":\"s\",\"type\":\"dsytgadgvr\"},{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"en\",\"name\":\"qnzarrwl\",\"type\":\"uu\"},{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"qkacewii\",\"name\":\"fpubjibwwi\",\"type\":\"tohqkvpuvksgp\"}],\"nextLink\":\"aknynfsynljphuop\"}") - .toObject(ClusterAvailableUpgradeList.class); - Assertions.assertEquals("aknynfsynljphuop", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeList model = new ClusterAvailableUpgradeList() - .withValue(Arrays.asList( - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()), - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()), - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()), - new ClusterAvailableUpgradeInner().withProperties(new ClusterAvailableUpgradeProperties()))) - .withNextLink("aknynfsynljphuop"); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeList.class); - Assertions.assertEquals("aknynfsynljphuop", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePatchVersionUpgradePropertiesTests.java deleted file mode 100644 index 3039ba221929..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePatchVersionUpgradePropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradePatchVersionUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.Severity; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ClusterAvailableUpgradePatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradePatchVersionUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgrade\",\"description\":\"mncsttijfybvp\",\"sourceOssVersion\":\"krsgsgb\",\"sourceClusterVersion\":\"uzqgnjdgkynsc\",\"sourceBuildNumber\":\"qhzvhxnkomt\",\"targetOssVersion\":\"bo\",\"targetClusterVersion\":\"pnvdxz\",\"targetBuildNumber\":\"ihfrbbcevqa\",\"componentName\":\"ltd\",\"severity\":\"medium\",\"extendedProperties\":\"qojpy\",\"createdTime\":\"2021-02-26T15:30:37Z\"}") - .toObject(ClusterAvailableUpgradePatchVersionUpgradeProperties.class); - Assertions.assertEquals("mncsttijfybvp", model.description()); - Assertions.assertEquals("krsgsgb", model.sourceOssVersion()); - Assertions.assertEquals("uzqgnjdgkynsc", model.sourceClusterVersion()); - Assertions.assertEquals("qhzvhxnkomt", model.sourceBuildNumber()); - Assertions.assertEquals("bo", model.targetOssVersion()); - Assertions.assertEquals("pnvdxz", model.targetClusterVersion()); - Assertions.assertEquals("ihfrbbcevqa", model.targetBuildNumber()); - Assertions.assertEquals("ltd", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("qojpy", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-26T15:30:37Z"), model.createdTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradePatchVersionUpgradeProperties model - = new ClusterAvailableUpgradePatchVersionUpgradeProperties().withDescription("mncsttijfybvp") - .withSourceOssVersion("krsgsgb") - .withSourceClusterVersion("uzqgnjdgkynsc") - .withSourceBuildNumber("qhzvhxnkomt") - .withTargetOssVersion("bo") - .withTargetClusterVersion("pnvdxz") - .withTargetBuildNumber("ihfrbbcevqa") - .withComponentName("ltd") - .withSeverity(Severity.MEDIUM) - .withExtendedProperties("qojpy") - .withCreatedTime(OffsetDateTime.parse("2021-02-26T15:30:37Z")); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradePatchVersionUpgradeProperties.class); - Assertions.assertEquals("mncsttijfybvp", model.description()); - Assertions.assertEquals("krsgsgb", model.sourceOssVersion()); - Assertions.assertEquals("uzqgnjdgkynsc", model.sourceClusterVersion()); - Assertions.assertEquals("qhzvhxnkomt", model.sourceBuildNumber()); - Assertions.assertEquals("bo", model.targetOssVersion()); - Assertions.assertEquals("pnvdxz", model.targetClusterVersion()); - Assertions.assertEquals("ihfrbbcevqa", model.targetBuildNumber()); - Assertions.assertEquals("ltd", model.componentName()); - Assertions.assertEquals(Severity.MEDIUM, model.severity()); - Assertions.assertEquals("qojpy", model.extendedProperties()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-26T15:30:37Z"), model.createdTime()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePropertiesTests.java deleted file mode 100644 index 2ee156a7e2e1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; - -public final class ClusterAvailableUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterAvailableUpgradeProperties model - = BinaryData.fromString("{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"}") - .toObject(ClusterAvailableUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterAvailableUpgradeProperties model = new ClusterAvailableUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterAvailableUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListMockTests.java deleted file mode 100644 index 2d8b8b746462..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrade; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterAvailableUpgradesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterAvailableUpgradeProperties\"},\"id\":\"dbhfhp\",\"name\":\"paz\",\"type\":\"zoyw\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterAvailableUpgrades().list("zjcpeogk", "nmg", "ro", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java deleted file mode 100644 index bdd7c30b2088..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterComponentsItem; -import org.junit.jupiter.api.Assertions; - -public final class ClusterComponentsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterComponentsItem model = BinaryData.fromString("{\"name\":\"ispnqzahmgkbrp\",\"version\":\"dhibnuq\"}") - .toObject(ClusterComponentsItem.class); - Assertions.assertEquals("ispnqzahmgkbrp", model.name()); - Assertions.assertEquals("dhibnuq", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterComponentsItem model = new ClusterComponentsItem().withName("ispnqzahmgkbrp").withVersion("dhibnuq"); - model = BinaryData.fromObject(model).toObject(ClusterComponentsItem.class); - Assertions.assertEquals("ispnqzahmgkbrp", model.name()); - Assertions.assertEquals("dhibnuq", model.version()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java deleted file mode 100644 index ead287a6c7d1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterConfigFileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterConfigFile model = BinaryData.fromString( - "{\"fileName\":\"ttouwaboekqvkel\",\"content\":\"mvb\",\"encoding\":\"None\",\"path\":\"sflhhca\",\"values\":{\"yjpkiidzyexz\":\"jixisxyawjoyaqcs\"}}") - .toObject(ClusterConfigFile.class); - Assertions.assertEquals("ttouwaboekqvkel", model.fileName()); - Assertions.assertEquals("mvb", model.content()); - Assertions.assertEquals(ContentEncoding.NONE, model.encoding()); - Assertions.assertEquals("sflhhca", model.path()); - Assertions.assertEquals("jixisxyawjoyaqcs", model.values().get("yjpkiidzyexz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterConfigFile model = new ClusterConfigFile().withFileName("ttouwaboekqvkel") - .withContent("mvb") - .withEncoding(ContentEncoding.NONE) - .withPath("sflhhca") - .withValues(mapOf("yjpkiidzyexz", "jixisxyawjoyaqcs")); - model = BinaryData.fromObject(model).toObject(ClusterConfigFile.class); - Assertions.assertEquals("ttouwaboekqvkel", model.fileName()); - Assertions.assertEquals("mvb", model.content()); - Assertions.assertEquals(ContentEncoding.NONE, model.encoding()); - Assertions.assertEquals("sflhhca", model.path()); - Assertions.assertEquals("jixisxyawjoyaqcs", model.values().get("yjpkiidzyexz")); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeHistoryPropertiesTests.java deleted file mode 100644 index a0c59587749e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterHotfixUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterHotfixUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgrade\",\"sourceClusterVersion\":\"lhzdsqtzb\",\"sourceOssVersion\":\"gnowcjhfgmveca\",\"sourceBuildNumber\":\"xmwoteyowcluqo\",\"targetClusterVersion\":\"kqvgqouw\",\"targetOssVersion\":\"zmpjwyiv\",\"targetBuildNumber\":\"kfxcvhrfs\",\"componentName\":\"uagrttikteusqc\",\"severity\":\"medium\",\"utcTime\":\"yklxubyjaffmmfbl\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterHotfixUpgradeHistoryProperties.class); - Assertions.assertEquals("yklxubyjaffmmfbl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("lhzdsqtzb", model.sourceClusterVersion()); - Assertions.assertEquals("gnowcjhfgmveca", model.sourceOssVersion()); - Assertions.assertEquals("xmwoteyowcluqo", model.sourceBuildNumber()); - Assertions.assertEquals("kqvgqouw", model.targetClusterVersion()); - Assertions.assertEquals("zmpjwyiv", model.targetOssVersion()); - Assertions.assertEquals("kfxcvhrfs", model.targetBuildNumber()); - Assertions.assertEquals("uagrttikteusqc", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.MEDIUM, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterHotfixUpgradeHistoryProperties model - = new ClusterHotfixUpgradeHistoryProperties().withUtcTime("yklxubyjaffmmfbl") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("lhzdsqtzb") - .withSourceOssVersion("gnowcjhfgmveca") - .withSourceBuildNumber("xmwoteyowcluqo") - .withTargetClusterVersion("kqvgqouw") - .withTargetOssVersion("zmpjwyiv") - .withTargetBuildNumber("kfxcvhrfs") - .withComponentName("uagrttikteusqc") - .withSeverity(ClusterUpgradeHistorySeverityType.MEDIUM); - model = BinaryData.fromObject(model).toObject(ClusterHotfixUpgradeHistoryProperties.class); - Assertions.assertEquals("yklxubyjaffmmfbl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("lhzdsqtzb", model.sourceClusterVersion()); - Assertions.assertEquals("gnowcjhfgmveca", model.sourceOssVersion()); - Assertions.assertEquals("xmwoteyowcluqo", model.sourceBuildNumber()); - Assertions.assertEquals("kqvgqouw", model.targetClusterVersion()); - Assertions.assertEquals("zmpjwyiv", model.targetOssVersion()); - Assertions.assertEquals("kfxcvhrfs", model.targetBuildNumber()); - Assertions.assertEquals("uagrttikteusqc", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.MEDIUM, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradePropertiesTests.java deleted file mode 100644 index 6ff6c52de13a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterHotfixUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterHotfixUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgrade\",\"targetOssVersion\":\"ydvfvfcjnae\",\"targetClusterVersion\":\"srvhmgorffuki\",\"targetBuildNumber\":\"vwmzhwplefaxvxil\",\"componentName\":\"tg\"}") - .toObject(ClusterHotfixUpgradeProperties.class); - Assertions.assertEquals("ydvfvfcjnae", model.targetOssVersion()); - Assertions.assertEquals("srvhmgorffuki", model.targetClusterVersion()); - Assertions.assertEquals("vwmzhwplefaxvxil", model.targetBuildNumber()); - Assertions.assertEquals("tg", model.componentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterHotfixUpgradeProperties model = new ClusterHotfixUpgradeProperties().withTargetOssVersion("ydvfvfcjnae") - .withTargetClusterVersion("srvhmgorffuki") - .withTargetBuildNumber("vwmzhwplefaxvxil") - .withComponentName("tg"); - model = BinaryData.fromObject(model).toObject(ClusterHotfixUpgradeProperties.class); - Assertions.assertEquals("ydvfvfcjnae", model.targetOssVersion()); - Assertions.assertEquals("srvhmgorffuki", model.targetClusterVersion()); - Assertions.assertEquals("vwmzhwplefaxvxil", model.targetBuildNumber()); - Assertions.assertEquals("tg", model.componentName()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeRollbackHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeRollbackHistoryPropertiesTests.java deleted file mode 100644 index ebb8a61077ac..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterHotfixUpgradeRollbackHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeRollbackHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterHotfixUpgradeRollbackHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterHotfixUpgradeRollbackHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"HotfixUpgradeRollback\",\"sourceClusterVersion\":\"u\",\"sourceOssVersion\":\"gqibrtalmetttw\",\"sourceBuildNumber\":\"slqxi\",\"targetClusterVersion\":\"rmooizqse\",\"targetOssVersion\":\"xiutcx\",\"targetBuildNumber\":\"zhyrpeto\",\"componentName\":\"bjoxs\",\"severity\":\"low\",\"utcTime\":\"nhl\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterHotfixUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("nhl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("u", model.sourceClusterVersion()); - Assertions.assertEquals("gqibrtalmetttw", model.sourceOssVersion()); - Assertions.assertEquals("slqxi", model.sourceBuildNumber()); - Assertions.assertEquals("rmooizqse", model.targetClusterVersion()); - Assertions.assertEquals("xiutcx", model.targetOssVersion()); - Assertions.assertEquals("zhyrpeto", model.targetBuildNumber()); - Assertions.assertEquals("bjoxs", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterHotfixUpgradeRollbackHistoryProperties model - = new ClusterHotfixUpgradeRollbackHistoryProperties().withUtcTime("nhl") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("u") - .withSourceOssVersion("gqibrtalmetttw") - .withSourceBuildNumber("slqxi") - .withTargetClusterVersion("rmooizqse") - .withTargetOssVersion("xiutcx") - .withTargetBuildNumber("zhyrpeto") - .withComponentName("bjoxs") - .withSeverity(ClusterUpgradeHistorySeverityType.LOW); - model = BinaryData.fromObject(model).toObject(ClusterHotfixUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("nhl", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("u", model.sourceClusterVersion()); - Assertions.assertEquals("gqibrtalmetttw", model.sourceOssVersion()); - Assertions.assertEquals("slqxi", model.sourceBuildNumber()); - Assertions.assertEquals("rmooizqse", model.targetClusterVersion()); - Assertions.assertEquals("xiutcx", model.targetOssVersion()); - Assertions.assertEquals("zhyrpeto", model.targetBuildNumber()); - Assertions.assertEquals("bjoxs", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 59f8f423c503..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInPlaceUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInPlaceUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInPlaceUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterInPlaceUpgradeHistoryProperties\",\"sourceClusterVersion\":\"ydwqfbylyrf\",\"sourceOssVersion\":\"agt\",\"sourceBuildNumber\":\"jocqwogfnzjvusf\",\"targetClusterVersion\":\"dmozu\",\"targetOssVersion\":\"lfsbtkadpysow\",\"targetBuildNumber\":\"tgkbugrjqctojc\",\"componentName\":\"sofieypefojyqd\",\"severity\":\"low\",\"utcTime\":\"plcplcwkhi\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterInPlaceUpgradeHistoryProperties.class); - Assertions.assertEquals("plcplcwkhi", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("ydwqfbylyrf", model.sourceClusterVersion()); - Assertions.assertEquals("agt", model.sourceOssVersion()); - Assertions.assertEquals("jocqwogfnzjvusf", model.sourceBuildNumber()); - Assertions.assertEquals("dmozu", model.targetClusterVersion()); - Assertions.assertEquals("lfsbtkadpysow", model.targetOssVersion()); - Assertions.assertEquals("tgkbugrjqctojc", model.targetBuildNumber()); - Assertions.assertEquals("sofieypefojyqd", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInPlaceUpgradeHistoryProperties model - = new ClusterInPlaceUpgradeHistoryProperties().withUtcTime("plcplcwkhi") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("ydwqfbylyrf") - .withSourceOssVersion("agt") - .withSourceBuildNumber("jocqwogfnzjvusf") - .withTargetClusterVersion("dmozu") - .withTargetOssVersion("lfsbtkadpysow") - .withTargetBuildNumber("tgkbugrjqctojc") - .withComponentName("sofieypefojyqd") - .withSeverity(ClusterUpgradeHistorySeverityType.LOW); - model = BinaryData.fromObject(model).toObject(ClusterInPlaceUpgradeHistoryProperties.class); - Assertions.assertEquals("plcplcwkhi", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("ydwqfbylyrf", model.sourceClusterVersion()); - Assertions.assertEquals("agt", model.sourceOssVersion()); - Assertions.assertEquals("jocqwogfnzjvusf", model.sourceBuildNumber()); - Assertions.assertEquals("dmozu", model.targetClusterVersion()); - Assertions.assertEquals("lfsbtkadpysow", model.targetOssVersion()); - Assertions.assertEquals("tgkbugrjqctojc", model.targetBuildNumber()); - Assertions.assertEquals("sofieypefojyqd", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.LOW, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradePropertiesTests.java deleted file mode 100644 index be393a0449fd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInPlaceUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInPlaceUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInPlaceUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInPlaceUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterInPlaceUpgradeProperties\",\"targetOssVersion\":\"unzo\",\"targetClusterVersion\":\"dhcxgkmoy\",\"targetBuildNumber\":\"dyuib\",\"componentName\":\"fdn\"}") - .toObject(ClusterInPlaceUpgradeProperties.class); - Assertions.assertEquals("unzo", model.targetOssVersion()); - Assertions.assertEquals("dhcxgkmoy", model.targetClusterVersion()); - Assertions.assertEquals("dyuib", model.targetBuildNumber()); - Assertions.assertEquals("fdn", model.componentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInPlaceUpgradeProperties model = new ClusterInPlaceUpgradeProperties().withTargetOssVersion("unzo") - .withTargetClusterVersion("dhcxgkmoy") - .withTargetBuildNumber("dyuib") - .withComponentName("fdn"); - model = BinaryData.fromObject(model).toObject(ClusterInPlaceUpgradeProperties.class); - Assertions.assertEquals("unzo", model.targetOssVersion()); - Assertions.assertEquals("dhcxgkmoy", model.targetClusterVersion()); - Assertions.assertEquals("dyuib", model.targetBuildNumber()); - Assertions.assertEquals("fdn", model.componentName()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java deleted file mode 100644 index b88253197528..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewPropertiesStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewPropertiesStatus model - = BinaryData.fromString("{\"ready\":\"thrrgh\",\"reason\":\"bdhqxvcxgf\",\"message\":\"dsofbshrns\"}") - .toObject(ClusterInstanceViewPropertiesStatus.class); - Assertions.assertEquals("thrrgh", model.ready()); - Assertions.assertEquals("bdhqxvcxgf", model.reason()); - Assertions.assertEquals("dsofbshrns", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewPropertiesStatus model = new ClusterInstanceViewPropertiesStatus().withReady("thrrgh") - .withReason("bdhqxvcxgf") - .withMessage("dsofbshrns"); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewPropertiesStatus.class); - Assertions.assertEquals("thrrgh", model.ready()); - Assertions.assertEquals("bdhqxvcxgf", model.reason()); - Assertions.assertEquals("dsofbshrns", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java deleted file mode 100644 index 3b3b3c594920..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewProperties model = BinaryData.fromString( - "{\"status\":{\"ready\":\"pij\",\"reason\":\"rxfrddhc\",\"message\":\"tizzronasxif\"},\"serviceStatuses\":[{\"kind\":\"zq\",\"ready\":\"zh\",\"message\":\"wesgogczh\"},{\"kind\":\"nnxk\",\"ready\":\"lgnyhmo\",\"message\":\"xkk\"}]}") - .toObject(ClusterInstanceViewProperties.class); - Assertions.assertEquals("pij", model.status().ready()); - Assertions.assertEquals("rxfrddhc", model.status().reason()); - Assertions.assertEquals("tizzronasxif", model.status().message()); - Assertions.assertEquals("zq", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("zh", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("wesgogczh", model.serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewProperties model = new ClusterInstanceViewProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("pij") - .withReason("rxfrddhc") - .withMessage("tizzronasxif")) - .withServiceStatuses( - Arrays.asList(new ServiceStatus().withKind("zq").withReady("zh").withMessage("wesgogczh"), - new ServiceStatus().withKind("nnxk").withReady("lgnyhmo").withMessage("xkk"))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewProperties.class); - Assertions.assertEquals("pij", model.status().ready()); - Assertions.assertEquals("rxfrddhc", model.status().reason()); - Assertions.assertEquals("tizzronasxif", model.status().message()); - Assertions.assertEquals("zq", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("zh", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("wesgogczh", model.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java deleted file mode 100644 index 6b4eb2d005db..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewResultInner model = BinaryData.fromString( - "{\"name\":\"gzxnfaazpxdtnk\",\"properties\":{\"status\":{\"ready\":\"mkqjj\",\"reason\":\"uenvrkp\",\"message\":\"uaibrebqaaysj\"},\"serviceStatuses\":[{\"kind\":\"xqtnq\",\"ready\":\"tezlwff\",\"message\":\"akpjpqqmtedlt\"},{\"kind\":\"mjihyeozphv\",\"ready\":\"auyqncygupkv\",\"message\":\"mdscwxqupev\"}]}}") - .toObject(ClusterInstanceViewResultInner.class); - Assertions.assertEquals("gzxnfaazpxdtnk", model.name()); - Assertions.assertEquals("mkqjj", model.properties().status().ready()); - Assertions.assertEquals("uenvrkp", model.properties().status().reason()); - Assertions.assertEquals("uaibrebqaaysj", model.properties().status().message()); - Assertions.assertEquals("xqtnq", model.properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("tezlwff", model.properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("akpjpqqmtedlt", model.properties().serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewResultInner model = new ClusterInstanceViewResultInner().withName("gzxnfaazpxdtnk") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("mkqjj") - .withReason("uenvrkp") - .withMessage("uaibrebqaaysj")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("xqtnq").withReady("tezlwff").withMessage("akpjpqqmtedlt"), - new ServiceStatus().withKind("mjihyeozphv").withReady("auyqncygupkv").withMessage("mdscwxqupev")))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewResultInner.class); - Assertions.assertEquals("gzxnfaazpxdtnk", model.name()); - Assertions.assertEquals("mkqjj", model.properties().status().ready()); - Assertions.assertEquals("uenvrkp", model.properties().status().reason()); - Assertions.assertEquals("uaibrebqaaysj", model.properties().status().message()); - Assertions.assertEquals("xqtnq", model.properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("tezlwff", model.properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("akpjpqqmtedlt", model.properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java deleted file mode 100644 index 5ec55211f307..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewResultPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewResultProperties model = BinaryData.fromString( - "{\"status\":{\"ready\":\"hfstotxhojujbyp\",\"reason\":\"mc\",\"message\":\"hixbjxyfwnyl\"},\"serviceStatuses\":[{\"kind\":\"ool\",\"ready\":\"ttpkiwkkbnujrywv\",\"message\":\"lbfpncurd\"},{\"kind\":\"iwii\",\"ready\":\"htywubxcbihwq\",\"message\":\"fdntwjchrdgoih\"},{\"kind\":\"umwctondz\",\"ready\":\"luudfdlwggytsb\",\"message\":\"ovvtgseinqfiu\"},{\"kind\":\"x\",\"ready\":\"knpirgnepttwq\",\"message\":\"niffcdmqnroj\"}]}") - .toObject(ClusterInstanceViewResultProperties.class); - Assertions.assertEquals("hfstotxhojujbyp", model.status().ready()); - Assertions.assertEquals("mc", model.status().reason()); - Assertions.assertEquals("hixbjxyfwnyl", model.status().message()); - Assertions.assertEquals("ool", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("ttpkiwkkbnujrywv", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("lbfpncurd", model.serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewResultProperties model = new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("hfstotxhojujbyp") - .withReason("mc") - .withMessage("hixbjxyfwnyl")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("ool").withReady("ttpkiwkkbnujrywv").withMessage("lbfpncurd"), - new ServiceStatus().withKind("iwii").withReady("htywubxcbihwq").withMessage("fdntwjchrdgoih"), - new ServiceStatus().withKind("umwctondz").withReady("luudfdlwggytsb").withMessage("ovvtgseinqfiu"), - new ServiceStatus().withKind("x").withReady("knpirgnepttwq").withMessage("niffcdmqnroj"))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewResultProperties.class); - Assertions.assertEquals("hfstotxhojujbyp", model.status().ready()); - Assertions.assertEquals("mc", model.status().reason()); - Assertions.assertEquals("hixbjxyfwnyl", model.status().message()); - Assertions.assertEquals("ool", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("ttpkiwkkbnujrywv", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("lbfpncurd", model.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java deleted file mode 100644 index be3ed61ecdc2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewStatus model - = BinaryData.fromString("{\"ready\":\"buswdvzyy\",\"reason\":\"cnunvjsr\",\"message\":\"f\"}") - .toObject(ClusterInstanceViewStatus.class); - Assertions.assertEquals("buswdvzyy", model.ready()); - Assertions.assertEquals("cnunvjsr", model.reason()); - Assertions.assertEquals("f", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewStatus model - = new ClusterInstanceViewStatus().withReady("buswdvzyy").withReason("cnunvjsr").withMessage("f"); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewStatus.class); - Assertions.assertEquals("buswdvzyy", model.ready()); - Assertions.assertEquals("cnunvjsr", model.reason()); - Assertions.assertEquals("f", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java deleted file mode 100644 index a3f5153e0357..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewsResult; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewsResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewsResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"rmuhapfcq\",\"properties\":{\"status\":{\"ready\":\"psqxq\",\"reason\":\"svuo\",\"message\":\"gc\"},\"serviceStatuses\":[{\"kind\":\"lvez\",\"ready\":\"ypql\",\"message\":\"eokerqwkyhkobopg\"},{\"kind\":\"edkowepbqpcrfk\",\"ready\":\"wccsnjvcdwxlpqek\",\"message\":\"nkhtjsyingw\"},{\"kind\":\"qatmtdhtmdvy\",\"ready\":\"gikdgsz\",\"message\":\"kbir\"}]}},{\"name\":\"yuzhlhkjoqrvq\",\"properties\":{\"status\":{\"ready\":\"aatjinrvgoupmfi\",\"reason\":\"fggjioolvr\",\"message\":\"kvtkkg\"},\"serviceStatuses\":[{\"kind\":\"qwjygvja\",\"ready\":\"vblm\",\"message\":\"k\"},{\"kind\":\"uhbxvvy\",\"ready\":\"gsopbyrqufegxu\",\"message\":\"zfbn\"},{\"kind\":\"lmctlpd\",\"ready\":\"gitvg\",\"message\":\"hrixkwmy\"},{\"kind\":\"jejveg\",\"ready\":\"hbpnaixexccbd\",\"message\":\"ax\"}]}},{\"name\":\"cexdrrvqa\",\"properties\":{\"status\":{\"ready\":\"qkghtpwijnhy\",\"reason\":\"vfycxzb\",\"message\":\"oowvrv\"},\"serviceStatuses\":[{\"kind\":\"gjqppy\",\"ready\":\"s\",\"message\":\"on\"}]}},{\"name\":\"myhgfipnsxkmc\",\"properties\":{\"status\":{\"ready\":\"a\",\"reason\":\"rrjreafxtsgu\",\"message\":\"jglikkxwslolb\"},\"serviceStatuses\":[{\"kind\":\"vuzlm\",\"ready\":\"felfktg\",\"message\":\"crpw\"},{\"kind\":\"xeznoi\",\"ready\":\"brnjwmw\",\"message\":\"nbsazejjoqkag\"}]}}],\"nextLink\":\"sxtta\"}") - .toObject(ClusterInstanceViewsResult.class); - Assertions.assertEquals("rmuhapfcq", model.value().get(0).name()); - Assertions.assertEquals("psqxq", model.value().get(0).properties().status().ready()); - Assertions.assertEquals("svuo", model.value().get(0).properties().status().reason()); - Assertions.assertEquals("gc", model.value().get(0).properties().status().message()); - Assertions.assertEquals("lvez", model.value().get(0).properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("ypql", model.value().get(0).properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("eokerqwkyhkobopg", - model.value().get(0).properties().serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewsResult model = new ClusterInstanceViewsResult().withValue(Arrays.asList( - new ClusterInstanceViewResultInner().withName("rmuhapfcq") - .withProperties(new ClusterInstanceViewResultProperties().withStatus( - new ClusterInstanceViewPropertiesStatus().withReady("psqxq").withReason("svuo").withMessage("gc")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("lvez").withReady("ypql").withMessage("eokerqwkyhkobopg"), - new ServiceStatus().withKind("edkowepbqpcrfk") - .withReady("wccsnjvcdwxlpqek") - .withMessage("nkhtjsyingw"), - new ServiceStatus().withKind("qatmtdhtmdvy").withReady("gikdgsz").withMessage("kbir")))), - new ClusterInstanceViewResultInner().withName("yuzhlhkjoqrvq") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("aatjinrvgoupmfi") - .withReason("fggjioolvr") - .withMessage("kvtkkg")) - .withServiceStatuses( - Arrays.asList(new ServiceStatus().withKind("qwjygvja").withReady("vblm").withMessage("k"), - new ServiceStatus().withKind("uhbxvvy").withReady("gsopbyrqufegxu").withMessage("zfbn"), - new ServiceStatus().withKind("lmctlpd").withReady("gitvg").withMessage("hrixkwmy"), - new ServiceStatus().withKind("jejveg").withReady("hbpnaixexccbd").withMessage("ax")))), - new ClusterInstanceViewResultInner().withName("cexdrrvqa") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("qkghtpwijnhy") - .withReason("vfycxzb") - .withMessage("oowvrv")) - .withServiceStatuses( - Arrays.asList(new ServiceStatus().withKind("gjqppy").withReady("s").withMessage("on")))), - new ClusterInstanceViewResultInner().withName("myhgfipnsxkmc") - .withProperties(new ClusterInstanceViewResultProperties() - .withStatus(new ClusterInstanceViewPropertiesStatus().withReady("a") - .withReason("rrjreafxtsgu") - .withMessage("jglikkxwslolb")) - .withServiceStatuses(Arrays.asList( - new ServiceStatus().withKind("vuzlm").withReady("felfktg").withMessage("crpw"), - new ServiceStatus().withKind("xeznoi").withReady("brnjwmw").withMessage("nbsazejjoqkag")))))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewsResult.class); - Assertions.assertEquals("rmuhapfcq", model.value().get(0).name()); - Assertions.assertEquals("psqxq", model.value().get(0).properties().status().ready()); - Assertions.assertEquals("svuo", model.value().get(0).properties().status().reason()); - Assertions.assertEquals("gc", model.value().get(0).properties().status().message()); - Assertions.assertEquals("lvez", model.value().get(0).properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("ypql", model.value().get(0).properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("eokerqwkyhkobopg", - model.value().get(0).properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java deleted file mode 100644 index 0d34cf65674e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; - -public final class ClusterJobInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobInner model = BinaryData.fromString( - "{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"wib\",\"name\":\"rcdlbhshfwpr\",\"type\":\"cstwity\"}") - .toObject(ClusterJobInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobInner model = new ClusterJobInner().withProperties(new ClusterJobProperties()); - model = BinaryData.fromObject(model).toObject(ClusterJobInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java deleted file mode 100644 index 242b1c46573d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterJobListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"vxccedcp\",\"name\":\"md\",\"type\":\"odn\"},{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"xltjcvnhltiu\",\"name\":\"cxnavv\",\"type\":\"xqi\"}],\"nextLink\":\"qunyowxwlmdjr\"}") - .toObject(ClusterJobList.class); - Assertions.assertEquals("qunyowxwlmdjr", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobList model = new ClusterJobList() - .withValue(Arrays.asList(new ClusterJobInner().withProperties(new ClusterJobProperties()), - new ClusterJobInner().withProperties(new ClusterJobProperties()))) - .withNextLink("qunyowxwlmdjr"); - model = BinaryData.fromObject(model).toObject(ClusterJobList.class); - Assertions.assertEquals("qunyowxwlmdjr", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java deleted file mode 100644 index 99b4b80a34c6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; - -public final class ClusterJobPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobProperties model - = BinaryData.fromString("{\"jobType\":\"ClusterJobProperties\"}").toObject(ClusterJobProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobProperties model = new ClusterJobProperties(); - model = BinaryData.fromObject(model).toObject(ClusterJobProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java deleted file mode 100644 index 8e0b9737617e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterJobsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"rrouuxvnsasbcry\",\"name\":\"o\",\"type\":\"izrxklob\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterJobs() - .list("zna", "xbannovvoxc", "ytprwnwvroev", "tlyo", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java deleted file mode 100644 index 90601d3c46c8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterJobsRunJobMockTests { - @Test - public void testRunJob() throws Exception { - String responseStr - = "{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"dtvqe\",\"name\":\"rqctmxxdtdd\",\"type\":\"flhuytxzv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterJob response = manager.clusterJobs() - .runJob("lcqxypokk", "minqcym", "zng", new ClusterJobInner().withProperties(new ClusterJobProperties()), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListMockTests.java deleted file mode 100644 index 5accf317ccf0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibrariesListMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.Category; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibrary; -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 ClusterLibrariesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"yych\",\"timestamp\":\"2021-07-13T04:48:49Z\",\"status\":\"UNINSTALLING\",\"message\":\"jrtwsz\"},\"id\":\"vuicp\",\"name\":\"vtrrmhwrbfdpyflu\",\"type\":\"hvj\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterLibraries() - .list("llklmtk", "lowkxxpvb", "dfjmzsyzfhotlh", Category.CUSTOM, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yych", response.iterator().next().properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryInnerTests.java deleted file mode 100644 index 6e7cf3f3a10d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryInner model = BinaryData.fromString( - "{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"wlvwlyoupf\",\"timestamp\":\"2021-07-15T15:51:01Z\",\"status\":\"INSTALLING\",\"message\":\"bdyhgkfminsgowz\"},\"id\":\"tsttktlahbq\",\"name\":\"ctxtgzukxi\",\"type\":\"mmqtgqqqxhr\"}") - .toObject(ClusterLibraryInner.class); - Assertions.assertEquals("wlvwlyoupf", model.properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryInner model - = new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("wlvwlyoupf")); - model = BinaryData.fromObject(model).toObject(ClusterLibraryInner.class); - Assertions.assertEquals("wlvwlyoupf", model.properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryListTests.java deleted file mode 100644 index 62abc8a59fe6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryListTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"crxgibb\",\"timestamp\":\"2020-12-25T20:16:58Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"fozauorsuk\"},\"id\":\"wbqpl\",\"name\":\"lvnuuepzlrph\",\"type\":\"zsoldwey\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"dunvmnnrwrbiorkt\",\"timestamp\":\"2021-08-10T02:45:15Z\",\"status\":\"INSTALLED\",\"message\":\"hgdnhxmsivfo\"},\"id\":\"loxggdufiqn\",\"name\":\"ieuzaofjchvcyyy\",\"type\":\"fgdo\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"ubiipuipwoqonma\",\"timestamp\":\"2021-10-21T10:35:29Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"zshq\"},\"id\":\"impevf\",\"name\":\"mblrrilbywd\",\"type\":\"smiccwrwfscj\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"ynszquji\",\"timestamp\":\"2021-01-17T07:53:09Z\",\"status\":\"INSTALLED\",\"message\":\"tiby\"},\"id\":\"bblgyavut\",\"name\":\"thjoxoism\",\"type\":\"ksbpimlqoljx\"}],\"nextLink\":\"gxxlxsffgcvizq\"}") - .toObject(ClusterLibraryList.class); - Assertions.assertEquals("crxgibb", model.value().get(0).properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryList model = new ClusterLibraryList().withValue(Arrays.asList( - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("crxgibb")), - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("dunvmnnrwrbiorkt")), - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("ubiipuipwoqonma")), - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("ynszquji")))); - model = BinaryData.fromObject(model).toObject(ClusterLibraryList.class); - Assertions.assertEquals("crxgibb", model.value().get(0).properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationPropertiesTests.java deleted file mode 100644 index 4016808c2420..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperationProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.LibraryManagementAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryManagementOperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryManagementOperationProperties model = BinaryData.fromString( - "{\"action\":\"Uninstall\",\"libraries\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"iogsjkmnwq\",\"timestamp\":\"2021-09-21T11:57:43Z\",\"status\":\"UNINSTALLING\",\"message\":\"yhddvia\"},\"id\":\"gfnmntfpmvmemfnc\",\"name\":\"dwvvba\",\"type\":\"xlllchp\"}]}") - .toObject(ClusterLibraryManagementOperationProperties.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.action()); - Assertions.assertEquals("iogsjkmnwq", model.libraries().get(0).properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryManagementOperationProperties model = new ClusterLibraryManagementOperationProperties() - .withAction(LibraryManagementAction.UNINSTALL) - .withLibraries(Arrays.asList( - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("iogsjkmnwq")))); - model = BinaryData.fromObject(model).toObject(ClusterLibraryManagementOperationProperties.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.action()); - Assertions.assertEquals("iogsjkmnwq", model.libraries().get(0).properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationTests.java deleted file mode 100644 index 27892e5af577..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryManagementOperationTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperationProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.LibraryManagementAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryManagementOperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryManagementOperation model = BinaryData.fromString( - "{\"properties\":{\"action\":\"Uninstall\",\"libraries\":[{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"wxyiopidkqq\",\"timestamp\":\"2021-05-28T06:42:38Z\",\"status\":\"INSTALLING\",\"message\":\"xkdmligo\"},\"id\":\"brxk\",\"name\":\"mloazuru\",\"type\":\"cbgoor\"},{\"properties\":{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"eoybfhjxakvvjgs\",\"timestamp\":\"2021-07-21T11:06:32Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"mywwtkgkxnyed\"},\"id\":\"gyvudtjuewbc\",\"name\":\"hxuuwhcjyxccybvp\",\"type\":\"yakk\"}]},\"id\":\"zp\",\"name\":\"gwjplmag\",\"type\":\"tcyohpfkyrk\"}") - .toObject(ClusterLibraryManagementOperation.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.properties().action()); - Assertions.assertEquals("wxyiopidkqq", model.properties().libraries().get(0).properties().remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryManagementOperation model = new ClusterLibraryManagementOperation().withProperties( - new ClusterLibraryManagementOperationProperties().withAction(LibraryManagementAction.UNINSTALL) - .withLibraries(Arrays.asList( - new ClusterLibraryInner().withProperties(new ClusterLibraryProperties().withRemarks("wxyiopidkqq")), - new ClusterLibraryInner() - .withProperties(new ClusterLibraryProperties().withRemarks("eoybfhjxakvvjgs"))))); - model = BinaryData.fromObject(model).toObject(ClusterLibraryManagementOperation.class); - Assertions.assertEquals(LibraryManagementAction.UNINSTALL, model.properties().action()); - Assertions.assertEquals("wxyiopidkqq", model.properties().libraries().get(0).properties().remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryPropertiesTests.java deleted file mode 100644 index 5b825e99a3f3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLibraryPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLibraryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLibraryProperties model = BinaryData.fromString( - "{\"type\":\"ClusterLibraryProperties\",\"remarks\":\"rxcpjuisavo\",\"timestamp\":\"2021-01-28T07:43:14Z\",\"status\":\"UNINSTALLING\",\"message\":\"azivjlfrqttbajl\"}") - .toObject(ClusterLibraryProperties.class); - Assertions.assertEquals("rxcpjuisavo", model.remarks()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLibraryProperties model = new ClusterLibraryProperties().withRemarks("rxcpjuisavo"); - model = BinaryData.fromObject(model).toObject(ClusterLibraryProperties.class); - Assertions.assertEquals("rxcpjuisavo", model.remarks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java deleted file mode 100644 index 5c8fc22c03cc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLogAnalyticsApplicationLogsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLogAnalyticsApplicationLogs model - = BinaryData.fromString("{\"stdOutEnabled\":true,\"stdErrorEnabled\":true}") - .toObject(ClusterLogAnalyticsApplicationLogs.class); - Assertions.assertEquals(true, model.stdOutEnabled()); - Assertions.assertEquals(true, model.stdErrorEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLogAnalyticsApplicationLogs model - = new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true).withStdErrorEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterLogAnalyticsApplicationLogs.class); - Assertions.assertEquals(true, model.stdOutEnabled()); - Assertions.assertEquals(true, model.stdErrorEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java deleted file mode 100644 index f2367d859508..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLogAnalyticsProfile model = BinaryData.fromString( - "{\"enabled\":true,\"applicationLogs\":{\"stdOutEnabled\":true,\"stdErrorEnabled\":false},\"metricsEnabled\":false}") - .toObject(ClusterLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(true, model.applicationLogs().stdOutEnabled()); - Assertions.assertEquals(false, model.applicationLogs().stdErrorEnabled()); - Assertions.assertEquals(false, model.metricsEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLogAnalyticsProfile model = new ClusterLogAnalyticsProfile().withEnabled(true) - .withApplicationLogs( - new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true).withStdErrorEnabled(false)) - .withMetricsEnabled(false); - model = BinaryData.fromObject(model).toObject(ClusterLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(true, model.applicationLogs().stdOutEnabled()); - Assertions.assertEquals(false, model.applicationLogs().stdErrorEnabled()); - Assertions.assertEquals(false, model.metricsEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 4027bdf4975c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchVersionUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPatchVersionUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPatchVersionUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgrade\",\"sourceClusterVersion\":\"q\",\"sourceOssVersion\":\"kzjcjbtrgae\",\"sourceBuildNumber\":\"vibr\",\"targetClusterVersion\":\"jsto\",\"targetOssVersion\":\"eitpkxztmo\",\"targetBuildNumber\":\"klf\",\"componentName\":\"dgfcwqmp\",\"severity\":\"high\",\"utcTime\":\"qxzhem\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterPatchVersionUpgradeHistoryProperties.class); - Assertions.assertEquals("qxzhem", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("q", model.sourceClusterVersion()); - Assertions.assertEquals("kzjcjbtrgae", model.sourceOssVersion()); - Assertions.assertEquals("vibr", model.sourceBuildNumber()); - Assertions.assertEquals("jsto", model.targetClusterVersion()); - Assertions.assertEquals("eitpkxztmo", model.targetOssVersion()); - Assertions.assertEquals("klf", model.targetBuildNumber()); - Assertions.assertEquals("dgfcwqmp", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPatchVersionUpgradeHistoryProperties model - = new ClusterPatchVersionUpgradeHistoryProperties().withUtcTime("qxzhem") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED) - .withSourceClusterVersion("q") - .withSourceOssVersion("kzjcjbtrgae") - .withSourceBuildNumber("vibr") - .withTargetClusterVersion("jsto") - .withTargetOssVersion("eitpkxztmo") - .withTargetBuildNumber("klf") - .withComponentName("dgfcwqmp") - .withSeverity(ClusterUpgradeHistorySeverityType.HIGH); - model = BinaryData.fromObject(model).toObject(ClusterPatchVersionUpgradeHistoryProperties.class); - Assertions.assertEquals("qxzhem", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - Assertions.assertEquals("q", model.sourceClusterVersion()); - Assertions.assertEquals("kzjcjbtrgae", model.sourceOssVersion()); - Assertions.assertEquals("vibr", model.sourceBuildNumber()); - Assertions.assertEquals("jsto", model.targetClusterVersion()); - Assertions.assertEquals("eitpkxztmo", model.targetOssVersion()); - Assertions.assertEquals("klf", model.targetBuildNumber()); - Assertions.assertEquals("dgfcwqmp", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradePropertiesTests.java deleted file mode 100644 index 56032ae3d344..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradePropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchVersionUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPatchVersionUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgrade\",\"targetOssVersion\":\"nzeyqxtjj\",\"targetClusterVersion\":\"qlqhycavodg\",\"targetBuildNumber\":\"dbeesmie\",\"componentName\":\"lrariaawiu\"}") - .toObject(ClusterPatchVersionUpgradeProperties.class); - Assertions.assertEquals("nzeyqxtjj", model.targetOssVersion()); - Assertions.assertEquals("qlqhycavodg", model.targetClusterVersion()); - Assertions.assertEquals("dbeesmie", model.targetBuildNumber()); - Assertions.assertEquals("lrariaawiu", model.componentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPatchVersionUpgradeProperties model - = new ClusterPatchVersionUpgradeProperties().withTargetOssVersion("nzeyqxtjj") - .withTargetClusterVersion("qlqhycavodg") - .withTargetBuildNumber("dbeesmie") - .withComponentName("lrariaawiu"); - model = BinaryData.fromObject(model).toObject(ClusterPatchVersionUpgradeProperties.class); - Assertions.assertEquals("nzeyqxtjj", model.targetOssVersion()); - Assertions.assertEquals("qlqhycavodg", model.targetClusterVersion()); - Assertions.assertEquals("dbeesmie", model.targetBuildNumber()); - Assertions.assertEquals("lrariaawiu", model.componentName()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests.java deleted file mode 100644 index f18a1ecea791..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatchVersionUpgradeRollbackHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistorySeverityType; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPatchVersionUpgradeRollbackHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPatchVersionUpgradeRollbackHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"PatchVersionUpgradeRollback\",\"sourceClusterVersion\":\"ohu\",\"sourceOssVersion\":\"wtwko\",\"sourceBuildNumber\":\"wculkbaw\",\"targetClusterVersion\":\"ajnjwltlwtjj\",\"targetOssVersion\":\"ktalhsnvkcdmxz\",\"targetBuildNumber\":\"oaimlnw\",\"componentName\":\"aomylwea\",\"severity\":\"high\",\"utcTime\":\"cse\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterPatchVersionUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("cse", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("ohu", model.sourceClusterVersion()); - Assertions.assertEquals("wtwko", model.sourceOssVersion()); - Assertions.assertEquals("wculkbaw", model.sourceBuildNumber()); - Assertions.assertEquals("ajnjwltlwtjj", model.targetClusterVersion()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.targetOssVersion()); - Assertions.assertEquals("oaimlnw", model.targetBuildNumber()); - Assertions.assertEquals("aomylwea", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPatchVersionUpgradeRollbackHistoryProperties model - = new ClusterPatchVersionUpgradeRollbackHistoryProperties().withUtcTime("cse") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.SUCCEED) - .withSourceClusterVersion("ohu") - .withSourceOssVersion("wtwko") - .withSourceBuildNumber("wculkbaw") - .withTargetClusterVersion("ajnjwltlwtjj") - .withTargetOssVersion("ktalhsnvkcdmxz") - .withTargetBuildNumber("oaimlnw") - .withComponentName("aomylwea") - .withSeverity(ClusterUpgradeHistorySeverityType.HIGH); - model = BinaryData.fromObject(model).toObject(ClusterPatchVersionUpgradeRollbackHistoryProperties.class); - Assertions.assertEquals("cse", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("ohu", model.sourceClusterVersion()); - Assertions.assertEquals("wtwko", model.sourceOssVersion()); - Assertions.assertEquals("wculkbaw", model.sourceBuildNumber()); - Assertions.assertEquals("ajnjwltlwtjj", model.targetClusterVersion()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.targetOssVersion()); - Assertions.assertEquals("oaimlnw", model.targetBuildNumber()); - Assertions.assertEquals("aomylwea", model.componentName()); - Assertions.assertEquals(ClusterUpgradeHistorySeverityType.HIGH, model.severity()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 788f07110867..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchUpgradeHistoryPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAksPatchUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAksPatchUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"upgradeClusterPool\":true,\"upgradeAllClusterNodes\":true,\"originalVersion\":\"xvd\",\"newVersion\":\"fwafqrouda\",\"utcTime\":\"pavehhr\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterPoolAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("pavehhr", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(true, model.upgradeAllClusterNodes()); - Assertions.assertEquals("xvd", model.originalVersion()); - Assertions.assertEquals("fwafqrouda", model.newVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAksPatchUpgradeHistoryProperties model - = new ClusterPoolAksPatchUpgradeHistoryProperties().withUtcTime("pavehhr") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED) - .withUpgradeClusterPool(true) - .withUpgradeAllClusterNodes(true) - .withOriginalVersion("xvd") - .withNewVersion("fwafqrouda"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAksPatchUpgradeHistoryProperties.class); - Assertions.assertEquals("pavehhr", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(true, model.upgradeAllClusterNodes()); - Assertions.assertEquals("xvd", model.originalVersion()); - Assertions.assertEquals("fwafqrouda", model.newVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchVersionUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchVersionUpgradePropertiesTests.java deleted file mode 100644 index 31122d0a97d4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAksPatchVersionUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAksPatchVersionUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAksPatchVersionUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"upgradeClusterPool\":true,\"upgradeAllClusterNodes\":false,\"targetAksVersion\":\"ifmzzsd\"}") - .toObject(ClusterPoolAksPatchVersionUpgradeProperties.class); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(false, model.upgradeAllClusterNodes()); - Assertions.assertEquals("ifmzzsd", model.targetAksVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAksPatchVersionUpgradeProperties model - = new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true) - .withUpgradeAllClusterNodes(false) - .withTargetAksVersion("ifmzzsd"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAksPatchVersionUpgradeProperties.class); - Assertions.assertEquals(true, model.upgradeClusterPool()); - Assertions.assertEquals(false, model.upgradeAllClusterNodes()); - Assertions.assertEquals("ifmzzsd", model.targetAksVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests.java deleted file mode 100644 index 34a62e752fc7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.CurrentClusterPoolAksVersionStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAvailableUpgradeAksPatchUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeAksPatchUpgradeProperties model = BinaryData.fromString( - "{\"upgradeType\":\"AKSPatchUpgrade\",\"currentVersion\":\"kkdmfl\",\"currentVersionStatus\":\"Supported\",\"latestVersion\":\"mjlxrrilozapeewc\"}") - .toObject(ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("kkdmfl", model.currentVersion()); - Assertions.assertEquals(CurrentClusterPoolAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("mjlxrrilozapeewc", model.latestVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeAksPatchUpgradeProperties model - = new ClusterPoolAvailableUpgradeAksPatchUpgradeProperties().withCurrentVersion("kkdmfl") - .withCurrentVersionStatus(CurrentClusterPoolAksVersionStatus.SUPPORTED) - .withLatestVersion("mjlxrrilozapeewc"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.class); - Assertions.assertEquals("kkdmfl", model.currentVersion()); - Assertions.assertEquals(CurrentClusterPoolAksVersionStatus.SUPPORTED, model.currentVersionStatus()); - Assertions.assertEquals("mjlxrrilozapeewc", model.latestVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeInnerTests.java deleted file mode 100644 index c52edb2e928a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; - -public final class ClusterPoolAvailableUpgradeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"nb\",\"name\":\"xqabnmocpcysh\",\"type\":\"rzafbljjgpbtoqcj\"}") - .toObject(ClusterPoolAvailableUpgradeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeInner model - = new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeListTests.java deleted file mode 100644 index 0d5f95b79c4e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeListTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAvailableUpgradeListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"ac\",\"name\":\"boo\",\"type\":\"flnrosfqpteehzz\"},{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"yqrimzin\",\"name\":\"vswjdk\",\"type\":\"rsoodqxhcrmnoh\"},{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"kwh\",\"name\":\"soifiyipjxsqw\",\"type\":\"gr\"}],\"nextLink\":\"znorcj\"}") - .toObject(ClusterPoolAvailableUpgradeList.class); - Assertions.assertEquals("znorcj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeList model = new ClusterPoolAvailableUpgradeList() - .withValue(Arrays.asList( - new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()), - new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()), - new ClusterPoolAvailableUpgradeInner().withProperties(new ClusterPoolAvailableUpgradeProperties()))) - .withNextLink("znorcj"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeList.class); - Assertions.assertEquals("znorcj", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests.java deleted file mode 100644 index aa7b8cf1f5dc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeNodeOsUpgradeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolAvailableUpgradeNodeOsUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeNodeOsUpgradeProperties model - = BinaryData.fromString("{\"upgradeType\":\"NodeOsUpgrade\",\"latestVersion\":\"xlktwkuzi\"}") - .toObject(ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.class); - Assertions.assertEquals("xlktwkuzi", model.latestVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeNodeOsUpgradeProperties model - = new ClusterPoolAvailableUpgradeNodeOsUpgradeProperties().withLatestVersion("xlktwkuzi"); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.class); - Assertions.assertEquals("xlktwkuzi", model.latestVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradePropertiesTests.java deleted file mode 100644 index a0c94040e6bf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; - -public final class ClusterPoolAvailableUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolAvailableUpgradeProperties model - = BinaryData.fromString("{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"}") - .toObject(ClusterPoolAvailableUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolAvailableUpgradeProperties model = new ClusterPoolAvailableUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterPoolAvailableUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListMockTests.java deleted file mode 100644 index 59c9d251723b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrade; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolAvailableUpgradesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolAvailableUpgradeProperties\"},\"id\":\"hdxbzlm\",\"name\":\"muapcvhdbevw\",\"type\":\"qxeysko\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterPoolAvailableUpgrades().list("gqcwdhohsdtmc", "zsu", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java deleted file mode 100644 index 363a53ec8fe2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolComputeProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolComputeProfile model = BinaryData.fromString( - "{\"vmSize\":\"ooginuvamih\",\"count\":774982264,\"availabilityZones\":[\"rxzxtheo\",\"usivye\",\"cciqihnhungbwjz\"]}") - .toObject(ClusterPoolComputeProfile.class); - Assertions.assertEquals("ooginuvamih", model.vmSize()); - Assertions.assertEquals("rxzxtheo", model.availabilityZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolComputeProfile model = new ClusterPoolComputeProfile().withVmSize("ooginuvamih") - .withAvailabilityZones(Arrays.asList("rxzxtheo", "usivye", "cciqihnhungbwjz")); - model = BinaryData.fromObject(model).toObject(ClusterPoolComputeProfile.class); - Assertions.assertEquals("ooginuvamih", model.vmSize()); - Assertions.assertEquals("rxzxtheo", model.availabilityZones().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java deleted file mode 100644 index bf198fd78f48..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\",\"deploymentId\":\"uv\",\"managedResourceGroupName\":\"xpyb\",\"aksManagedResourceGroupName\":\"m\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"mtz\",\"publicIpTag\":{\"ipTagType\":\"bsphrupidgsybbe\",\"tag\":\"hphoycm\"}},\"computeProfile\":{\"vmSize\":\"xaobhdxbmtqioqjz\",\"count\":1801213143,\"availabilityZones\":[\"ufpo\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"izhwlrxy\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"soqijg\",\"msiClientId\":\"dmbpazlobcufpdz\",\"msiObjectId\":\"rbt\"},\"aksVersion\":\"qjnqglhqgnufoooj\"},\"networkProfile\":{\"subnetId\":\"ifsqesaagdfmg\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"ifkwmrvktsizntoc\",\"pa\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"psqucmpoyf\"},\"status\":\"fogknygjofjdde\"},\"location\":\"rd\",\"tags\":{\"sarhmofc\":\"ewnwreitjzyfl\",\"yurkdtmlxhekuksj\":\"hs\"},\"id\":\"xukcdmpar\",\"name\":\"ryuanzwuxzdxtay\",\"type\":\"lhmwhfpmrqobm\"}") - .toObject(ClusterPoolInner.class); - Assertions.assertEquals("rd", model.location()); - Assertions.assertEquals("ewnwreitjzyfl", model.tags().get("sarhmofc")); - Assertions.assertEquals("xpyb", model.properties().managedResourceGroupName()); - Assertions.assertEquals("mtz", model.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("bsphrupidgsybbe", model.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("hphoycm", model.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.properties().computeProfile().vmSize()); - Assertions.assertEquals("ufpo", model.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("ifsqesaagdfmg", model.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("ifkwmrvktsizntoc", - model.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("psqucmpoyf", model.properties().logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolInner model = new ClusterPoolInner().withLocation("rd") - .withTags(mapOf("sarhmofc", "ewnwreitjzyfl", "yurkdtmlxhekuksj", "hs")) - .withProperties(new ClusterPoolResourceProperties().withManagedResourceGroupName("xpyb") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("mtz") - .withPublicIpTag(new IpTag().withIpTagType("bsphrupidgsybbe").withTag("hphoycm"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("xaobhdxbmtqioqjz") - .withAvailabilityZones(Arrays.asList("ufpo"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("ifsqesaagdfmg") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("ifkwmrvktsizntoc", "pa"))) - .withLogAnalyticsProfile(new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false) - .withWorkspaceId("psqucmpoyf"))); - model = BinaryData.fromObject(model).toObject(ClusterPoolInner.class); - Assertions.assertEquals("rd", model.location()); - Assertions.assertEquals("ewnwreitjzyfl", model.tags().get("sarhmofc")); - Assertions.assertEquals("xpyb", model.properties().managedResourceGroupName()); - Assertions.assertEquals("mtz", model.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("bsphrupidgsybbe", model.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("hphoycm", model.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.properties().computeProfile().vmSize()); - Assertions.assertEquals("ufpo", model.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("ifsqesaagdfmg", model.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("ifkwmrvktsizntoc", - model.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("psqucmpoyf", model.properties().logAnalyticsProfile().workspaceId()); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java deleted file mode 100644 index 66b8a738a494..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"deploymentId\":\"zqqedq\",\"managedResourceGroupName\":\"bciqfouflm\",\"aksManagedResourceGroupName\":\"kzsmodm\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"ougpbkwt\",\"publicIpTag\":{\"ipTagType\":\"tduqktapspwgcuer\",\"tag\":\"umkdosvqwhbmd\"}},\"computeProfile\":{\"vmSize\":\"bbjfddgmbmbexp\",\"count\":72940743,\"availabilityZones\":[\"qrolfpf\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"lgbquxig\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"jgzjaoyfhrtx\",\"msiClientId\":\"lnerkujysvleju\",\"msiObjectId\":\"fqawrlyxw\"},\"aksVersion\":\"cpr\"},\"networkProfile\":{\"subnetId\":\"wbxgjvt\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"dnrujqguhmuouqfp\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"bngui\"},\"status\":\"wu\"},\"location\":\"gazxuf\",\"tags\":{\"fidfvzw\":\"ckyfih\",\"nteiwaopv\":\"zuhtymwisdkfthwx\"},\"id\":\"mijcmmxdcufufs\",\"name\":\"pymzidnsezcxtbzs\",\"type\":\"fycc\"}],\"nextLink\":\"ewmdw\"}") - .toObject(ClusterPoolListResult.class); - Assertions.assertEquals("gazxuf", model.value().get(0).location()); - Assertions.assertEquals("ckyfih", model.value().get(0).tags().get("fidfvzw")); - Assertions.assertEquals("bciqfouflm", model.value().get(0).properties().managedResourceGroupName()); - Assertions.assertEquals("ougpbkwt", - model.value().get(0).properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("tduqktapspwgcuer", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("umkdosvqwhbmd", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("bbjfddgmbmbexp", model.value().get(0).properties().computeProfile().vmSize()); - Assertions.assertEquals("qrolfpf", - model.value().get(0).properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("wbxgjvt", model.value().get(0).properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - model.value().get(0).properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.value().get(0).properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("dnrujqguhmuouqfp", - model.value().get(0).properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.value().get(0).properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("bngui", model.value().get(0).properties().logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolListResult model - = new ClusterPoolListResult().withValue(Arrays.asList(new ClusterPoolInner().withLocation("gazxuf") - .withTags(mapOf("fidfvzw", "ckyfih", "nteiwaopv", "zuhtymwisdkfthwx")) - .withProperties(new ClusterPoolResourceProperties().withManagedResourceGroupName("bciqfouflm") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("ougpbkwt") - .withPublicIpTag(new IpTag().withIpTagType("tduqktapspwgcuer").withTag("umkdosvqwhbmd"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("bbjfddgmbmbexp") - .withAvailabilityZones(Arrays.asList("qrolfpf"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("wbxgjvt") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("dnrujqguhmuouqfp"))) - .withLogAnalyticsProfile(new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false) - .withWorkspaceId("bngui"))))); - model = BinaryData.fromObject(model).toObject(ClusterPoolListResult.class); - Assertions.assertEquals("gazxuf", model.value().get(0).location()); - Assertions.assertEquals("ckyfih", model.value().get(0).tags().get("fidfvzw")); - Assertions.assertEquals("bciqfouflm", model.value().get(0).properties().managedResourceGroupName()); - Assertions.assertEquals("ougpbkwt", - model.value().get(0).properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("tduqktapspwgcuer", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("umkdosvqwhbmd", - model.value().get(0).properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("bbjfddgmbmbexp", model.value().get(0).properties().computeProfile().vmSize()); - Assertions.assertEquals("qrolfpf", - model.value().get(0).properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("wbxgjvt", model.value().get(0).properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - model.value().get(0).properties().networkProfile().outboundType()); - Assertions.assertEquals(false, model.value().get(0).properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("dnrujqguhmuouqfp", - model.value().get(0).properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, model.value().get(0).properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("bngui", model.value().get(0).properties().logAnalyticsProfile().workspaceId()); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java deleted file mode 100644 index 678fb59a9a31..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolLogAnalyticsProfile model = BinaryData.fromString("{\"enabled\":true,\"workspaceId\":\"jkot\"}") - .toObject(ClusterPoolLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jkot", model.workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolLogAnalyticsProfile model - = new ClusterPoolLogAnalyticsProfile().withEnabled(true).withWorkspaceId("jkot"); - model = BinaryData.fromObject(model).toObject(ClusterPoolLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jkot", model.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java deleted file mode 100644 index e49d8f8af465..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolNetworkProfile model = BinaryData.fromString( - "{\"subnetId\":\"k\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"iwpwcuk\",\"fkgiawxk\",\"ryplwckbasyypn\"]}") - .toObject(ClusterPoolNetworkProfile.class); - Assertions.assertEquals("k", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(true, model.enablePrivateApiServer()); - Assertions.assertEquals("iwpwcuk", model.apiServerAuthorizedIpRanges().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolNetworkProfile model = new ClusterPoolNetworkProfile().withSubnetId("k") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(true) - .withApiServerAuthorizedIpRanges(Arrays.asList("iwpwcuk", "fkgiawxk", "ryplwckbasyypn")); - model = BinaryData.fromObject(model).toObject(ClusterPoolNetworkProfile.class); - Assertions.assertEquals("k", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(true, model.enablePrivateApiServer()); - Assertions.assertEquals("iwpwcuk", model.apiServerAuthorizedIpRanges().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsImageUpdatePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsImageUpdatePropertiesTests.java deleted file mode 100644 index 9d996257023d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsImageUpdatePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; - -public final class ClusterPoolNodeOsImageUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolNodeOsImageUpdateProperties model = BinaryData.fromString("{\"upgradeType\":\"NodeOsUpgrade\"}") - .toObject(ClusterPoolNodeOsImageUpdateProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolNodeOsImageUpdateProperties model = new ClusterPoolNodeOsImageUpdateProperties(); - model = BinaryData.fromObject(model).toObject(ClusterPoolNodeOsImageUpdateProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsUpgradeHistoryPropertiesTests.java deleted file mode 100644 index fe377afa57ca..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNodeOsUpgradeHistoryPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolNodeOsUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolNodeOsUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"NodeOsUpgrade\",\"newNodeOs\":\"brn\",\"utcTime\":\"suxmpraf\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterPoolNodeOsUpgradeHistoryProperties.class); - Assertions.assertEquals("suxmpraf", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("brn", model.newNodeOs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolNodeOsUpgradeHistoryProperties model - = new ClusterPoolNodeOsUpgradeHistoryProperties().withUtcTime("suxmpraf") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED) - .withNewNodeOs("brn"); - model = BinaryData.fromObject(model).toObject(ClusterPoolNodeOsUpgradeHistoryProperties.class); - Assertions.assertEquals("suxmpraf", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - Assertions.assertEquals("brn", model.newNodeOs()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java deleted file mode 100644 index f2880606ce14..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolProfile model = BinaryData.fromString( - "{\"clusterPoolVersion\":\"vdphlxaolthqtr\",\"publicIpTag\":{\"ipTagType\":\"jbp\",\"tag\":\"zfsinzgvf\"}}") - .toObject(ClusterPoolProfile.class); - Assertions.assertEquals("vdphlxaolthqtr", model.clusterPoolVersion()); - Assertions.assertEquals("jbp", model.publicIpTag().ipTagType()); - Assertions.assertEquals("zfsinzgvf", model.publicIpTag().tag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolProfile model = new ClusterPoolProfile().withClusterPoolVersion("vdphlxaolthqtr") - .withPublicIpTag(new IpTag().withIpTagType("jbp").withTag("zfsinzgvf")); - model = BinaryData.fromObject(model).toObject(ClusterPoolProfile.class); - Assertions.assertEquals("vdphlxaolthqtr", model.clusterPoolVersion()); - Assertions.assertEquals("jbp", model.publicIpTag().ipTagType()); - Assertions.assertEquals("zfsinzgvf", model.publicIpTag().tag()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java deleted file mode 100644 index f45337da1de9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesAksClusterProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesAksClusterProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesAksClusterProfile model = BinaryData.fromString( - "{\"aksClusterResourceId\":\"fygxgispemvtzfk\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ubljofxqe\",\"msiClientId\":\"fjaeq\",\"msiObjectId\":\"hqjbasvmsmj\"},\"aksVersion\":\"lngsntnbybkzgcwr\"}") - .toObject(ClusterPoolResourcePropertiesAksClusterProfile.class); - Assertions.assertEquals("fygxgispemvtzfk", model.aksClusterResourceId()); - Assertions.assertEquals("ubljofxqe", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("fjaeq", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("hqjbasvmsmj", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesAksClusterProfile model - = new ClusterPoolResourcePropertiesAksClusterProfile().withAksClusterResourceId("fygxgispemvtzfk") - .withAksClusterAgentPoolIdentityProfile( - new AksClusterProfileAksClusterAgentPoolIdentityProfile().withMsiResourceId("ubljofxqe") - .withMsiClientId("fjaeq") - .withMsiObjectId("hqjbasvmsmj")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesAksClusterProfile.class); - Assertions.assertEquals("fygxgispemvtzfk", model.aksClusterResourceId()); - Assertions.assertEquals("ubljofxqe", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("fjaeq", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("hqjbasvmsmj", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java deleted file mode 100644 index 0dc8013d7e2f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesClusterPoolProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesClusterPoolProfile model = BinaryData.fromString( - "{\"clusterPoolVersion\":\"bcryffdfd\",\"publicIpTag\":{\"ipTagType\":\"ygexpaojakhmsb\",\"tag\":\"jhcrz\"}}") - .toObject(ClusterPoolResourcePropertiesClusterPoolProfile.class); - Assertions.assertEquals("bcryffdfd", model.clusterPoolVersion()); - Assertions.assertEquals("ygexpaojakhmsb", model.publicIpTag().ipTagType()); - Assertions.assertEquals("jhcrz", model.publicIpTag().tag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesClusterPoolProfile model - = new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("bcryffdfd") - .withPublicIpTag(new IpTag().withIpTagType("ygexpaojakhmsb").withTag("jhcrz")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesClusterPoolProfile.class); - Assertions.assertEquals("bcryffdfd", model.clusterPoolVersion()); - Assertions.assertEquals("ygexpaojakhmsb", model.publicIpTag().ipTagType()); - Assertions.assertEquals("jhcrz", model.publicIpTag().tag()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java deleted file mode 100644 index 2597f941efae..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesComputeProfile model = BinaryData.fromString( - "{\"vmSize\":\"felluwfzitonpe\",\"count\":794210755,\"availabilityZones\":[\"jlxofpdvhpfxxyp\",\"ninmayhuyb\",\"kpode\"]}") - .toObject(ClusterPoolResourcePropertiesComputeProfile.class); - Assertions.assertEquals("felluwfzitonpe", model.vmSize()); - Assertions.assertEquals("jlxofpdvhpfxxyp", model.availabilityZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesComputeProfile model - = new ClusterPoolResourcePropertiesComputeProfile().withVmSize("felluwfzitonpe") - .withAvailabilityZones(Arrays.asList("jlxofpdvhpfxxyp", "ninmayhuyb", "kpode")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesComputeProfile.class); - Assertions.assertEquals("felluwfzitonpe", model.vmSize()); - Assertions.assertEquals("jlxofpdvhpfxxyp", model.availabilityZones().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java deleted file mode 100644 index 8637e8b250ae..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesLogAnalyticsProfile model - = BinaryData.fromString("{\"enabled\":false,\"workspaceId\":\"sgcbac\"}") - .toObject(ClusterPoolResourcePropertiesLogAnalyticsProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("sgcbac", model.workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesLogAnalyticsProfile model - = new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false).withWorkspaceId("sgcbac"); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesLogAnalyticsProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("sgcbac", model.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java deleted file mode 100644 index 676b75fa07fd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesNetworkProfile model = BinaryData.fromString( - "{\"subnetId\":\"feusnhut\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"dhugjzzdatqxhocd\",\"eablg\",\"huticndvkao\",\"wyiftyhxhur\"]}") - .toObject(ClusterPoolResourcePropertiesNetworkProfile.class); - Assertions.assertEquals("feusnhut", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(false, model.enablePrivateApiServer()); - Assertions.assertEquals("dhugjzzdatqxhocd", model.apiServerAuthorizedIpRanges().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesNetworkProfile model = new ClusterPoolResourcePropertiesNetworkProfile() - .withSubnetId("feusnhut") - .withOutboundType(OutboundType.LOAD_BALANCER) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("dhugjzzdatqxhocd", "eablg", "huticndvkao", "wyiftyhxhur")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesNetworkProfile.class); - Assertions.assertEquals("feusnhut", model.subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, model.outboundType()); - Assertions.assertEquals(false, model.enablePrivateApiServer()); - Assertions.assertEquals("dhugjzzdatqxhocd", model.apiServerAuthorizedIpRanges().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java deleted file mode 100644 index a12cec0696cf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourceProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"deploymentId\":\"nryrtihf\",\"managedResourceGroupName\":\"ijbpzvgnwzsymgl\",\"aksManagedResourceGroupName\":\"fcyzkohdbihanufh\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"bj\",\"publicIpTag\":{\"ipTagType\":\"a\",\"tag\":\"ithxqhabifpi\"}},\"computeProfile\":{\"vmSize\":\"xwczbyscnp\",\"count\":219984358,\"availabilityZones\":[\"vyq\",\"iwbybrkxvdumjg\",\"tfwvukxgaudc\",\"snhsjcnyejhkryh\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"pczwlo\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"yemkkvnip\",\"msiClientId\":\"oxzjnchgejspod\",\"msiObjectId\":\"ailzydehojwyahu\"},\"aksVersion\":\"npmqnjaqwixjspro\"},\"networkProfile\":{\"subnetId\":\"cputegjvwmfdats\",\"outboundType\":\"userDefinedRouting\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"u\",\"suuv\",\"kjozkrwfnd\",\"odjpslwejd\"]},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"yoqpsoaccta\"},\"status\":\"kljla\"}") - .toObject(ClusterPoolResourceProperties.class); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.managedResourceGroupName()); - Assertions.assertEquals("bj", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("a", model.clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ithxqhabifpi", model.clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xwczbyscnp", model.computeProfile().vmSize()); - Assertions.assertEquals("vyq", model.computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("cputegjvwmfdats", model.networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.USER_DEFINED_ROUTING, model.networkProfile().outboundType()); - Assertions.assertEquals(true, model.networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("u", model.networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("yoqpsoaccta", model.logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourceProperties model = new ClusterPoolResourceProperties() - .withManagedResourceGroupName("ijbpzvgnwzsymgl") - .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("bj") - .withPublicIpTag(new IpTag().withIpTagType("a").withTag("ithxqhabifpi"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("xwczbyscnp") - .withAvailabilityZones(Arrays.asList("vyq", "iwbybrkxvdumjg", "tfwvukxgaudc", "snhsjcnyejhkryh"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("cputegjvwmfdats") - .withOutboundType(OutboundType.USER_DEFINED_ROUTING) - .withEnablePrivateApiServer(true) - .withApiServerAuthorizedIpRanges(Arrays.asList("u", "suuv", "kjozkrwfnd", "odjpslwejd"))) - .withLogAnalyticsProfile(new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(true) - .withWorkspaceId("yoqpsoaccta")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourceProperties.class); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.managedResourceGroupName()); - Assertions.assertEquals("bj", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("a", model.clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ithxqhabifpi", model.clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("xwczbyscnp", model.computeProfile().vmSize()); - Assertions.assertEquals("vyq", model.computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("cputegjvwmfdats", model.networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.USER_DEFINED_ROUTING, model.networkProfile().outboundType()); - Assertions.assertEquals(true, model.networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("u", model.networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("yoqpsoaccta", model.logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListMockTests.java deleted file mode 100644 index 64987300519a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoriesListMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistory; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -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 ClusterPoolUpgradeHistoriesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"owxeqocljmy\",\"upgradeResult\":\"Succeed\"},\"id\":\"zqkjjeokbzefe\",\"name\":\"rx\",\"type\":\"czurtlei\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterPoolUpgradeHistories().list("qzinkfkbg", "z", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("owxeqocljmy", response.iterator().next().properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, - response.iterator().next().properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryInnerTests.java deleted file mode 100644 index 0fb4ecc54809..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolUpgradeHistoryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeHistoryInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"scpai\",\"upgradeResult\":\"Succeed\"},\"id\":\"hbcsgl\",\"name\":\"mmajtjaodx\",\"type\":\"bnbdxkqpxokajion\"}") - .toObject(ClusterPoolUpgradeHistoryInner.class); - Assertions.assertEquals("scpai", model.properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeHistoryInner model = new ClusterPoolUpgradeHistoryInner() - .withProperties(new ClusterPoolUpgradeHistoryProperties().withUtcTime("scpai") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED)); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeHistoryInner.class); - Assertions.assertEquals("scpai", model.properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.SUCCEED, model.properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryListResultTests.java deleted file mode 100644 index 0b6c6a7db004..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryListResultTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolUpgradeHistoryListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeHistoryListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"ljavbqid\",\"upgradeResult\":\"Failed\"},\"id\":\"jzyulpk\",\"name\":\"dj\",\"type\":\"rlkhbzhfepgzgq\"}],\"nextLink\":\"zloc\"}") - .toObject(ClusterPoolUpgradeHistoryListResult.class); - Assertions.assertEquals("ljavbqid", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeHistoryListResult model - = new ClusterPoolUpgradeHistoryListResult().withValue(Arrays.asList(new ClusterPoolUpgradeHistoryInner() - .withProperties(new ClusterPoolUpgradeHistoryProperties().withUtcTime("ljavbqid") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED)))); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeHistoryListResult.class); - Assertions.assertEquals("ljavbqid", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 1a1080dd686b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeHistoryPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterPoolUpgradeHistoryProperties\",\"utcTime\":\"imexgstxgcpodgma\",\"upgradeResult\":\"Failed\"}") - .toObject(ClusterPoolUpgradeHistoryProperties.class); - Assertions.assertEquals("imexgstxgcpodgma", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeHistoryProperties model - = new ClusterPoolUpgradeHistoryProperties().withUtcTime("imexgstxgcpodgma") - .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeHistoryProperties.class); - Assertions.assertEquals("imexgstxgcpodgma", model.utcTime()); - Assertions.assertEquals(ClusterPoolUpgradeHistoryUpgradeResultType.FAILED, model.upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradePropertiesTests.java deleted file mode 100644 index 2b4f008f3638..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeProperties; - -public final class ClusterPoolUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgradeProperties model = BinaryData.fromString("{\"upgradeType\":\"ClusterPoolUpgradeProperties\"}") - .toObject(ClusterPoolUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgradeProperties model = new ClusterPoolUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeTests.java deleted file mode 100644 index 8f22dc52e7ea..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolUpgradeTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeProperties; - -public final class ClusterPoolUpgradeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolUpgrade model - = BinaryData.fromString("{\"properties\":{\"upgradeType\":\"ClusterPoolUpgradeProperties\"}}") - .toObject(ClusterPoolUpgrade.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolUpgrade model = new ClusterPoolUpgrade().withProperties(new ClusterPoolUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterPoolUpgrade.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java deleted file mode 100644 index 4a546cfa46ea..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionInner model = BinaryData.fromString( - "{\"properties\":{\"clusterPoolVersion\":\"jgcyztsfmznba\",\"aksVersion\":\"ph\",\"isPreview\":true},\"id\":\"rn\",\"name\":\"pxehuwrykqga\",\"type\":\"fmviklby\"}") - .toObject(ClusterPoolVersionInner.class); - Assertions.assertEquals("jgcyztsfmznba", model.properties().clusterPoolVersion()); - Assertions.assertEquals("ph", model.properties().aksVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionInner model = new ClusterPoolVersionInner() - .withProperties(new ClusterPoolVersionProperties().withClusterPoolVersion("jgcyztsfmznba") - .withAksVersion("ph") - .withIsPreview(true)); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionInner.class); - Assertions.assertEquals("jgcyztsfmznba", model.properties().clusterPoolVersion()); - Assertions.assertEquals("ph", model.properties().aksVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java deleted file mode 100644 index fa54bbe4ee75..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionProperties model = BinaryData - .fromString("{\"clusterPoolVersion\":\"khbejdznxc\",\"aksVersion\":\"srhnjivo\",\"isPreview\":true}") - .toObject(ClusterPoolVersionProperties.class); - Assertions.assertEquals("khbejdznxc", model.clusterPoolVersion()); - Assertions.assertEquals("srhnjivo", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionProperties model = new ClusterPoolVersionProperties().withClusterPoolVersion("khbejdznxc") - .withAksVersion("srhnjivo") - .withIsPreview(true); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionProperties.class); - Assertions.assertEquals("khbejdznxc", model.clusterPoolVersion()); - Assertions.assertEquals("srhnjivo", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java deleted file mode 100644 index 85c2944fd50b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"clusterPoolVersion\":\"jzgxmrhublwp\",\"aksVersion\":\"sutrgjup\",\"isPreview\":true},\"id\":\"p\",\"name\":\"oqh\",\"type\":\"hej\"},{\"properties\":{\"clusterPoolVersion\":\"zpnfqntcypsxj\",\"aksVersion\":\"oimwkslirc\",\"isPreview\":false},\"id\":\"vydfceacvlhvygdy\",\"name\":\"t\",\"type\":\"mrtwna\"}],\"nextLink\":\"slbi\"}") - .toObject(ClusterPoolVersionsListResult.class); - Assertions.assertEquals("jzgxmrhublwp", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals("sutrgjup", model.value().get(0).properties().aksVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionsListResult model = new ClusterPoolVersionsListResult().withValue(Arrays.asList( - new ClusterPoolVersionInner() - .withProperties(new ClusterPoolVersionProperties().withClusterPoolVersion("jzgxmrhublwp") - .withAksVersion("sutrgjup") - .withIsPreview(true)), - new ClusterPoolVersionInner() - .withProperties(new ClusterPoolVersionProperties().withClusterPoolVersion("zpnfqntcypsxj") - .withAksVersion("oimwkslirc") - .withIsPreview(false)))); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionsListResult.class); - Assertions.assertEquals("jzgxmrhublwp", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals("sutrgjup", model.value().get(0).properties().aksVersion()); - Assertions.assertEquals(true, model.value().get(0).properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 30e96ffd935a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -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 ClusterPoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"geyzihgrkyuiz\",\"managedResourceGroupName\":\"snmfpphojeevy\",\"aksManagedResourceGroupName\":\"hsgz\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"zbgomfgbeg\",\"publicIpTag\":{\"ipTagType\":\"gleohi\",\"tag\":\"etnluankrrfx\"}},\"computeProfile\":{\"vmSize\":\"eebtijvacvb\",\"count\":192666481,\"availabilityZones\":[\"q\",\"lajrnwxacevehj\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"xoafgaoqltfae\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"inmfgvxirp\",\"msiClientId\":\"hriypoqeyhlqhy\",\"msiObjectId\":\"prlpy\"},\"aksVersion\":\"uciqdsme\"},\"networkProfile\":{\"subnetId\":\"itdfuxtyasiib\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"stgnl\",\"hnmgixhcm\",\"vmqfoud\",\"rhc\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"rotwypundmbxhugc\"},\"status\":\"k\"},\"location\":\"lgorb\",\"tags\":{\"jltfvnzcyjtotpv\":\"pmdtz\"},\"id\":\"pvpbdbzqgqqiheds\",\"name\":\"qwthmky\",\"type\":\"bcysih\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response - = manager.clusterPools() - .define("boldforobwj") - .withRegion("qoli") - .withExistingResourceGroup("chxgs") - .withTags(mapOf("oq", "aiouaubrjt", "rzpasccbiuimzdly", "fuojrngif", "fdvruz", "dfqwmkyoq")) - .withProperties( - new ClusterPoolResourceProperties().withManagedResourceGroupName("qpbtuodxes") - .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile() - .withClusterPoolVersion("rwoycqucwyh") - .withPublicIpTag(new IpTag().withIpTagType("nomdrkywuhpsv").withTag("uurutlwexxwlalni"))) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("xzsrzpge") - .withAvailabilityZones(Arrays.asList("bwwpgdakchzy"))) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("ufmhrunc") - .withOutboundType(OutboundType.USER_DEFINED_ROUTING) - .withEnablePrivateApiServer(false) - .withApiServerAuthorizedIpRanges(Arrays.asList("cdqzhlctddu", "qn", "yfp"))) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false) - .withWorkspaceId("bnjj"))) - .create(); - - Assertions.assertEquals("lgorb", response.location()); - Assertions.assertEquals("pmdtz", response.tags().get("jltfvnzcyjtotpv")); - Assertions.assertEquals("snmfpphojeevy", response.properties().managedResourceGroupName()); - Assertions.assertEquals("zbgomfgbeg", response.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("gleohi", response.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("etnluankrrfx", response.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("eebtijvacvb", response.properties().computeProfile().vmSize()); - Assertions.assertEquals("q", response.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("itdfuxtyasiib", response.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, response.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, response.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("stgnl", response.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, response.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("rotwypundmbxhugc", response.properties().logAnalyticsProfile().workspaceId()); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java deleted file mode 100644 index 4fb40998ed1b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusterPools().delete("juwasqvdaeyyguxa", "jsqzhzbezk", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index d67689d5d0d3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -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 ClusterPoolsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"fgzdjtxvz\",\"managedResourceGroupName\":\"bqvgaqv\",\"aksManagedResourceGroupName\":\"a\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"qusrdvetnws\",\"publicIpTag\":{\"ipTagType\":\"utnw\",\"tag\":\"duy\"}},\"computeProfile\":{\"vmSize\":\"vuzhyr\",\"count\":680405996,\"availabilityZones\":[\"mvekdxukuqgsjj\",\"undxgketw\",\"hhzjhfj\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"vmuvgpmu\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"qsxvmhf\",\"msiClientId\":\"uzjyihsasbhudypo\",\"msiObjectId\":\"yue\"},\"aksVersion\":\"lynsqyrpf\"},\"networkProfile\":{\"subnetId\":\"brlttymsjnygq\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":false,\"apiServerAuthorizedIpRanges\":[\"zgtila\",\"hnfhqlyvijouwi\"]},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"yzunbixxrtikv\"},\"status\":\"wpgclrcivt\"},\"location\":\"xfrk\",\"tags\":{\"ka\":\"pmyyefrpmpdnqq\",\"vmm\":\"ao\",\"itgvkx\":\"npqfrtqlkzmeg\",\"hcans\":\"zyqdrfegcealzx\"},\"id\":\"moy\",\"name\":\"hlwigdivbkbxg\",\"type\":\"mf\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response = manager.clusterPools() - .getByResourceGroupWithResponse("vyi", "zqodfvpgshox", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xfrk", response.location()); - Assertions.assertEquals("pmyyefrpmpdnqq", response.tags().get("ka")); - Assertions.assertEquals("bqvgaqv", response.properties().managedResourceGroupName()); - Assertions.assertEquals("qusrdvetnws", response.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("utnw", response.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("duy", response.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("vuzhyr", response.properties().computeProfile().vmSize()); - Assertions.assertEquals("mvekdxukuqgsjj", response.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("brlttymsjnygq", response.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, response.properties().networkProfile().outboundType()); - Assertions.assertEquals(false, response.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("zgtila", response.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, response.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("yzunbixxrtikv", response.properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java deleted file mode 100644 index 35d26fc3f907..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -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 ClusterPoolsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"deploymentId\":\"ytnrzvuljraae\",\"managedResourceGroupName\":\"nok\",\"aksManagedResourceGroupName\":\"ukkjqnvbroyla\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"ulcdisdosf\",\"publicIpTag\":{\"ipTagType\":\"jsvg\",\"tag\":\"rwhryvycytd\"}},\"computeProfile\":{\"vmSize\":\"lxgccknfnwmbtm\",\"count\":166285139,\"availabilityZones\":[\"dhttzaefedxihchr\",\"hk\",\"crjdqnsdfzpbgtg\",\"ylkdghrje\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"lwxezwzhokvbwnh\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"qlgehg\",\"msiClientId\":\"pipifh\",\"msiObjectId\":\"f\"},\"aksVersion\":\"ajvgcxtxjcsheafi\"},\"networkProfile\":{\"subnetId\":\"tugsresmkssjh\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"fwegprhptillu\",\"biqtgdq\",\"hm\",\"wsldrizetpwbr\"]},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"ibph\"},\"status\":\"zmizakakan\"},\"location\":\"p\",\"tags\":{\"xprimrsop\":\"zhajoylhjlmuo\",\"stvasylwxdzaumw\":\"eecjmeis\"},\"id\":\"oohgu\",\"name\":\"fuzboyjathwtzolb\",\"type\":\"emwmdxmebwjs\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.clusterPools().listByResourceGroup("knh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("p", response.iterator().next().location()); - Assertions.assertEquals("zhajoylhjlmuo", response.iterator().next().tags().get("xprimrsop")); - Assertions.assertEquals("nok", response.iterator().next().properties().managedResourceGroupName()); - Assertions.assertEquals("ulcdisdosf", - response.iterator().next().properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("jsvg", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("rwhryvycytd", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("lxgccknfnwmbtm", response.iterator().next().properties().computeProfile().vmSize()); - Assertions.assertEquals("dhttzaefedxihchr", - response.iterator().next().properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("tugsresmkssjh", response.iterator().next().properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - response.iterator().next().properties().networkProfile().outboundType()); - Assertions.assertEquals(true, - response.iterator().next().properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("fwegprhptillu", - response.iterator().next().properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(true, response.iterator().next().properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("ibph", response.iterator().next().properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java deleted file mode 100644 index fb284378c06f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -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 ClusterPoolsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"deploymentId\":\"dxasicddyvv\",\"managedResourceGroupName\":\"kgfmocwahpq\",\"aksManagedResourceGroupName\":\"tjeaahhvjhh\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"kzyb\",\"publicIpTag\":{\"ipTagType\":\"jid\",\"tag\":\"ksyxkyxvxevblbje\"}},\"computeProfile\":{\"vmSize\":\"nljlageuaulx\",\"count\":783935050,\"availabilityZones\":[\"bn\",\"ppxynenls\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"izzgwkln\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"mffeycxcktpi\",\"msiClientId\":\"merteeammxqiek\",\"msiObjectId\":\"kzddrtkgdojbmxva\"},\"aksVersion\":\"efdeesve\"},\"networkProfile\":{\"subnetId\":\"ijpxtx\",\"outboundType\":\"loadBalancer\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"jwsawddjibab\",\"vit\",\"tvtzeexavoxtfg\",\"ecdmdqbwpy\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"sfj\"},\"status\":\"b\"},\"location\":\"hhxud\",\"tags\":{\"es\":\"odhtnsirudhzm\",\"zrcxfailcfxwmdbo\":\"kdlpa\"},\"id\":\"dfgsftufqobrj\",\"name\":\"nac\",\"type\":\"cc\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterPools().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hhxud", response.iterator().next().location()); - Assertions.assertEquals("odhtnsirudhzm", response.iterator().next().tags().get("es")); - Assertions.assertEquals("kgfmocwahpq", response.iterator().next().properties().managedResourceGroupName()); - Assertions.assertEquals("kzyb", - response.iterator().next().properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("jid", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ksyxkyxvxevblbje", - response.iterator().next().properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("nljlageuaulx", response.iterator().next().properties().computeProfile().vmSize()); - Assertions.assertEquals("bn", - response.iterator().next().properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("ijpxtx", response.iterator().next().properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.LOAD_BALANCER, - response.iterator().next().properties().networkProfile().outboundType()); - Assertions.assertEquals(true, - response.iterator().next().properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("jwsawddjibab", - response.iterator().next().properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, response.iterator().next().properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("sfj", response.iterator().next().properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeMockTests.java deleted file mode 100644 index bb979223a543..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeMockTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeProperties; -import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -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 ClusterPoolsUpgradeMockTests { - @Test - public void testUpgrade() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"mqt\",\"managedResourceGroupName\":\"xyi\",\"aksManagedResourceGroupName\":\"dt\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"cttadi\",\"publicIpTag\":{\"ipTagType\":\"eukmr\",\"tag\":\"ieekpndzaa\"}},\"computeProfile\":{\"vmSize\":\"mudqmeq\",\"count\":334028568,\"availabilityZones\":[\"bu\",\"qwyxebeybpm\"]},\"aksClusterProfile\":{\"aksClusterResourceId\":\"rtffyaqitmh\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ioqaqhvs\",\"msiClientId\":\"ufuqyrx\",\"msiObjectId\":\"dlcgqlsismjqfr\"},\"aksVersion\":\"gamquhiosrsjui\"},\"networkProfile\":{\"subnetId\":\"cdisyir\",\"outboundType\":\"userDefinedRouting\",\"enablePrivateApiServer\":true,\"apiServerAuthorizedIpRanges\":[\"xrxzbujrtr\",\"qvwre\",\"khgn\",\"nzonzl\"]},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"yw\"},\"status\":\"vjtszcofize\"},\"location\":\"dhgbjkvre\",\"tags\":{\"shcxlpmjerbdk\":\"amurvzmlovuan\",\"bccxjmonfdgn\":\"lvidizozs\",\"ypuuwwltvuqjctze\":\"n\"},\"id\":\"keifzzhmkdasv\",\"name\":\"lyhb\",\"type\":\"cu\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response = manager.clusterPools() - .upgrade("jpahlxvea", "f", new ClusterPoolUpgrade().withProperties(new ClusterPoolUpgradeProperties()), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dhgbjkvre", response.location()); - Assertions.assertEquals("amurvzmlovuan", response.tags().get("shcxlpmjerbdk")); - Assertions.assertEquals("xyi", response.properties().managedResourceGroupName()); - Assertions.assertEquals("cttadi", response.properties().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("eukmr", response.properties().clusterPoolProfile().publicIpTag().ipTagType()); - Assertions.assertEquals("ieekpndzaa", response.properties().clusterPoolProfile().publicIpTag().tag()); - Assertions.assertEquals("mudqmeq", response.properties().computeProfile().vmSize()); - Assertions.assertEquals("bu", response.properties().computeProfile().availabilityZones().get(0)); - Assertions.assertEquals("cdisyir", response.properties().networkProfile().subnetId()); - Assertions.assertEquals(OutboundType.USER_DEFINED_ROUTING, - response.properties().networkProfile().outboundType()); - Assertions.assertEquals(true, response.properties().networkProfile().enablePrivateApiServer()); - Assertions.assertEquals("xrxzbujrtr", - response.properties().networkProfile().apiServerAuthorizedIpRanges().get(0)); - Assertions.assertEquals(false, response.properties().logAnalyticsProfile().enabled()); - Assertions.assertEquals("yw", response.properties().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java deleted file mode 100644 index 4bcad045bce9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPrometheusProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrometheusProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrometheusProfile model - = BinaryData.fromString("{\"enabled\":true}").toObject(ClusterPrometheusProfile.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrometheusProfile model = new ClusterPrometheusProfile().withEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterPrometheusProfile.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterRangerPluginProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterRangerPluginProfileTests.java deleted file mode 100644 index b8a41d0abaf3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterRangerPluginProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterRangerPluginProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterRangerPluginProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterRangerPluginProfile model - = BinaryData.fromString("{\"enabled\":true}").toObject(ClusterRangerPluginProfile.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterRangerPluginProfile model = new ClusterRangerPluginProfile().withEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterRangerPluginProfile.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java deleted file mode 100644 index 75986403159b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterResizeDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterResizeData model = BinaryData.fromString( - "{\"properties\":{\"targetWorkerNodeCount\":1929078891},\"location\":\"gvvcnayrhyr\",\"tags\":{\"qqtch\":\"mueedndrdvstk\",\"mtdaa\":\"alm\"},\"id\":\"gdv\",\"name\":\"vgpiohgwxrt\",\"type\":\"udxepxgyqagv\"}") - .toObject(ClusterResizeData.class); - Assertions.assertEquals("gvvcnayrhyr", model.location()); - Assertions.assertEquals("mueedndrdvstk", model.tags().get("qqtch")); - Assertions.assertEquals(1929078891, model.properties().targetWorkerNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterResizeData model = new ClusterResizeData().withLocation("gvvcnayrhyr") - .withTags(mapOf("qqtch", "mueedndrdvstk", "mtdaa", "alm")) - .withProperties(new ClusterResizeProperties().withTargetWorkerNodeCount(1929078891)); - model = BinaryData.fromObject(model).toObject(ClusterResizeData.class); - Assertions.assertEquals("gvvcnayrhyr", model.location()); - Assertions.assertEquals("mueedndrdvstk", model.tags().get("qqtch")); - Assertions.assertEquals(1929078891, model.properties().targetWorkerNodeCount()); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java deleted file mode 100644 index a57be129517a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterResizePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterResizeProperties model - = BinaryData.fromString("{\"targetWorkerNodeCount\":1825902686}").toObject(ClusterResizeProperties.class); - Assertions.assertEquals(1825902686, model.targetWorkerNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterResizeProperties model = new ClusterResizeProperties().withTargetWorkerNodeCount(1825902686); - model = BinaryData.fromObject(model).toObject(ClusterResizeProperties.class); - Assertions.assertEquals(1825902686, model.targetWorkerNodeCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java deleted file mode 100644 index c3d101338c7b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterServiceConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterServiceConfig model = BinaryData.fromString( - "{\"component\":\"xobbcswsrt\",\"files\":[{\"fileName\":\"iplrbpbewtghfgb\",\"content\":\"gw\",\"encoding\":\"None\",\"path\":\"v\",\"values\":{\"mxiebw\":\"kbegibt\",\"gwyzm\":\"aloayqcgwrtzju\",\"mtsavjcbpwxqp\":\"txon\",\"yvxqtayriwwroy\":\"rknftguvriuhprwm\"}},{\"fileName\":\"bexrmcq\",\"content\":\"ycnojvknmefqsg\",\"encoding\":\"Base64\",\"path\":\"apj\",\"values\":{\"lxkvu\":\"pvgqzcjrvxdjzlm\",\"n\":\"fhzovawjvzunluth\"}},{\"fileName\":\"rnxipei\",\"content\":\"jzuaejxdultskzbb\",\"encoding\":\"None\",\"path\":\"mv\",\"values\":{\"zuhkfpbsjyof\":\"gpw\",\"us\":\"xl\"}}]}") - .toObject(ClusterServiceConfig.class); - Assertions.assertEquals("xobbcswsrt", model.component()); - Assertions.assertEquals("iplrbpbewtghfgb", model.files().get(0).fileName()); - Assertions.assertEquals("gw", model.files().get(0).content()); - Assertions.assertEquals(ContentEncoding.NONE, model.files().get(0).encoding()); - Assertions.assertEquals("v", model.files().get(0).path()); - Assertions.assertEquals("kbegibt", model.files().get(0).values().get("mxiebw")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterServiceConfig model = new ClusterServiceConfig().withComponent("xobbcswsrt") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("iplrbpbewtghfgb") - .withContent("gw") - .withEncoding(ContentEncoding.NONE) - .withPath("v") - .withValues(mapOf("mxiebw", "kbegibt", "gwyzm", "aloayqcgwrtzju", "mtsavjcbpwxqp", "txon", - "yvxqtayriwwroy", "rknftguvriuhprwm")), - new ClusterConfigFile().withFileName("bexrmcq") - .withContent("ycnojvknmefqsg") - .withEncoding(ContentEncoding.BASE64) - .withPath("apj") - .withValues(mapOf("lxkvu", "pvgqzcjrvxdjzlm", "n", "fhzovawjvzunluth")), - new ClusterConfigFile().withFileName("rnxipei") - .withContent("jzuaejxdultskzbb") - .withEncoding(ContentEncoding.NONE) - .withPath("mv") - .withValues(mapOf("zuhkfpbsjyof", "gpw", "us", "xl")))); - model = BinaryData.fromObject(model).toObject(ClusterServiceConfig.class); - Assertions.assertEquals("xobbcswsrt", model.component()); - Assertions.assertEquals("iplrbpbewtghfgb", model.files().get(0).fileName()); - Assertions.assertEquals("gw", model.files().get(0).content()); - Assertions.assertEquals(ContentEncoding.NONE, model.files().get(0).encoding()); - Assertions.assertEquals("v", model.files().get(0).path()); - Assertions.assertEquals("kbegibt", model.files().get(0).values().get("mxiebw")); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java deleted file mode 100644 index 858b3a750de5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterServiceConfigsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterServiceConfigsProfile model = BinaryData.fromString( - "{\"serviceName\":\"d\",\"configs\":[{\"component\":\"avxbniwdjswztsdb\",\"files\":[{\"fileName\":\"nxytxh\",\"content\":\"xbzpfzab\",\"encoding\":\"Base64\",\"path\":\"hxw\",\"values\":{\"vgyuguos\":\"yqiklbbovplwzb\"}},{\"fileName\":\"mkfssxqukkfplgm\",\"content\":\"xnkjzkdesl\",\"encoding\":\"Base64\",\"path\":\"pwiyig\",\"values\":{\"upedeojnabckhs\":\"kdwzbaiuebbaumny\",\"ie\":\"txp\"}},{\"fileName\":\"tfhvpesapskrdqmh\",\"content\":\"dhtldwkyz\",\"encoding\":\"Base64\",\"path\":\"kn\",\"values\":{\"wrupqsxvnmicykvc\":\"cwsvlxotog\",\"eil\":\"o\"}}]},{\"component\":\"vnotyfjfcnj\",\"files\":[{\"fileName\":\"cn\",\"content\":\"hbttkphyw\",\"encoding\":\"None\",\"path\":\"t\",\"values\":{\"abgy\":\"ermclfplphoxuscr\",\"qugxywpmueefjzwf\":\"psbjta\"}}]},{\"component\":\"kqujidsuyono\",\"files\":[{\"fileName\":\"laocqxtccmg\",\"content\":\"dxyt\",\"encoding\":\"None\",\"path\":\"rxv\",\"values\":{\"zntxhdz\":\"dw\"}},{\"fileName\":\"lrqjbhckfr\",\"content\":\"rxsbkyvp\",\"encoding\":\"None\",\"path\":\"uzbpzkafku\",\"values\":{\"ehhseyvjusrts\":\"rnwb\",\"mx\":\"hspkdeemao\"}}]},{\"component\":\"gkvtmelmqkrhah\",\"files\":[{\"fileName\":\"juahaquhcdhmdual\",\"content\":\"xqpvfadmw\",\"encoding\":\"None\",\"path\":\"gvxp\",\"values\":{\"b\":\"mzlfmisgwb\",\"dawkzbali\":\"e\"}},{\"fileName\":\"urqhaka\",\"content\":\"ashsfwxos\",\"encoding\":\"Base64\",\"path\":\"cugicjoox\",\"values\":{\"euecivyhzceuoj\":\"bwpucwwfvovbv\",\"dytdxwitx\":\"jrwjueiotwm\",\"qwgxhniskx\":\"rjaw\"}},{\"fileName\":\"bkpyc\",\"content\":\"lwn\",\"encoding\":\"None\",\"path\":\"dauwhvylwzbtd\",\"values\":{\"pow\":\"jznb\",\"qlveualupjmkh\":\"wpr\"}}]}]}") - .toObject(ClusterServiceConfigsProfile.class); - Assertions.assertEquals("d", model.serviceName()); - Assertions.assertEquals("avxbniwdjswztsdb", model.configs().get(0).component()); - Assertions.assertEquals("nxytxh", model.configs().get(0).files().get(0).fileName()); - Assertions.assertEquals("xbzpfzab", model.configs().get(0).files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.configs().get(0).files().get(0).encoding()); - Assertions.assertEquals("hxw", model.configs().get(0).files().get(0).path()); - Assertions.assertEquals("yqiklbbovplwzb", model.configs().get(0).files().get(0).values().get("vgyuguos")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterServiceConfigsProfile model - = new ClusterServiceConfigsProfile().withServiceName("d") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig().withComponent("avxbniwdjswztsdb") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("nxytxh") - .withContent("xbzpfzab") - .withEncoding(ContentEncoding.BASE64) - .withPath("hxw") - .withValues(mapOf("vgyuguos", "yqiklbbovplwzb")), - new ClusterConfigFile().withFileName("mkfssxqukkfplgm") - .withContent("xnkjzkdesl") - .withEncoding(ContentEncoding.BASE64) - .withPath("pwiyig") - .withValues(mapOf("upedeojnabckhs", "kdwzbaiuebbaumny", "ie", "txp")), - new ClusterConfigFile().withFileName("tfhvpesapskrdqmh") - .withContent("dhtldwkyz") - .withEncoding(ContentEncoding.BASE64) - .withPath("kn") - .withValues(mapOf("wrupqsxvnmicykvc", "cwsvlxotog", "eil", "o")))), - new ClusterServiceConfig().withComponent("vnotyfjfcnj") - .withFiles( - Arrays - .asList(new ClusterConfigFile().withFileName("cn") - .withContent("hbttkphyw") - .withEncoding(ContentEncoding.NONE) - .withPath("t") - .withValues(mapOf("abgy", "ermclfplphoxuscr", "qugxywpmueefjzwf", - "psbjta")))), - new ClusterServiceConfig().withComponent("kqujidsuyono") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("laocqxtccmg") - .withContent("dxyt") - .withEncoding(ContentEncoding.NONE) - .withPath("rxv") - .withValues(mapOf("zntxhdz", "dw")), - new ClusterConfigFile().withFileName("lrqjbhckfr") - .withContent("rxsbkyvp") - .withEncoding(ContentEncoding.NONE) - .withPath("uzbpzkafku") - .withValues(mapOf("ehhseyvjusrts", "rnwb", "mx", "hspkdeemao")))), - new ClusterServiceConfig().withComponent("gkvtmelmqkrhah") - .withFiles(Arrays.asList( - new ClusterConfigFile().withFileName("juahaquhcdhmdual") - .withContent("xqpvfadmw") - .withEncoding(ContentEncoding.NONE) - .withPath("gvxp") - .withValues(mapOf("b", "mzlfmisgwb", "dawkzbali", "e")), - new ClusterConfigFile().withFileName("urqhaka") - .withContent("ashsfwxos") - .withEncoding(ContentEncoding.BASE64) - .withPath("cugicjoox") - .withValues(mapOf("euecivyhzceuoj", "bwpucwwfvovbv", "dytdxwitx", "jrwjueiotwm", - "qwgxhniskx", "rjaw")), - new ClusterConfigFile().withFileName("bkpyc") - .withContent("lwn") - .withEncoding(ContentEncoding.NONE) - .withPath("dauwhvylwzbtd") - .withValues(mapOf("pow", "jznb", "qlveualupjmkh", "wpr")))))); - model = BinaryData.fromObject(model).toObject(ClusterServiceConfigsProfile.class); - Assertions.assertEquals("d", model.serviceName()); - Assertions.assertEquals("avxbniwdjswztsdb", model.configs().get(0).component()); - Assertions.assertEquals("nxytxh", model.configs().get(0).files().get(0).fileName()); - Assertions.assertEquals("xbzpfzab", model.configs().get(0).files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.configs().get(0).files().get(0).encoding()); - Assertions.assertEquals("hxw", model.configs().get(0).files().get(0).path()); - Assertions.assertEquals("yqiklbbovplwzb", model.configs().get(0).files().get(0).values().get("vgyuguos")); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListMockTests.java deleted file mode 100644 index efca1fa40935..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoriesListMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistory; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -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 ClusterUpgradeHistoriesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"reur\",\"upgradeResult\":\"Succeed\"},\"id\":\"fuarenlvhht\",\"name\":\"lnvnafvvkyfedev\",\"type\":\"bo\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterUpgradeHistories() - .list("xhpdulontacnpqwt", "htuevrhrljy", "ogwxhnsduugwb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("reur", response.iterator().next().properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, - response.iterator().next().properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryInnerTests.java deleted file mode 100644 index 2ab6d8cabcbc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeHistoryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeHistoryInner model = BinaryData.fromString( - "{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"tllxdyhgsyocogj\",\"upgradeResult\":\"Failed\"},\"id\":\"tbnnha\",\"name\":\"oocrkvcikhnv\",\"type\":\"amqgxqquezikyw\"}") - .toObject(ClusterUpgradeHistoryInner.class); - Assertions.assertEquals("tllxdyhgsyocogj", model.properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeHistoryInner model = new ClusterUpgradeHistoryInner() - .withProperties(new ClusterUpgradeHistoryProperties().withUtcTime("tllxdyhgsyocogj") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED)); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeHistoryInner.class); - Assertions.assertEquals("tllxdyhgsyocogj", model.properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, model.properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryListResultTests.java deleted file mode 100644 index 42e56f9d151d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryListResultTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterUpgradeHistoryInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeHistoryListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeHistoryListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"ioxiysuiizyn\",\"upgradeResult\":\"Failed\"},\"id\":\"yatrwy\",\"name\":\"q\",\"type\":\"ibzyhwitsmyp\"},{\"properties\":{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"ynpcdpumnzgmwznm\",\"upgradeResult\":\"Failed\"},\"id\":\"knso\",\"name\":\"gj\",\"type\":\"xbldtlwwrlkdmtn\"}],\"nextLink\":\"ok\"}") - .toObject(ClusterUpgradeHistoryListResult.class); - Assertions.assertEquals("ioxiysuiizyn", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeHistoryListResult model = new ClusterUpgradeHistoryListResult().withValue(Arrays.asList( - new ClusterUpgradeHistoryInner() - .withProperties(new ClusterUpgradeHistoryProperties().withUtcTime("ioxiysuiizyn") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED)), - new ClusterUpgradeHistoryInner() - .withProperties(new ClusterUpgradeHistoryProperties().withUtcTime("ynpcdpumnzgmwznm") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.FAILED)))); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeHistoryListResult.class); - Assertions.assertEquals("ioxiysuiizyn", model.value().get(0).properties().utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.FAILED, - model.value().get(0).properties().upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryPropertiesTests.java deleted file mode 100644 index 4ce08ad1223e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeHistoryPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryUpgradeResultType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeHistoryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeHistoryProperties model = BinaryData.fromString( - "{\"upgradeType\":\"ClusterUpgradeHistoryProperties\",\"utcTime\":\"gxk\",\"upgradeResult\":\"Succeed\"}") - .toObject(ClusterUpgradeHistoryProperties.class); - Assertions.assertEquals("gxk", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeHistoryProperties model = new ClusterUpgradeHistoryProperties().withUtcTime("gxk") - .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.SUCCEED); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeHistoryProperties.class); - Assertions.assertEquals("gxk", model.utcTime()); - Assertions.assertEquals(ClusterUpgradeHistoryUpgradeResultType.SUCCEED, model.upgradeResult()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradePropertiesTests.java deleted file mode 100644 index bbd9add63013..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradePropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeProperties; - -public final class ClusterUpgradePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeProperties model = BinaryData.fromString("{\"upgradeType\":\"ClusterUpgradeProperties\"}") - .toObject(ClusterUpgradeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeProperties model = new ClusterUpgradeProperties(); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackPropertiesTests.java deleted file mode 100644 index 7304373ff53c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollbackProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeRollbackPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeRollbackProperties model = BinaryData.fromString("{\"upgradeHistory\":\"melwuipiccjz\"}") - .toObject(ClusterUpgradeRollbackProperties.class); - Assertions.assertEquals("melwuipiccjz", model.upgradeHistory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeRollbackProperties model - = new ClusterUpgradeRollbackProperties().withUpgradeHistory("melwuipiccjz"); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeRollbackProperties.class); - Assertions.assertEquals("melwuipiccjz", model.upgradeHistory()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackTests.java deleted file mode 100644 index e4a55b4e133e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeRollbackTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollbackProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpgradeRollbackTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgradeRollback model = BinaryData.fromString("{\"properties\":{\"upgradeHistory\":\"la\"}}") - .toObject(ClusterUpgradeRollback.class); - Assertions.assertEquals("la", model.properties().upgradeHistory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgradeRollback model = new ClusterUpgradeRollback() - .withProperties(new ClusterUpgradeRollbackProperties().withUpgradeHistory("la")); - model = BinaryData.fromObject(model).toObject(ClusterUpgradeRollback.class); - Assertions.assertEquals("la", model.properties().upgradeHistory()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeTests.java deleted file mode 100644 index b87ccfcad860..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterUpgradeTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeProperties; - -public final class ClusterUpgradeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpgrade model = BinaryData.fromString("{\"properties\":{\"upgradeType\":\"ClusterUpgradeProperties\"}}") - .toObject(ClusterUpgrade.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpgrade model = new ClusterUpgrade().withProperties(new ClusterUpgradeProperties()); - model = BinaryData.fromObject(model).toObject(ClusterUpgrade.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java deleted file mode 100644 index 25b49454f1f8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionInner model = BinaryData.fromString( - "{\"properties\":{\"clusterType\":\"goo\",\"clusterVersion\":\"kqfqjbvl\",\"ossVersion\":\"rfmluiqtq\",\"clusterPoolVersion\":\"avyvnqqyba\",\"isPreview\":true,\"components\":[{\"name\":\"jkqa\",\"version\":\"gzslesjcbhernnti\"},{\"name\":\"djc\",\"version\":\"quwrbehwag\"}]},\"id\":\"buffkmrqemvvhm\",\"name\":\"tdrjfutacoebj\",\"type\":\"ewzcjznmwcp\"}") - .toObject(ClusterVersionInner.class); - Assertions.assertEquals("goo", model.properties().clusterType()); - Assertions.assertEquals("kqfqjbvl", model.properties().clusterVersion()); - Assertions.assertEquals("rfmluiqtq", model.properties().ossVersion()); - Assertions.assertEquals("avyvnqqyba", model.properties().clusterPoolVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionInner model - = new ClusterVersionInner().withProperties(new ClusterVersionProperties().withClusterType("goo") - .withClusterVersion("kqfqjbvl") - .withOssVersion("rfmluiqtq") - .withClusterPoolVersion("avyvnqqyba") - .withIsPreview(true)); - model = BinaryData.fromObject(model).toObject(ClusterVersionInner.class); - Assertions.assertEquals("goo", model.properties().clusterType()); - Assertions.assertEquals("kqfqjbvl", model.properties().clusterVersion()); - Assertions.assertEquals("rfmluiqtq", model.properties().ossVersion()); - Assertions.assertEquals("avyvnqqyba", model.properties().clusterPoolVersion()); - Assertions.assertEquals(true, model.properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java deleted file mode 100644 index 54b14d652968..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionProperties model = BinaryData.fromString( - "{\"clusterType\":\"uaadraufactkahzo\",\"clusterVersion\":\"jjziuxxpsh\",\"ossVersion\":\"e\",\"clusterPoolVersion\":\"lfg\",\"isPreview\":false,\"components\":[{\"name\":\"wdlenrdsut\",\"version\":\"bazpjuohmi\"},{\"name\":\"flnorwmduvwp\",\"version\":\"vxwmygd\"},{\"name\":\"gpqch\",\"version\":\"zepn\"}]}") - .toObject(ClusterVersionProperties.class); - Assertions.assertEquals("uaadraufactkahzo", model.clusterType()); - Assertions.assertEquals("jjziuxxpsh", model.clusterVersion()); - Assertions.assertEquals("e", model.ossVersion()); - Assertions.assertEquals("lfg", model.clusterPoolVersion()); - Assertions.assertEquals(false, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionProperties model = new ClusterVersionProperties().withClusterType("uaadraufactkahzo") - .withClusterVersion("jjziuxxpsh") - .withOssVersion("e") - .withClusterPoolVersion("lfg") - .withIsPreview(false); - model = BinaryData.fromObject(model).toObject(ClusterVersionProperties.class); - Assertions.assertEquals("uaadraufactkahzo", model.clusterType()); - Assertions.assertEquals("jjziuxxpsh", model.clusterVersion()); - Assertions.assertEquals("e", model.ossVersion()); - Assertions.assertEquals("lfg", model.clusterPoolVersion()); - Assertions.assertEquals(false, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java deleted file mode 100644 index 677dd123e186..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionsListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"clusterType\":\"fzg\",\"clusterVersion\":\"jdftuljltd\",\"ossVersion\":\"eamtmcz\",\"clusterPoolVersion\":\"m\",\"isPreview\":false,\"components\":[{\"name\":\"qioknssxmojm\",\"version\":\"p\"}]},\"id\":\"prvkwcfzqljyxgtc\",\"name\":\"heyd\",\"type\":\"sdshmkxmaehvb\"},{\"properties\":{\"clusterType\":\"ripltf\",\"clusterVersion\":\"tbaxk\",\"ossVersion\":\"ywrckp\",\"clusterPoolVersion\":\"lyhpluodpvruud\",\"isPreview\":false,\"components\":[{\"name\":\"hostgktstvdxecl\",\"version\":\"dqbcvhzlhplod\"}]},\"id\":\"dlwwqfbumlkxt\",\"name\":\"qjfsmlmbtxhw\",\"type\":\"fwsrtawcoezbrhu\"}],\"nextLink\":\"kh\"}") - .toObject(ClusterVersionsListResult.class); - Assertions.assertEquals("fzg", model.value().get(0).properties().clusterType()); - Assertions.assertEquals("jdftuljltd", model.value().get(0).properties().clusterVersion()); - Assertions.assertEquals("eamtmcz", model.value().get(0).properties().ossVersion()); - Assertions.assertEquals("m", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals(false, model.value().get(0).properties().isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionsListResult model = new ClusterVersionsListResult().withValue(Arrays.asList( - new ClusterVersionInner().withProperties(new ClusterVersionProperties().withClusterType("fzg") - .withClusterVersion("jdftuljltd") - .withOssVersion("eamtmcz") - .withClusterPoolVersion("m") - .withIsPreview(false)), - new ClusterVersionInner().withProperties(new ClusterVersionProperties().withClusterType("ripltf") - .withClusterVersion("tbaxk") - .withOssVersion("ywrckp") - .withClusterPoolVersion("lyhpluodpvruud") - .withIsPreview(false)))); - model = BinaryData.fromObject(model).toObject(ClusterVersionsListResult.class); - Assertions.assertEquals("fzg", model.value().get(0).properties().clusterType()); - Assertions.assertEquals("jdftuljltd", model.value().get(0).properties().clusterVersion()); - Assertions.assertEquals("eamtmcz", model.value().get(0).properties().ossVersion()); - Assertions.assertEquals("m", model.value().get(0).properties().clusterPoolVersion()); - Assertions.assertEquals(false, model.value().get(0).properties().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java deleted file mode 100644 index 8bd1117a7b6c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -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))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("jqlafcbahhpzp", "foiyjwpfilk", "kkholvdndvia", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java deleted file mode 100644 index 92f9b68ac575..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -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 ClustersGetInstanceViewWithResponseMockTests { - @Test - public void testGetInstanceViewWithResponse() throws Exception { - String responseStr - = "{\"name\":\"tu\",\"properties\":{\"status\":{\"ready\":\"o\",\"reason\":\"e\",\"message\":\"ncnwfepbnwgf\"},\"serviceStatuses\":[{\"kind\":\"jgcgbjbgdlfgtdys\",\"ready\":\"aquflqbctqha\",\"message\":\"jrwdkqz\"}]}}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterInstanceViewResult response = manager.clusters() - .getInstanceViewWithResponse("hwpusxj", "aqehg", "dohzjq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tu", response.name()); - Assertions.assertEquals("o", response.properties().status().ready()); - Assertions.assertEquals("e", response.properties().status().reason()); - Assertions.assertEquals("ncnwfepbnwgf", response.properties().status().message()); - Assertions.assertEquals("jgcgbjbgdlfgtdys", response.properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("aquflqbctqha", response.properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("jrwdkqz", response.properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java deleted file mode 100644 index e0a9b7fedf1d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -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 ClustersListInstanceViewsMockTests { - @Test - public void testListInstanceViews() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"ons\",\"properties\":{\"status\":{\"ready\":\"onwpnga\",\"reason\":\"n\",\"message\":\"xjawrt\"},\"serviceStatuses\":[{\"kind\":\"fjmyccxlzhco\",\"ready\":\"ovne\",\"message\":\"enlusfn\"},{\"kind\":\"dtjxtxrdcqt\",\"ready\":\"vidttgepuslvyjt\",\"message\":\"uwkasiz\"},{\"kind\":\"esfuught\",\"ready\":\"qfecjxeygtuhx\",\"message\":\"cbuewmrswnjlxuz\"}]}}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusters() - .listInstanceViews("fjgtixrjvzuy", "urmlmuo", "olbauirop", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ons", response.iterator().next().name()); - Assertions.assertEquals("onwpnga", response.iterator().next().properties().status().ready()); - Assertions.assertEquals("n", response.iterator().next().properties().status().reason()); - Assertions.assertEquals("xjawrt", response.iterator().next().properties().status().message()); - Assertions.assertEquals("fjmyccxlzhco", - response.iterator().next().properties().serviceStatuses().get(0).kind()); - Assertions.assertEquals("ovne", response.iterator().next().properties().serviceStatuses().get(0).ready()); - Assertions.assertEquals("enlusfn", response.iterator().next().properties().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java deleted file mode 100644 index 97efd8e36675..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import org.junit.jupiter.api.Assertions; - -public final class ComparisonRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComparisonRule model = BinaryData.fromString("{\"operator\":\"lessThan\",\"threshold\":38.544758}") - .toObject(ComparisonRule.class); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.operator()); - Assertions.assertEquals(38.544758f, model.threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComparisonRule model - = new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN).withThreshold(38.544758f); - model = BinaryData.fromObject(model).toObject(ComparisonRule.class); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.operator()); - Assertions.assertEquals(38.544758f, model.threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java deleted file mode 100644 index eea3345a7fbc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeProfile model = BinaryData.fromString( - "{\"nodes\":[{\"type\":\"dnfyhxdeoejzicwi\",\"vmSize\":\"sjttgzfbish\",\"count\":643021552},{\"type\":\"khaj\",\"vmSize\":\"eyeam\",\"count\":128550194},{\"type\":\"hagalpbuxwgipwh\",\"vmSize\":\"nowkgshw\",\"count\":248274393},{\"type\":\"kix\",\"vmSize\":\"bin\",\"count\":1868038426}],\"availabilityZones\":[\"ttmrywnuzoqf\",\"iyqzrnk\",\"qvyxlwhzlsicoho\",\"qnwvlrya\"]}") - .toObject(ComputeProfile.class); - Assertions.assertEquals("dnfyhxdeoejzicwi", model.nodes().get(0).type()); - Assertions.assertEquals("sjttgzfbish", model.nodes().get(0).vmSize()); - Assertions.assertEquals(643021552, model.nodes().get(0).count()); - Assertions.assertEquals("ttmrywnuzoqf", model.availabilityZones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeProfile model = new ComputeProfile() - .withNodes(Arrays.asList( - new NodeProfile().withType("dnfyhxdeoejzicwi").withVmSize("sjttgzfbish").withCount(643021552), - new NodeProfile().withType("khaj").withVmSize("eyeam").withCount(128550194), - new NodeProfile().withType("hagalpbuxwgipwh").withVmSize("nowkgshw").withCount(248274393), - new NodeProfile().withType("kix").withVmSize("bin").withCount(1868038426))) - .withAvailabilityZones(Arrays.asList("ttmrywnuzoqf", "iyqzrnk", "qvyxlwhzlsicoho", "qnwvlrya")); - model = BinaryData.fromObject(model).toObject(ComputeProfile.class); - Assertions.assertEquals("dnfyhxdeoejzicwi", model.nodes().get(0).type()); - Assertions.assertEquals("sjttgzfbish", model.nodes().get(0).vmSize()); - Assertions.assertEquals(643021552, model.nodes().get(0).count()); - Assertions.assertEquals("ttmrywnuzoqf", model.availabilityZones().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java deleted file mode 100644 index 37da6b3f388f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComputeResourceDefinition; -import org.junit.jupiter.api.Assertions; - -public final class ComputeResourceDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeResourceDefinition model = BinaryData.fromString("{\"cpu\":97.30686,\"memory\":2120097512911222232}") - .toObject(ComputeResourceDefinition.class); - Assertions.assertEquals(97.30686f, model.cpu()); - Assertions.assertEquals(2120097512911222232L, model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeResourceDefinition model - = new ComputeResourceDefinition().withCpu(97.30686f).withMemory(2120097512911222232L); - model = BinaryData.fromObject(model).toObject(ComputeResourceDefinition.class); - Assertions.assertEquals(97.30686f, model.cpu()); - Assertions.assertEquals(2120097512911222232L, model.memory()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java deleted file mode 100644 index 976b2541de03..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfileWeb; -import com.azure.resourcemanager.hdinsight.containers.models.SshConnectivityEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConnectivityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectivityProfile model = BinaryData.fromString( - "{\"web\":{\"fqdn\":\"eli\",\"privateFqdn\":\"nr\"},\"ssh\":[{\"endpoint\":\"o\",\"privateSshEndpoint\":\"bnxknalaulppg\"},{\"endpoint\":\"dtpnapnyiropuhp\",\"privateSshEndpoint\":\"vpgylgqgitxmed\"},{\"endpoint\":\"v\",\"privateSshEndpoint\":\"lynqwwncwzzh\"}]}") - .toObject(ConnectivityProfile.class); - Assertions.assertEquals("eli", model.web().fqdn()); - Assertions.assertEquals("nr", model.web().privateFqdn()); - Assertions.assertEquals("o", model.ssh().get(0).endpoint()); - Assertions.assertEquals("bnxknalaulppg", model.ssh().get(0).privateSshEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectivityProfile model - = new ConnectivityProfile().withWeb(new ConnectivityProfileWeb().withFqdn("eli").withPrivateFqdn("nr")) - .withSsh(Arrays.asList( - new SshConnectivityEndpoint().withEndpoint("o").withPrivateSshEndpoint("bnxknalaulppg"), - new SshConnectivityEndpoint().withEndpoint("dtpnapnyiropuhp") - .withPrivateSshEndpoint("vpgylgqgitxmed"), - new SshConnectivityEndpoint().withEndpoint("v").withPrivateSshEndpoint("lynqwwncwzzh"))); - model = BinaryData.fromObject(model).toObject(ConnectivityProfile.class); - Assertions.assertEquals("eli", model.web().fqdn()); - Assertions.assertEquals("nr", model.web().privateFqdn()); - Assertions.assertEquals("o", model.ssh().get(0).endpoint()); - Assertions.assertEquals("bnxknalaulppg", model.ssh().get(0).privateSshEndpoint()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java deleted file mode 100644 index 934d0532bacf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfileWeb; -import org.junit.jupiter.api.Assertions; - -public final class ConnectivityProfileWebTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectivityProfileWeb model - = BinaryData.fromString("{\"fqdn\":\"gktrmgucnapkte\",\"privateFqdn\":\"llwptfdy\"}") - .toObject(ConnectivityProfileWeb.class); - Assertions.assertEquals("gktrmgucnapkte", model.fqdn()); - Assertions.assertEquals("llwptfdy", model.privateFqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectivityProfileWeb model - = new ConnectivityProfileWeb().withFqdn("gktrmgucnapkte").withPrivateFqdn("llwptfdy"); - model = BinaryData.fromObject(model).toObject(ConnectivityProfileWeb.class); - Assertions.assertEquals("gktrmgucnapkte", model.fqdn()); - Assertions.assertEquals("llwptfdy", model.privateFqdn()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/DiskStorageProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/DiskStorageProfileTests.java deleted file mode 100644 index 7bd0ef749d5c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/DiskStorageProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.DataDiskType; -import com.azure.resourcemanager.hdinsight.containers.models.DiskStorageProfile; -import org.junit.jupiter.api.Assertions; - -public final class DiskStorageProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskStorageProfile model - = BinaryData.fromString("{\"dataDiskSize\":220182660,\"dataDiskType\":\"Premium_SSD_LRS\"}") - .toObject(DiskStorageProfile.class); - Assertions.assertEquals(220182660, model.dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.dataDiskType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskStorageProfile model - = new DiskStorageProfile().withDataDiskSize(220182660).withDataDiskType(DataDiskType.PREMIUM_SSD_LRS); - model = BinaryData.fromObject(model).toObject(DiskStorageProfile.class); - Assertions.assertEquals(220182660, model.dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.dataDiskType()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobProfileTests.java deleted file mode 100644 index 3c672bca6318..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProfile; -import com.azure.resourcemanager.hdinsight.containers.models.UpgradeMode; -import org.junit.jupiter.api.Assertions; - -public final class FlinkJobProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlinkJobProfile model = BinaryData.fromString( - "{\"jobJarDirectory\":\"ohfwds\",\"jarName\":\"n\",\"entryClass\":\"ljuti\",\"args\":\"wacf\",\"savePointName\":\"dkzzewkfvhqcrail\",\"upgradeMode\":\"STATELESS_UPDATE\"}") - .toObject(FlinkJobProfile.class); - Assertions.assertEquals("ohfwds", model.jobJarDirectory()); - Assertions.assertEquals("n", model.jarName()); - Assertions.assertEquals("ljuti", model.entryClass()); - Assertions.assertEquals("wacf", model.args()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.savePointName()); - Assertions.assertEquals(UpgradeMode.STATELESS_UPDATE, model.upgradeMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlinkJobProfile model = new FlinkJobProfile().withJobJarDirectory("ohfwds") - .withJarName("n") - .withEntryClass("ljuti") - .withArgs("wacf") - .withSavePointName("dkzzewkfvhqcrail") - .withUpgradeMode(UpgradeMode.STATELESS_UPDATE); - model = BinaryData.fromObject(model).toObject(FlinkJobProfile.class); - Assertions.assertEquals("ohfwds", model.jobJarDirectory()); - Assertions.assertEquals("n", model.jarName()); - Assertions.assertEquals("ljuti", model.entryClass()); - Assertions.assertEquals("wacf", model.args()); - Assertions.assertEquals("dkzzewkfvhqcrail", model.savePointName()); - Assertions.assertEquals(UpgradeMode.STATELESS_UPDATE, model.upgradeMode()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java deleted file mode 100644 index 11f736eeca8d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Action; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FlinkJobPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlinkJobProperties model = BinaryData.fromString( - "{\"jobType\":\"FlinkJob\",\"runId\":\"bzevwrd\",\"jobName\":\"fukuvsjcswsmystu\",\"jobJarDirectory\":\"qypfcv\",\"jarName\":\"rchpqbmfpjbabwid\",\"entryClass\":\"xsspuunnoxyhk\",\"args\":\"qddrihpfhoqcaae\",\"savePointName\":\"aomdjvlpjxx\",\"action\":\"START\",\"flinkConfiguration\":{\"zkdnc\":\"sgeivsiy\",\"wyrpgogtqxepnyl\":\"dxonbzoggculap\",\"tlvofq\":\"fuajly\"},\"jobId\":\"vfcibyfmowux\",\"status\":\"jpvd\",\"jobOutput\":\"fzwiivwzjbhyz\",\"actionResult\":\"jrkambtrnegvmnv\",\"lastSavePoint\":\"eqvldspast\"}") - .toObject(FlinkJobProperties.class); - Assertions.assertEquals("bzevwrd", model.runId()); - Assertions.assertEquals("fukuvsjcswsmystu", model.jobName()); - Assertions.assertEquals("qypfcv", model.jobJarDirectory()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.jarName()); - Assertions.assertEquals("xsspuunnoxyhk", model.entryClass()); - Assertions.assertEquals("qddrihpfhoqcaae", model.args()); - Assertions.assertEquals("aomdjvlpjxx", model.savePointName()); - Assertions.assertEquals(Action.START, model.action()); - Assertions.assertEquals("sgeivsiy", model.flinkConfiguration().get("zkdnc")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlinkJobProperties model = new FlinkJobProperties().withRunId("bzevwrd") - .withJobName("fukuvsjcswsmystu") - .withJobJarDirectory("qypfcv") - .withJarName("rchpqbmfpjbabwid") - .withEntryClass("xsspuunnoxyhk") - .withArgs("qddrihpfhoqcaae") - .withSavePointName("aomdjvlpjxx") - .withAction(Action.START) - .withFlinkConfiguration( - mapOf("zkdnc", "sgeivsiy", "wyrpgogtqxepnyl", "dxonbzoggculap", "tlvofq", "fuajly")); - model = BinaryData.fromObject(model).toObject(FlinkJobProperties.class); - Assertions.assertEquals("bzevwrd", model.runId()); - Assertions.assertEquals("fukuvsjcswsmystu", model.jobName()); - Assertions.assertEquals("qypfcv", model.jobJarDirectory()); - Assertions.assertEquals("rchpqbmfpjbabwid", model.jarName()); - Assertions.assertEquals("xsspuunnoxyhk", model.entryClass()); - Assertions.assertEquals("qddrihpfhoqcaae", model.args()); - Assertions.assertEquals("aomdjvlpjxx", model.savePointName()); - Assertions.assertEquals(Action.START, model.action()); - Assertions.assertEquals("sgeivsiy", model.flinkConfiguration().get("zkdnc")); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java deleted file mode 100644 index cb15f57168ca..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.IdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class IdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProfile model = BinaryData - .fromString( - "{\"msiResourceId\":\"yqduujit\",\"msiClientId\":\"jczdzevndh\",\"msiObjectId\":\"rwpdappdsbdkvwrw\"}") - .toObject(IdentityProfile.class); - Assertions.assertEquals("yqduujit", model.msiResourceId()); - Assertions.assertEquals("jczdzevndh", model.msiClientId()); - Assertions.assertEquals("rwpdappdsbdkvwrw", model.msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProfile model = new IdentityProfile().withMsiResourceId("yqduujit") - .withMsiClientId("jczdzevndh") - .withMsiObjectId("rwpdappdsbdkvwrw"); - model = BinaryData.fromObject(model).toObject(IdentityProfile.class); - Assertions.assertEquals("yqduujit", model.msiResourceId()); - Assertions.assertEquals("jczdzevndh", model.msiClientId()); - Assertions.assertEquals("rwpdappdsbdkvwrw", model.msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IpTagTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IpTagTests.java deleted file mode 100644 index 8f7a96ec0b5d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IpTagTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.IpTag; -import org.junit.jupiter.api.Assertions; - -public final class IpTagTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpTag model = BinaryData.fromString("{\"ipTagType\":\"jrwzox\",\"tag\":\"j\"}").toObject(IpTag.class); - Assertions.assertEquals("jrwzox", model.ipTagType()); - Assertions.assertEquals("j", model.tag()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpTag model = new IpTag().withIpTagType("jrwzox").withTag("j"); - model = BinaryData.fromObject(model).toObject(IpTag.class); - Assertions.assertEquals("jrwzox", model.ipTagType()); - Assertions.assertEquals("j", model.tag()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaConnectivityEndpointsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaConnectivityEndpointsTests.java deleted file mode 100644 index 67d675576515..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaConnectivityEndpointsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.KafkaConnectivityEndpoints; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class KafkaConnectivityEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KafkaConnectivityEndpoints model = BinaryData.fromString( - "{\"bootstrapServerEndpoint\":\"wyhzdx\",\"brokerEndpoints\":[\"dbzm\",\"vdfznudaodvxzb\",\"cblylpstdbhhxsr\",\"dzu\"]}") - .toObject(KafkaConnectivityEndpoints.class); - Assertions.assertEquals("wyhzdx", model.bootstrapServerEndpoint()); - Assertions.assertEquals("dbzm", model.brokerEndpoints().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KafkaConnectivityEndpoints model = new KafkaConnectivityEndpoints().withBootstrapServerEndpoint("wyhzdx") - .withBrokerEndpoints(Arrays.asList("dbzm", "vdfznudaodvxzb", "cblylpstdbhhxsr", "dzu")); - model = BinaryData.fromObject(model).toObject(KafkaConnectivityEndpoints.class); - Assertions.assertEquals("wyhzdx", model.bootstrapServerEndpoint()); - Assertions.assertEquals("dbzm", model.brokerEndpoints().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaProfileTests.java deleted file mode 100644 index 09232310add0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/KafkaProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.DataDiskType; -import com.azure.resourcemanager.hdinsight.containers.models.DiskStorageProfile; -import com.azure.resourcemanager.hdinsight.containers.models.KafkaProfile; -import org.junit.jupiter.api.Assertions; - -public final class KafkaProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KafkaProfile model = BinaryData.fromString( - "{\"enableKRaft\":true,\"enablePublicEndpoints\":false,\"remoteStorageUri\":\"kthumaqolbgycdui\",\"diskStorage\":{\"dataDiskSize\":178501813,\"dataDiskType\":\"Premium_SSD_LRS\"},\"connectivityEndpoints\":{\"bootstrapServerEndpoint\":\"cym\",\"brokerEndpoints\":[\"l\",\"ssl\",\"lfmmdnbbglzpswi\"]}}") - .toObject(KafkaProfile.class); - Assertions.assertEquals(true, model.enableKRaft()); - Assertions.assertEquals(false, model.enablePublicEndpoints()); - Assertions.assertEquals("kthumaqolbgycdui", model.remoteStorageUri()); - Assertions.assertEquals(178501813, model.diskStorage().dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.diskStorage().dataDiskType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KafkaProfile model = new KafkaProfile().withEnableKRaft(true) - .withEnablePublicEndpoints(false) - .withRemoteStorageUri("kthumaqolbgycdui") - .withDiskStorage( - new DiskStorageProfile().withDataDiskSize(178501813).withDataDiskType(DataDiskType.PREMIUM_SSD_LRS)); - model = BinaryData.fromObject(model).toObject(KafkaProfile.class); - Assertions.assertEquals(true, model.enableKRaft()); - Assertions.assertEquals(false, model.enablePublicEndpoints()); - Assertions.assertEquals("kthumaqolbgycdui", model.remoteStorageUri()); - Assertions.assertEquals(178501813, model.diskStorage().dataDiskSize()); - Assertions.assertEquals(DataDiskType.PREMIUM_SSD_LRS, model.diskStorage().dataDiskType()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java deleted file mode 100644 index 3c40af7c0a22..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoadBasedConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoadBasedConfig model = BinaryData.fromString( - "{\"minNodes\":385457826,\"maxNodes\":395045632,\"pollInterval\":1463995661,\"cooldownPeriod\":2026519653,\"scalingRules\":[{\"actionType\":\"scaledown\",\"evaluationCount\":948183907,\"scalingMetric\":\"rvnaenqpeh\",\"comparisonRule\":{\"operator\":\"lessThanOrEqual\",\"threshold\":15.866309}},{\"actionType\":\"scaleup\",\"evaluationCount\":895776000,\"scalingMetric\":\"gmifthnzd\",\"comparisonRule\":{\"operator\":\"lessThanOrEqual\",\"threshold\":6.8623724}}]}") - .toObject(LoadBasedConfig.class); - Assertions.assertEquals(385457826, model.minNodes()); - Assertions.assertEquals(395045632, model.maxNodes()); - Assertions.assertEquals(1463995661, model.pollInterval()); - Assertions.assertEquals(2026519653, model.cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.scalingRules().get(0).actionType()); - Assertions.assertEquals(948183907, model.scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("rvnaenqpeh", model.scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN_OR_EQUAL, - model.scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(15.866309f, model.scalingRules().get(0).comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoadBasedConfig model = new LoadBasedConfig().withMinNodes(385457826) - .withMaxNodes(395045632) - .withPollInterval(1463995661) - .withCooldownPeriod(2026519653) - .withScalingRules(Arrays.asList( - new ScalingRule().withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(948183907) - .withScalingMetric("rvnaenqpeh") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN_OR_EQUAL) - .withThreshold(15.866309f)), - new ScalingRule().withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(895776000) - .withScalingMetric("gmifthnzd") - .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN_OR_EQUAL) - .withThreshold(6.8623724f)))); - model = BinaryData.fromObject(model).toObject(LoadBasedConfig.class); - Assertions.assertEquals(385457826, model.minNodes()); - Assertions.assertEquals(395045632, model.maxNodes()); - Assertions.assertEquals(1463995661, model.pollInterval()); - Assertions.assertEquals(2026519653, model.cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.scalingRules().get(0).actionType()); - Assertions.assertEquals(948183907, model.scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("rvnaenqpeh", model.scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN_OR_EQUAL, - model.scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(15.866309f, model.scalingRules().get(0).comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index f32832f3f26c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.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.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityResult; -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 LocationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"qbawpcbbnzqcykn\",\"message\":\"qofyuicdhzbdy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailabilityResult response = manager.locations() - .checkNameAvailabilityWithResponse("xnazpmkml", - new NameAvailabilityParameters().withName("evfxzopjhbzxlioh").withType("dd"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("qbawpcbbnzqcykn", response.reason()); - Assertions.assertEquals("qofyuicdhzbdy", response.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentityProfileTests.java deleted file mode 100644 index 30bcabec0ffc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentityProfileTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentitySpec; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentityType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentityProfile model = BinaryData.fromString( - "{\"identityList\":[{\"type\":\"user\",\"resourceId\":\"ik\",\"clientId\":\"drgvtqagn\",\"objectId\":\"uynhijg\"},{\"type\":\"user\",\"resourceId\":\"ebf\",\"clientId\":\"iarbutrcvpna\",\"objectId\":\"zmhjrunmp\"},{\"type\":\"user\",\"resourceId\":\"tdbhrbnla\",\"clientId\":\"kx\",\"objectId\":\"yskpbhen\"}]}") - .toObject(ManagedIdentityProfile.class); - Assertions.assertEquals(ManagedIdentityType.USER, model.identityList().get(0).type()); - Assertions.assertEquals("ik", model.identityList().get(0).resourceId()); - Assertions.assertEquals("drgvtqagn", model.identityList().get(0).clientId()); - Assertions.assertEquals("uynhijg", model.identityList().get(0).objectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentityProfile model = new ManagedIdentityProfile().withIdentityList(Arrays.asList( - new ManagedIdentitySpec().withType(ManagedIdentityType.USER) - .withResourceId("ik") - .withClientId("drgvtqagn") - .withObjectId("uynhijg"), - new ManagedIdentitySpec().withType(ManagedIdentityType.USER) - .withResourceId("ebf") - .withClientId("iarbutrcvpna") - .withObjectId("zmhjrunmp"), - new ManagedIdentitySpec().withType(ManagedIdentityType.USER) - .withResourceId("tdbhrbnla") - .withClientId("kx") - .withObjectId("yskpbhen"))); - model = BinaryData.fromObject(model).toObject(ManagedIdentityProfile.class); - Assertions.assertEquals(ManagedIdentityType.USER, model.identityList().get(0).type()); - Assertions.assertEquals("ik", model.identityList().get(0).resourceId()); - Assertions.assertEquals("drgvtqagn", model.identityList().get(0).clientId()); - Assertions.assertEquals("uynhijg", model.identityList().get(0).objectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentitySpecTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentitySpecTests.java deleted file mode 100644 index b5ed9c8db347..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ManagedIdentitySpecTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentitySpec; -import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentityType; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentitySpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentitySpec model = BinaryData - .fromString( - "{\"type\":\"internal\",\"resourceId\":\"kcxywnyt\",\"clientId\":\"rsyn\",\"objectId\":\"qidybyx\"}") - .toObject(ManagedIdentitySpec.class); - Assertions.assertEquals(ManagedIdentityType.INTERNAL, model.type()); - Assertions.assertEquals("kcxywnyt", model.resourceId()); - Assertions.assertEquals("rsyn", model.clientId()); - Assertions.assertEquals("qidybyx", model.objectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentitySpec model = new ManagedIdentitySpec().withType(ManagedIdentityType.INTERNAL) - .withResourceId("kcxywnyt") - .withClientId("rsyn") - .withObjectId("qidybyx"); - model = BinaryData.fromObject(model).toObject(ManagedIdentitySpec.class); - Assertions.assertEquals(ManagedIdentityType.INTERNAL, model.type()); - Assertions.assertEquals("kcxywnyt", model.resourceId()); - Assertions.assertEquals("rsyn", model.clientId()); - Assertions.assertEquals("qidybyx", model.objectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/MavenLibraryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/MavenLibraryPropertiesTests.java deleted file mode 100644 index cf66e9bd7914..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/MavenLibraryPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.MavenLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class MavenLibraryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MavenLibraryProperties model = BinaryData.fromString( - "{\"type\":\"maven\",\"groupId\":\"izxfpxt\",\"name\":\"qscjavftjuh\",\"version\":\"azkmtgguwp\",\"remarks\":\"r\",\"timestamp\":\"2021-11-12T08:33:33Z\",\"status\":\"INSTALLED\",\"message\":\"mghfcfiwrxgkne\"}") - .toObject(MavenLibraryProperties.class); - Assertions.assertEquals("r", model.remarks()); - Assertions.assertEquals("izxfpxt", model.groupId()); - Assertions.assertEquals("qscjavftjuh", model.name()); - Assertions.assertEquals("azkmtgguwp", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MavenLibraryProperties model = new MavenLibraryProperties().withRemarks("r") - .withGroupId("izxfpxt") - .withName("qscjavftjuh") - .withVersion("azkmtgguwp"); - model = BinaryData.fromObject(model).toObject(MavenLibraryProperties.class); - Assertions.assertEquals("r", model.remarks()); - Assertions.assertEquals("izxfpxt", model.groupId()); - Assertions.assertEquals("qscjavftjuh", model.name()); - Assertions.assertEquals("azkmtgguwp", model.version()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java deleted file mode 100644 index dce6426513a8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityParameters model = BinaryData.fromString("{\"name\":\"tkzwpcnpwzc\",\"type\":\"esgvvsccyaj\"}") - .toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("tkzwpcnpwzc", model.name()); - Assertions.assertEquals("esgvvsccyaj", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityParameters model - = new NameAvailabilityParameters().withName("tkzwpcnpwzc").withType("esgvvsccyaj"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("tkzwpcnpwzc", model.name()); - Assertions.assertEquals("esgvvsccyaj", model.type()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java deleted file mode 100644 index 64ffc670b3e3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityResultInner model - = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"hwyg\",\"message\":\"vdnkfxusem\"}") - .toObject(NameAvailabilityResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("hwyg", model.reason()); - Assertions.assertEquals("vdnkfxusem", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityResultInner model - = new NameAvailabilityResultInner().withNameAvailable(false).withReason("hwyg").withMessage("vdnkfxusem"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("hwyg", model.reason()); - Assertions.assertEquals("vdnkfxusem", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java deleted file mode 100644 index b357d68c5c52..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; -import org.junit.jupiter.api.Assertions; - -public final class NodeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeProfile model = BinaryData.fromString("{\"type\":\"w\",\"vmSize\":\"heun\",\"count\":1346564492}") - .toObject(NodeProfile.class); - Assertions.assertEquals("w", model.type()); - Assertions.assertEquals("heun", model.vmSize()); - Assertions.assertEquals(1346564492, model.count()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeProfile model = new NodeProfile().withType("w").withVmSize("heun").withCount(1346564492); - model = BinaryData.fromObject(model).toObject(NodeProfile.class); - Assertions.assertEquals("w", model.type()); - Assertions.assertEquals("heun", model.vmSize()); - Assertions.assertEquals(1346564492, model.count()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java deleted file mode 100644 index a071ba3b79f6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"jlihhyus\",\"resource\":\"kasdvlm\",\"operation\":\"dgzxulucvpamrsr\",\"description\":\"zvxurisjnhny\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java deleted file mode 100644 index 7d40dfdaba33..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = BinaryData.fromString( - "{\"name\":\"mvzzbtdcqvp\",\"isDataAction\":true,\"display\":{\"provider\":\"viylwdshfssnrbgy\",\"resource\":\"rymsgaojfmw\",\"operation\":\"otmrfhir\",\"description\":\"ymoxoftpipiwyczu\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java deleted file mode 100644 index 499f684dc881..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"ydxtqm\",\"isDataAction\":false,\"display\":{\"provider\":\"rgguf\",\"resource\":\"aomtbghhavgrvkff\",\"operation\":\"jzhpjbibgjmfx\",\"description\":\"vfcluyovwxnbkfe\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"hwzdgirujbz\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java deleted file mode 100644 index 40a430991e20..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.hdinsight.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -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\":\"wgbdvibidmhmwffp\",\"isDataAction\":false,\"display\":{\"provider\":\"apckccrrvw\",\"resource\":\"oxoyyukp\",\"operation\":\"immoiroqboshbrag\",\"description\":\"yyrmfsvbp\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - HDInsightContainersManager manager = HDInsightContainersManager.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); - - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/PyPiLibraryPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/PyPiLibraryPropertiesTests.java deleted file mode 100644 index 55560c9128ab..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/PyPiLibraryPropertiesTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.PyPiLibraryProperties; -import org.junit.jupiter.api.Assertions; - -public final class PyPiLibraryPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PyPiLibraryProperties model = BinaryData.fromString( - "{\"type\":\"pypi\",\"name\":\"wlyxgncxyk\",\"version\":\"djhlimm\",\"remarks\":\"x\",\"timestamp\":\"2021-11-18T02:45:39Z\",\"status\":\"UNINSTALL_FAILED\",\"message\":\"rxvxcjzh\"}") - .toObject(PyPiLibraryProperties.class); - Assertions.assertEquals("x", model.remarks()); - Assertions.assertEquals("wlyxgncxyk", model.name()); - Assertions.assertEquals("djhlimm", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PyPiLibraryProperties model - = new PyPiLibraryProperties().withRemarks("x").withName("wlyxgncxyk").withVersion("djhlimm"); - model = BinaryData.fromObject(model).toObject(PyPiLibraryProperties.class); - Assertions.assertEquals("x", model.remarks()); - Assertions.assertEquals("wlyxgncxyk", model.name()); - Assertions.assertEquals("djhlimm", model.version()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerAuditSpecTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerAuditSpecTests.java deleted file mode 100644 index cbb48f8632cc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerAuditSpecTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; -import org.junit.jupiter.api.Assertions; - -public final class RangerAuditSpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RangerAuditSpec model = BinaryData.fromString("{\"storageAccount\":\"vmkcx\"}").toObject(RangerAuditSpec.class); - Assertions.assertEquals("vmkcx", model.storageAccount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RangerAuditSpec model = new RangerAuditSpec().withStorageAccount("vmkcx"); - model = BinaryData.fromObject(model).toObject(RangerAuditSpec.class); - Assertions.assertEquals("vmkcx", model.storageAccount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerUsersyncSpecTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerUsersyncSpecTests.java deleted file mode 100644 index 64d48784d9fb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/RangerUsersyncSpecTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; -import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RangerUsersyncSpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RangerUsersyncSpec model = BinaryData.fromString( - "{\"enabled\":true,\"groups\":[\"helxprglya\",\"dd\",\"kcbcue\",\"rjxgciqib\"],\"mode\":\"static\",\"userMappingLocation\":\"xsdqrhzoymibmrqy\",\"users\":[\"hwflu\",\"zdtmhrkwofy\",\"voqacpiexpbt\",\"iwbwoenwashrtdtk\"]}") - .toObject(RangerUsersyncSpec.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("helxprglya", model.groups().get(0)); - Assertions.assertEquals(RangerUsersyncMode.STATIC, model.mode()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.userMappingLocation()); - Assertions.assertEquals("hwflu", model.users().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RangerUsersyncSpec model = new RangerUsersyncSpec().withEnabled(true) - .withGroups(Arrays.asList("helxprglya", "dd", "kcbcue", "rjxgciqib")) - .withMode(RangerUsersyncMode.STATIC) - .withUserMappingLocation("xsdqrhzoymibmrqy") - .withUsers(Arrays.asList("hwflu", "zdtmhrkwofy", "voqacpiexpbt", "iwbwoenwashrtdtk")); - model = BinaryData.fromObject(model).toObject(RangerUsersyncSpec.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("helxprglya", model.groups().get(0)); - Assertions.assertEquals(RangerUsersyncMode.STATIC, model.mode()); - Assertions.assertEquals("xsdqrhzoymibmrqy", model.userMappingLocation()); - Assertions.assertEquals("hwflu", model.users().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java deleted file mode 100644 index 654c05b718f9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import org.junit.jupiter.api.Assertions; - -public final class ScalingRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingRule model = BinaryData.fromString( - "{\"actionType\":\"scaleup\",\"evaluationCount\":962281735,\"scalingMetric\":\"nayqi\",\"comparisonRule\":{\"operator\":\"greaterThanOrEqual\",\"threshold\":83.24161}}") - .toObject(ScalingRule.class); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.actionType()); - Assertions.assertEquals(962281735, model.evaluationCount()); - Assertions.assertEquals("nayqi", model.scalingMetric()); - Assertions.assertEquals(ComparisonOperator.GREATER_THAN_OR_EQUAL, model.comparisonRule().operator()); - Assertions.assertEquals(83.24161f, model.comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingRule model = new ScalingRule().withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(962281735) - .withScalingMetric("nayqi") - .withComparisonRule( - new ComparisonRule().withOperator(ComparisonOperator.GREATER_THAN_OR_EQUAL).withThreshold(83.24161f)); - model = BinaryData.fromObject(model).toObject(ScalingRule.class); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.actionType()); - Assertions.assertEquals(962281735, model.evaluationCount()); - Assertions.assertEquals("nayqi", model.scalingMetric()); - Assertions.assertEquals(ComparisonOperator.GREATER_THAN_OR_EQUAL, model.comparisonRule().operator()); - Assertions.assertEquals(83.24161f, model.comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java deleted file mode 100644 index 71649d9d268a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBasedConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBasedConfig model = BinaryData.fromString( - "{\"timeZone\":\"bsrfbj\",\"defaultCount\":891212878,\"schedules\":[{\"startTime\":\"w\",\"endTime\":\"sotftpvj\",\"count\":1235013026,\"days\":[\"Tuesday\",\"Wednesday\",\"Monday\",\"Thursday\"]}]}") - .toObject(ScheduleBasedConfig.class); - Assertions.assertEquals("bsrfbj", model.timeZone()); - Assertions.assertEquals(891212878, model.defaultCount()); - Assertions.assertEquals("w", model.schedules().get(0).startTime()); - Assertions.assertEquals("sotftpvj", model.schedules().get(0).endTime()); - Assertions.assertEquals(1235013026, model.schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.TUESDAY, model.schedules().get(0).days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBasedConfig model = new ScheduleBasedConfig().withTimeZone("bsrfbj") - .withDefaultCount(891212878) - .withSchedules(Arrays.asList(new Schedule().withStartTime("w") - .withEndTime("sotftpvj") - .withCount(1235013026) - .withDays(Arrays.asList(ScheduleDay.TUESDAY, ScheduleDay.WEDNESDAY, ScheduleDay.MONDAY, - ScheduleDay.THURSDAY)))); - model = BinaryData.fromObject(model).toObject(ScheduleBasedConfig.class); - Assertions.assertEquals("bsrfbj", model.timeZone()); - Assertions.assertEquals(891212878, model.defaultCount()); - Assertions.assertEquals("w", model.schedules().get(0).startTime()); - Assertions.assertEquals("sotftpvj", model.schedules().get(0).endTime()); - Assertions.assertEquals(1235013026, model.schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.TUESDAY, model.schedules().get(0).days().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java deleted file mode 100644 index 7aefd8191619..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Schedule model = BinaryData.fromString( - "{\"startTime\":\"znfqqnvwpmqtar\",\"endTime\":\"oujmkcjhwqytj\",\"count\":734102755,\"days\":[\"Saturday\"]}") - .toObject(Schedule.class); - Assertions.assertEquals("znfqqnvwpmqtar", model.startTime()); - Assertions.assertEquals("oujmkcjhwqytj", model.endTime()); - Assertions.assertEquals(734102755, model.count()); - Assertions.assertEquals(ScheduleDay.SATURDAY, model.days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Schedule model = new Schedule().withStartTime("znfqqnvwpmqtar") - .withEndTime("oujmkcjhwqytj") - .withCount(734102755) - .withDays(Arrays.asList(ScheduleDay.SATURDAY)); - model = BinaryData.fromObject(model).toObject(Schedule.class); - Assertions.assertEquals("znfqqnvwpmqtar", model.startTime()); - Assertions.assertEquals("oujmkcjhwqytj", model.endTime()); - Assertions.assertEquals(734102755, model.count()); - Assertions.assertEquals(ScheduleDay.SATURDAY, model.days().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java deleted file mode 100644 index d365d5ed90f0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ScriptActionProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScriptActionProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptActionProfile model = BinaryData.fromString( - "{\"type\":\"nqxwbp\",\"name\":\"kulpiujwaasi\",\"url\":\"qiiobyuqer\",\"parameters\":\"lp\",\"services\":[\"cciuqgbdbutau\",\"fbtkuwhhmhyk\",\"joxafnndlpi\"],\"timeoutInMinutes\":1639639314,\"shouldPersist\":false}") - .toObject(ScriptActionProfile.class); - Assertions.assertEquals("nqxwbp", model.type()); - Assertions.assertEquals("kulpiujwaasi", model.name()); - Assertions.assertEquals("qiiobyuqer", model.url()); - Assertions.assertEquals("lp", model.parameters()); - Assertions.assertEquals("cciuqgbdbutau", model.services().get(0)); - Assertions.assertEquals(1639639314, model.timeoutInMinutes()); - Assertions.assertEquals(false, model.shouldPersist()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptActionProfile model = new ScriptActionProfile().withType("nqxwbp") - .withName("kulpiujwaasi") - .withUrl("qiiobyuqer") - .withParameters("lp") - .withServices(Arrays.asList("cciuqgbdbutau", "fbtkuwhhmhyk", "joxafnndlpi")) - .withTimeoutInMinutes(1639639314) - .withShouldPersist(false); - model = BinaryData.fromObject(model).toObject(ScriptActionProfile.class); - Assertions.assertEquals("nqxwbp", model.type()); - Assertions.assertEquals("kulpiujwaasi", model.name()); - Assertions.assertEquals("qiiobyuqer", model.url()); - Assertions.assertEquals("lp", model.parameters()); - Assertions.assertEquals("cciuqgbdbutau", model.services().get(0)); - Assertions.assertEquals(1639639314, model.timeoutInMinutes()); - Assertions.assertEquals(false, model.shouldPersist()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java deleted file mode 100644 index 366adf101195..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResultValueEntity; -import org.junit.jupiter.api.Assertions; - -public final class ServiceConfigListResultValueEntityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceConfigListResultValueEntity model - = BinaryData.fromString("{\"value\":\"kfwynw\",\"description\":\"tbvkayhmtnvyq\"}") - .toObject(ServiceConfigListResultValueEntity.class); - Assertions.assertEquals("kfwynw", model.value()); - Assertions.assertEquals("tbvkayhmtnvyq", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceConfigListResultValueEntity model - = new ServiceConfigListResultValueEntity().withValue("kfwynw").withDescription("tbvkayhmtnvyq"); - model = BinaryData.fromObject(model).toObject(ServiceConfigListResultValueEntity.class); - Assertions.assertEquals("kfwynw", model.value()); - Assertions.assertEquals("tbvkayhmtnvyq", model.description()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java deleted file mode 100644 index 4678e24f4807..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import org.junit.jupiter.api.Assertions; - -public final class ServiceStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceStatus model - = BinaryData.fromString("{\"kind\":\"wnopqgikyzirtx\",\"ready\":\"yuxzejntpsewgi\",\"message\":\"l\"}") - .toObject(ServiceStatus.class); - Assertions.assertEquals("wnopqgikyzirtx", model.kind()); - Assertions.assertEquals("yuxzejntpsewgi", model.ready()); - Assertions.assertEquals("l", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceStatus model - = new ServiceStatus().withKind("wnopqgikyzirtx").withReady("yuxzejntpsewgi").withMessage("l"); - model = BinaryData.fromObject(model).toObject(ServiceStatus.class); - Assertions.assertEquals("wnopqgikyzirtx", model.kind()); - Assertions.assertEquals("yuxzejntpsewgi", model.ready()); - Assertions.assertEquals("l", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java deleted file mode 100644 index a9661d5a23c6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugin; -import org.junit.jupiter.api.Assertions; - -public final class SparkUserPluginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkUserPlugin model = BinaryData.fromString("{\"path\":\"mutwuoe\"}").toObject(SparkUserPlugin.class); - Assertions.assertEquals("mutwuoe", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkUserPlugin model = new SparkUserPlugin().withPath("mutwuoe"); - model = BinaryData.fromObject(model).toObject(SparkUserPlugin.class); - Assertions.assertEquals("mutwuoe", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java deleted file mode 100644 index c0fdb6ae4121..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugin; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugins; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SparkUserPluginsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkUserPlugins model - = BinaryData.fromString("{\"plugins\":[{\"path\":\"xcxrsl\"}]}").toObject(SparkUserPlugins.class); - Assertions.assertEquals("xcxrsl", model.plugins().get(0).path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkUserPlugins model - = new SparkUserPlugins().withPlugins(Arrays.asList(new SparkUserPlugin().withPath("xcxrsl"))); - model = BinaryData.fromObject(model).toObject(SparkUserPlugins.class); - Assertions.assertEquals("xcxrsl", model.plugins().get(0).path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java deleted file mode 100644 index 15c48b334e1b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SshConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class SshConnectivityEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SshConnectivityEndpoint model - = BinaryData.fromString("{\"endpoint\":\"ppcqeqxolz\",\"privateSshEndpoint\":\"hzxct\"}") - .toObject(SshConnectivityEndpoint.class); - Assertions.assertEquals("ppcqeqxolz", model.endpoint()); - Assertions.assertEquals("hzxct", model.privateSshEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SshConnectivityEndpoint model - = new SshConnectivityEndpoint().withEndpoint("ppcqeqxolz").withPrivateSshEndpoint("hzxct"); - model = BinaryData.fromObject(model).toObject(SshConnectivityEndpoint.class); - Assertions.assertEquals("ppcqeqxolz", model.endpoint()); - Assertions.assertEquals("hzxct", model.privateSshEndpoint()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java deleted file mode 100644 index cc78d0847748..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import org.junit.jupiter.api.Assertions; - -public final class SshProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SshProfile model - = BinaryData.fromString("{\"count\":1194461063,\"podPrefix\":\"fqjhhkxbpvjymj\",\"vmSize\":\"xjyngudivk\"}") - .toObject(SshProfile.class); - Assertions.assertEquals(1194461063, model.count()); - Assertions.assertEquals("xjyngudivk", model.vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SshProfile model = new SshProfile().withCount(1194461063).withVmSize("xjyngudivk"); - model = BinaryData.fromObject(model).toObject(SshProfile.class); - Assertions.assertEquals(1194461063, model.count()); - Assertions.assertEquals("xjyngudivk", model.vmSize()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java deleted file mode 100644 index 32242ac7618c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TagsObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TagsObject model = BinaryData.fromString("{\"tags\":{\"zndlikwy\":\"gou\",\"bmadgak\":\"kgfg\"}}") - .toObject(TagsObject.class); - Assertions.assertEquals("gou", model.tags().get("zndlikwy")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TagsObject model = new TagsObject().withTags(mapOf("zndlikwy", "gou", "bmadgak", "kgfg")); - model = BinaryData.fromObject(model).toObject(TagsObject.class); - Assertions.assertEquals("gou", model.tags().get("zndlikwy")); - } - - // 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/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java deleted file mode 100644 index d61b97625327..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoCoordinator; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoDebugConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoCoordinatorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoCoordinator model = BinaryData - .fromString( - "{\"debug\":{\"enable\":true,\"port\":353281330,\"suspend\":false},\"highAvailabilityEnabled\":false}") - .toObject(TrinoCoordinator.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(353281330, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - Assertions.assertEquals(false, model.highAvailabilityEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoCoordinator model = new TrinoCoordinator() - .withDebug(new TrinoDebugConfig().withEnable(true).withPort(353281330).withSuspend(false)) - .withHighAvailabilityEnabled(false); - model = BinaryData.fromObject(model).toObject(TrinoCoordinator.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(353281330, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - Assertions.assertEquals(false, model.highAvailabilityEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java deleted file mode 100644 index 63ddec2191a9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoDebugConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoDebugConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoDebugConfig model = BinaryData.fromString("{\"enable\":true,\"port\":1319718925,\"suspend\":true}") - .toObject(TrinoDebugConfig.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(1319718925, model.port()); - Assertions.assertEquals(true, model.suspend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoDebugConfig model = new TrinoDebugConfig().withEnable(true).withPort(1319718925).withSuspend(true); - model = BinaryData.fromObject(model).toObject(TrinoDebugConfig.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(1319718925, model.port()); - Assertions.assertEquals(true, model.suspend()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java deleted file mode 100644 index 27c21e4d4dc9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoTelemetryConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoTelemetryConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoTelemetryConfig model = BinaryData.fromString( - "{\"hivecatalogName\":\"eotg\",\"hivecatalogSchema\":\"l\",\"partitionRetentionInDays\":1147743130,\"path\":\"wlauwzizxbmpg\"}") - .toObject(TrinoTelemetryConfig.class); - Assertions.assertEquals("eotg", model.hivecatalogName()); - Assertions.assertEquals("l", model.hivecatalogSchema()); - Assertions.assertEquals(1147743130, model.partitionRetentionInDays()); - Assertions.assertEquals("wlauwzizxbmpg", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoTelemetryConfig model = new TrinoTelemetryConfig().withHivecatalogName("eotg") - .withHivecatalogSchema("l") - .withPartitionRetentionInDays(1147743130) - .withPath("wlauwzizxbmpg"); - model = BinaryData.fromObject(model).toObject(TrinoTelemetryConfig.class); - Assertions.assertEquals("eotg", model.hivecatalogName()); - Assertions.assertEquals("l", model.hivecatalogSchema()); - Assertions.assertEquals(1147743130, model.partitionRetentionInDays()); - Assertions.assertEquals("wlauwzizxbmpg", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java deleted file mode 100644 index 795f0def36e9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugin; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserPluginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserPlugin model - = BinaryData.fromString("{\"enabled\":false,\"name\":\"kwobdagxtibq\",\"path\":\"bxwakbog\"}") - .toObject(TrinoUserPlugin.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("kwobdagxtibq", model.name()); - Assertions.assertEquals("bxwakbog", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserPlugin model = new TrinoUserPlugin().withEnabled(false).withName("kwobdagxtibq").withPath("bxwakbog"); - model = BinaryData.fromObject(model).toObject(TrinoUserPlugin.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("kwobdagxtibq", model.name()); - Assertions.assertEquals("bxwakbog", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java deleted file mode 100644 index a56890957cfb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugin; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugins; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserPluginsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserPlugins model = BinaryData - .fromString("{\"plugins\":[{\"enabled\":false,\"name\":\"nsikvmkqzeqqkdl\",\"path\":\"zxmhhvhgu\"}]}") - .toObject(TrinoUserPlugins.class); - Assertions.assertEquals(false, model.plugins().get(0).enabled()); - Assertions.assertEquals("nsikvmkqzeqqkdl", model.plugins().get(0).name()); - Assertions.assertEquals("zxmhhvhgu", model.plugins().get(0).path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserPlugins model = new TrinoUserPlugins().withPlugins( - Arrays.asList(new TrinoUserPlugin().withEnabled(false).withName("nsikvmkqzeqqkdl").withPath("zxmhhvhgu"))); - model = BinaryData.fromObject(model).toObject(TrinoUserPlugins.class); - Assertions.assertEquals(false, model.plugins().get(0).enabled()); - Assertions.assertEquals("nsikvmkqzeqqkdl", model.plugins().get(0).name()); - Assertions.assertEquals("zxmhhvhgu", model.plugins().get(0).path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java deleted file mode 100644 index 389ca03138de..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoTelemetryConfig; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserTelemetry; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserTelemetryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserTelemetry model = BinaryData.fromString( - "{\"storage\":{\"hivecatalogName\":\"dlkzgxhuri\",\"hivecatalogSchema\":\"bpodxunkbebxm\",\"partitionRetentionInDays\":1347899854,\"path\":\"ntwlrbqtkoie\"}}") - .toObject(TrinoUserTelemetry.class); - Assertions.assertEquals("dlkzgxhuri", model.storage().hivecatalogName()); - Assertions.assertEquals("bpodxunkbebxm", model.storage().hivecatalogSchema()); - Assertions.assertEquals(1347899854, model.storage().partitionRetentionInDays()); - Assertions.assertEquals("ntwlrbqtkoie", model.storage().path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserTelemetry model - = new TrinoUserTelemetry().withStorage(new TrinoTelemetryConfig().withHivecatalogName("dlkzgxhuri") - .withHivecatalogSchema("bpodxunkbebxm") - .withPartitionRetentionInDays(1347899854) - .withPath("ntwlrbqtkoie")); - model = BinaryData.fromObject(model).toObject(TrinoUserTelemetry.class); - Assertions.assertEquals("dlkzgxhuri", model.storage().hivecatalogName()); - Assertions.assertEquals("bpodxunkbebxm", model.storage().hivecatalogSchema()); - Assertions.assertEquals(1347899854, model.storage().partitionRetentionInDays()); - Assertions.assertEquals("ntwlrbqtkoie", model.storage().path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java deleted file mode 100644 index 8b08117b2bf7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoDebugConfig; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoWorker; -import org.junit.jupiter.api.Assertions; - -public final class TrinoWorkerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoWorker model = BinaryData.fromString("{\"debug\":{\"enable\":true,\"port\":1935648017,\"suspend\":false}}") - .toObject(TrinoWorker.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(1935648017, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoWorker model = new TrinoWorker() - .withDebug(new TrinoDebugConfig().withEnable(true).withPort(1935648017).withSuspend(false)); - model = BinaryData.fromObject(model).toObject(TrinoWorker.class); - Assertions.assertEquals(true, model.debug().enable()); - Assertions.assertEquals(1935648017, model.debug().port()); - Assertions.assertEquals(false, model.debug().suspend()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java deleted file mode 100644 index 16b8333ee2d2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.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.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.WebConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class WebConnectivityEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebConnectivityEndpoint model = BinaryData.fromString("{\"fqdn\":\"pfqbuaceopzf\",\"privateFqdn\":\"hhuao\"}") - .toObject(WebConnectivityEndpoint.class); - Assertions.assertEquals("pfqbuaceopzf", model.fqdn()); - Assertions.assertEquals("hhuao", model.privateFqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebConnectivityEndpoint model = new WebConnectivityEndpoint().withFqdn("pfqbuaceopzf").withPrivateFqdn("hhuao"); - model = BinaryData.fromObject(model).toObject(WebConnectivityEndpoint.class); - Assertions.assertEquals("pfqbuaceopzf", model.fqdn()); - Assertions.assertEquals("hhuao", model.privateFqdn()); - } -}