diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md index e2afcee43423..d5ab15ab443e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2023-04-27) + +- Azure Resource Manager HDInsight client library for Java. This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/README.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/README.md index 93b5c3c5ffa8..1020f390d9c8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/README.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/README.md @@ -2,7 +2,7 @@ Azure Resource Manager HDInsight client library for Java. -This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-2021-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-hdinsight - 1.0.0 + 1.1.0-beta.1 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md index 7cac34846c3e..e8e232d28c93 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md @@ -101,7 +101,7 @@ import java.util.Arrays; /** Samples for Applications Create. */ public final class ApplicationsCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateApplication.json */ /** * Sample code: Create Application. @@ -150,12 +150,10 @@ public final class ApplicationsCreateSamples { ### Applications_Delete ```java -import com.azure.core.util.Context; - /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteApplication.json */ /** * Sample code: Delete Application from HDInsight cluster. @@ -164,7 +162,7 @@ public final class ApplicationsDeleteSamples { */ public static void deleteApplicationFromHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().delete("rg1", "cluster1", "hue", Context.NONE); + manager.applications().delete("rg1", "cluster1", "hue", com.azure.core.util.Context.NONE); } } ``` @@ -172,12 +170,10 @@ public final class ApplicationsDeleteSamples { ### Applications_Get ```java -import com.azure.core.util.Context; - /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationInProgress.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationInProgress.json */ /** * Sample code: Get application on HDInsight cluster creation in progress. @@ -186,11 +182,11 @@ public final class ApplicationsGetSamples { */ public static void getApplicationOnHDInsightClusterCreationInProgress( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().getWithResponse("rg1", "cluster1", "app", Context.NONE); + manager.applications().getWithResponse("rg1", "cluster1", "app", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreated.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreated.json */ /** * Sample code: Get application on HDInsight cluster successfully created. @@ -199,7 +195,7 @@ public final class ApplicationsGetSamples { */ public static void getApplicationOnHDInsightClusterSuccessfullyCreated( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().getWithResponse("rg1", "cluster1", "app", Context.NONE); + manager.applications().getWithResponse("rg1", "cluster1", "app", com.azure.core.util.Context.NONE); } } ``` @@ -207,12 +203,10 @@ public final class ApplicationsGetSamples { ### Applications_GetAzureAsyncOperationStatus ```java -import com.azure.core.util.Context; - /** Samples for Applications GetAzureAsyncOperationStatus. */ public final class ApplicationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json */ /** * Sample code: Get the azure async operation status. @@ -223,7 +217,7 @@ public final class ApplicationsGetAzureAsyncOperationStatusSamples { manager .applications() .getAzureAsyncOperationStatusWithResponse( - "rg1", "cluster1", "app", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "app", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } ``` @@ -231,12 +225,10 @@ public final class ApplicationsGetAzureAsyncOperationStatusSamples { ### Applications_ListByCluster ```java -import com.azure.core.util.Context; - /** Samples for Applications ListByCluster. */ public final class ApplicationsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllApplications.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllApplications.json */ /** * Sample code: Get All Applications for an HDInsight cluster. @@ -245,7 +237,7 @@ public final class ApplicationsListByClusterSamples { */ public static void getAllApplicationsForAnHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().listByCluster("rg1", "cluster1", Context.NONE); + manager.applications().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -293,7 +285,7 @@ import java.util.Map; /** Samples for Clusters Create. */ public final class ClustersCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPassword.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH password. @@ -369,12 +361,13 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateKafkaClusterWithKafkaRestProxy.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json */ /** * Sample code: Create Kafka cluster with Kafka Rest Proxy. @@ -465,12 +458,13 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAutoscaleConfig.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json */ /** * Sample code: Create HDInsight cluster with Autoscale configuration. @@ -582,12 +576,13 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("hdinsight-autoscale-tes-2019-06-18t05-49-16-591z") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPublicKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPublicKey.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH public key. @@ -670,12 +665,13 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAvailabilityZones.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json */ /** * Sample code: Create cluster with availability zones. @@ -783,12 +779,13 @@ public final class ClustersCreateSamples { .withName("mystorage") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopAdlsGen2.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopAdlsGen2.json */ /** * Sample code: Create Hadoop cluster with Azure Data Lake Storage Gen 2. @@ -864,12 +861,13 @@ public final class ClustersCreateSamples { .withName("mystorage.dfs.core.windows.net") .withIsDefault(true) .withFileSystem("default") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSecureHadoop.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSecureHadoop.json */ /** * Sample code: Create Secure Hadoop cluster. @@ -999,12 +997,13 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxSparkSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxSparkSshPassword.json */ /** * Sample code: Create Spark on Linux Cluster with SSH password. @@ -1070,12 +1069,13 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithCustomNetworkProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json */ /** * Sample code: Create cluster with network properties. @@ -1164,7 +1164,8 @@ public final class ClustersCreateSamples { .withName("mystorage") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withNetworkProperties( new NetworkProperties() .withResourceProviderConnection(ResourceProviderConnection.OUTBOUND) @@ -1173,7 +1174,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithTLS12.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithTLS12.json */ /** * Sample code: Create cluster with TLS 1.2. @@ -1245,13 +1246,14 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("default8525") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withMinSupportedTlsVersion("1.2")) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionAtHost.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json */ /** * Sample code: Create cluster with encryption at host. @@ -1323,13 +1325,14 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("default8525") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withDiskEncryptionProperties(new DiskEncryptionProperties().withEncryptionAtHost(true))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionInTransit.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json */ /** * Sample code: Create cluster with encryption in transit. @@ -1401,14 +1404,15 @@ public final class ClustersCreateSamples { .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("default8525") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withEncryptionInTransitProperties( new EncryptionInTransitProperties().withIsEncryptionInTransitEnabled(true))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithComputeIsolationProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json */ /** * Sample code: Create cluster with compute isolation properties. @@ -1485,7 +1489,8 @@ public final class ClustersCreateSamples { .withName("mystorage") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withComputeIsolationProperties(new ComputeIsolationProperties().withEnableComputeIsolation(true))) .create(); } @@ -1506,12 +1511,10 @@ public final class ClustersCreateSamples { ### Clusters_Delete ```java -import com.azure.core.util.Context; - /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteLinuxHadoopCluster.json */ /** * Sample code: Delete Hadoop on Linux cluster. @@ -1519,7 +1522,7 @@ public final class ClustersDeleteSamples { * @param manager Entry point to HDInsightManager. */ public static void deleteHadoopOnLinuxCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().delete("rg1", "cluster1", Context.NONE); + manager.clusters().delete("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1527,7 +1530,6 @@ public final class ClustersDeleteSamples { ### Clusters_ExecuteScriptActions ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ExecuteScriptActionParameters; import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction; import java.util.Arrays; @@ -1535,7 +1537,7 @@ import java.util.Arrays; /** Samples for Clusters ExecuteScriptActions. */ public final class ClustersExecuteScriptActionsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PostExecuteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PostExecuteScriptAction.json */ /** * Sample code: Execute script action on HDInsight cluster. @@ -1559,7 +1561,7 @@ public final class ClustersExecuteScriptActionsSamples { .withParameters("") .withRoles(Arrays.asList("headnode", "workernode")))) .withPersistOnSuccess(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1567,12 +1569,10 @@ public final class ClustersExecuteScriptActionsSamples { ### Clusters_GetAzureAsyncOperationStatus ```java -import com.azure.core.util.Context; - /** Samples for Clusters GetAzureAsyncOperationStatus. */ public final class ClustersGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterCreatingAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json */ /** * Sample code: Get Async Operation Status of Creating Cluster. @@ -1584,7 +1584,7 @@ public final class ClustersGetAzureAsyncOperationStatusSamples { manager .clusters() .getAzureAsyncOperationStatusWithResponse( - "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } ``` @@ -1592,12 +1592,10 @@ public final class ClustersGetAzureAsyncOperationStatusSamples { ### Clusters_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopCluster.json */ /** * Sample code: Get Hadoop on Linux cluster. @@ -1605,11 +1603,11 @@ public final class ClustersGetByResourceGroupSamples { * @param manager Entry point to HDInsightManager. */ public static void getHadoopOnLinuxCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", Context.NONE); + manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxSparkCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxSparkCluster.json */ /** * Sample code: Get Spark on Linux cluster. @@ -1617,7 +1615,7 @@ public final class ClustersGetByResourceGroupSamples { * @param manager Entry point to HDInsightManager. */ public static void getSparkOnLinuxCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", Context.NONE); + manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1625,12 +1623,10 @@ public final class ClustersGetByResourceGroupSamples { ### Clusters_GetGatewaySettings ```java -import com.azure.core.util.Context; - /** Samples for Clusters GetGatewaySettings. */ public final class ClustersGetGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_GetGatewaySettings.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_GetGatewaySettings.json */ /** * Sample code: Get HTTP settings. @@ -1638,7 +1634,7 @@ public final class ClustersGetGatewaySettingsSamples { * @param manager Entry point to HDInsightManager. */ public static void getHTTPSettings(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().getGatewaySettingsWithResponse("rg1", "cluster1", Context.NONE); + manager.clusters().getGatewaySettingsWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1646,12 +1642,10 @@ public final class ClustersGetGatewaySettingsSamples { ### Clusters_List ```java -import com.azure.core.util.Context; - /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClusters.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClusters.json */ /** * Sample code: Get All Hadoop on Linux clusters. @@ -1659,7 +1653,7 @@ public final class ClustersListSamples { * @param manager Entry point to HDInsightManager. */ public static void getAllHadoopOnLinuxClusters(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().list(Context.NONE); + manager.clusters().list(com.azure.core.util.Context.NONE); } } ``` @@ -1667,12 +1661,10 @@ public final class ClustersListSamples { ### Clusters_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClustersInResourceGroup.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json */ /** * Sample code: Get All Hadoop on Linux clusters in a resource group. @@ -1681,7 +1673,7 @@ public final class ClustersListByResourceGroupSamples { */ public static void getAllHadoopOnLinuxClustersInAResourceGroup( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().listByResourceGroup("rg1", Context.NONE); + manager.clusters().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } ``` @@ -1689,14 +1681,13 @@ public final class ClustersListByResourceGroupSamples { ### Clusters_Resize ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ClusterResizeParameters; import com.azure.resourcemanager.hdinsight.models.RoleName; /** Samples for Clusters Resize. */ public final class ClustersResizeSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ResizeLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ResizeLinuxHadoopCluster.json */ /** * Sample code: Resize the worker nodes for a Hadoop on Linux cluster. @@ -1712,7 +1703,7 @@ public final class ClustersResizeSamples { "cluster1", RoleName.WORKERNODE, new ClusterResizeParameters().withTargetInstanceCount(10), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1720,13 +1711,12 @@ public final class ClustersResizeSamples { ### Clusters_RotateDiskEncryptionKey ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ClusterDiskEncryptionParameters; /** Samples for Clusters RotateDiskEncryptionKey. */ public final class ClustersRotateDiskEncryptionKeySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json */ /** * Sample code: Rotate disk encryption key of the specified HDInsight cluster. @@ -1744,7 +1734,7 @@ public final class ClustersRotateDiskEncryptionKeySamples { .withVaultUri("https://newkeyvault.vault.azure.net/") .withKeyName("fakeTokenPlaceholder") .withKeyVersion("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1752,7 +1742,6 @@ public final class ClustersRotateDiskEncryptionKeySamples { ### Clusters_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.Cluster; import java.util.HashMap; import java.util.Map; @@ -1760,7 +1749,7 @@ import java.util.Map; /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PatchLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PatchLinuxHadoopCluster.json */ /** * Sample code: Patch HDInsight Linux clusters. @@ -1769,7 +1758,10 @@ public final class ClustersUpdateSamples { */ public static void patchHDInsightLinuxClusters(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { Cluster resource = - manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", Context.NONE).getValue(); + manager + .clusters() + .getByResourceGroupWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("key1", "val1", "key2", "val2")).apply(); } @@ -1789,7 +1781,6 @@ public final class ClustersUpdateSamples { ### Clusters_UpdateAutoScaleConfiguration ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.Autoscale; import com.azure.resourcemanager.hdinsight.models.AutoscaleCapacity; import com.azure.resourcemanager.hdinsight.models.AutoscaleConfigurationUpdateParameter; @@ -1803,7 +1794,7 @@ import java.util.Arrays; /** Samples for Clusters UpdateAutoScaleConfiguration. */ public final class ClustersUpdateAutoScaleConfigurationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the load based configuration for HDInsight cluster. @@ -1822,11 +1813,11 @@ public final class ClustersUpdateAutoScaleConfigurationSamples { .withAutoscale( new Autoscale() .withCapacity(new AutoscaleCapacity().withMinInstanceCount(3).withMaxInstanceCount(5))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableClusterAutoScale.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableClusterAutoScale.json */ /** * Sample code: Disable Autoscale for the HDInsight cluster. @@ -1838,11 +1829,15 @@ public final class ClustersUpdateAutoScaleConfigurationSamples { manager .clusters() .updateAutoScaleConfiguration( - "rg1", "cluster1", RoleName.WORKERNODE, new AutoscaleConfigurationUpdateParameter(), Context.NONE); + "rg1", + "cluster1", + RoleName.WORKERNODE, + new AutoscaleConfigurationUpdateParameter(), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the schedule based configuration for HDInsight cluster. @@ -1873,7 +1868,7 @@ public final class ClustersUpdateAutoScaleConfigurationSamples { .withTime("16:00") .withMinInstanceCount(4) .withMaxInstanceCount(4)))))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1881,13 +1876,12 @@ public final class ClustersUpdateAutoScaleConfigurationSamples { ### Clusters_UpdateGatewaySettings ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.UpdateGatewaySettingsParameters; /** Samples for Clusters UpdateGatewaySettings. */ public final class ClustersUpdateGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json */ /** * Sample code: Enable HTTP connectivity. @@ -1897,7 +1891,8 @@ public final class ClustersUpdateGatewaySettingsSamples { public static void enableHTTPConnectivity(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .clusters() - .updateGatewaySettings("rg1", "cluster1", new UpdateGatewaySettingsParameters(), Context.NONE); + .updateGatewaySettings( + "rg1", "cluster1", new UpdateGatewaySettingsParameters(), com.azure.core.util.Context.NONE); } } ``` @@ -1905,13 +1900,12 @@ public final class ClustersUpdateGatewaySettingsSamples { ### Clusters_UpdateIdentityCertificate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.UpdateClusterIdentityCertificateParameters; /** Samples for Clusters UpdateIdentityCertificate. */ public final class ClustersUpdateIdentityCertificateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json */ /** * Sample code: Update cluster identity certificate. @@ -1928,7 +1922,7 @@ public final class ClustersUpdateIdentityCertificateSamples { .withApplicationId("applicationId") .withCertificate("base64encodedcertificate") .withCertificatePassword("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1936,12 +1930,10 @@ public final class ClustersUpdateIdentityCertificateSamples { ### Configurations_Get ```java -import com.azure.core.util.Context; - /** Samples for Configurations Get. */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_Get.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_Get.json */ /** * Sample code: Get Core site settings. @@ -1949,7 +1941,7 @@ public final class ConfigurationsGetSamples { * @param manager Entry point to HDInsightManager. */ public static void getCoreSiteSettings(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.configurations().getWithResponse("rg1", "cluster1", "core-site", Context.NONE); + manager.configurations().getWithResponse("rg1", "cluster1", "core-site", com.azure.core.util.Context.NONE); } } ``` @@ -1957,12 +1949,10 @@ public final class ConfigurationsGetSamples { ### Configurations_List ```java -import com.azure.core.util.Context; - /** Samples for Configurations List. */ public final class ConfigurationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_List.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_List.json */ /** * Sample code: Get all configuration information. @@ -1970,7 +1960,7 @@ public final class ConfigurationsListSamples { * @param manager Entry point to HDInsightManager. */ public static void getAllConfigurationInformation(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.configurations().listWithResponse("rg1", "cluster1", Context.NONE); + manager.configurations().listWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -1978,14 +1968,13 @@ public final class ConfigurationsListSamples { ### Configurations_Update ```java -import com.azure.core.util.Context; import java.util.HashMap; import java.util.Map; /** Samples for Configurations Update. */ public final class ConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityEnable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityEnable.json */ /** * Sample code: Enable HTTP connectivity. @@ -2006,11 +1995,11 @@ public final class ConfigurationsUpdateSamples { "**********", "restAuthCredential.username", "hadoop"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityDisable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityDisable.json */ /** * Sample code: Disable HTTP connectivity. @@ -2020,7 +2009,12 @@ public final class ConfigurationsUpdateSamples { public static void disableHTTPConnectivity(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .configurations() - .update("rg1", "cluster1", "gateway", mapOf("restAuthCredential.isEnabled", "false"), Context.NONE); + .update( + "rg1", + "cluster1", + "gateway", + mapOf("restAuthCredential.isEnabled", "false"), + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -2039,13 +2033,12 @@ public final class ConfigurationsUpdateSamples { ### Extensions_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.Extension; /** Samples for Extensions Create. */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateExtension.json */ /** * Sample code: Create a monitoring extension on Hadoop Linux cluster. @@ -2063,7 +2056,7 @@ public final class ExtensionsCreateSamples { new Extension() .withWorkspaceId("a2090ead-8c9f-4fba-b70e-533e3e003163") .withPrimaryKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2071,12 +2064,10 @@ public final class ExtensionsCreateSamples { ### Extensions_Delete ```java -import com.azure.core.util.Context; - /** Samples for Extensions Delete. */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteExtension.json */ /** * Sample code: Delete an extension. @@ -2084,7 +2075,7 @@ public final class ExtensionsDeleteSamples { * @param manager Entry point to HDInsightManager. */ public static void deleteAnExtension(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().delete("rg1", "cluster1", "clustermonitoring", Context.NONE); + manager.extensions().delete("rg1", "cluster1", "clustermonitoring", com.azure.core.util.Context.NONE); } } ``` @@ -2092,12 +2083,10 @@ public final class ExtensionsDeleteSamples { ### Extensions_DisableAzureMonitor ```java -import com.azure.core.util.Context; - /** Samples for Extensions DisableAzureMonitor. */ public final class ExtensionsDisableAzureMonitorSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. @@ -2105,7 +2094,7 @@ public final class ExtensionsDisableAzureMonitorSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().disableAzureMonitor("rg1", "cluster1", Context.NONE); + manager.extensions().disableAzureMonitor("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2113,12 +2102,10 @@ public final class ExtensionsDisableAzureMonitorSamples { ### Extensions_DisableMonitoring ```java -import com.azure.core.util.Context; - /** Samples for Extensions DisableMonitoring. */ public final class ExtensionsDisableMonitoringSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. @@ -2126,7 +2113,7 @@ public final class ExtensionsDisableMonitoringSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().disableMonitoring("rg1", "cluster1", Context.NONE); + manager.extensions().disableMonitoring("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2134,13 +2121,12 @@ public final class ExtensionsDisableMonitoringSamples { ### Extensions_EnableAzureMonitor ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.AzureMonitorRequest; /** Samples for Extensions EnableAzureMonitor. */ public final class ExtensionsEnableAzureMonitorSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. @@ -2156,7 +2142,7 @@ public final class ExtensionsEnableAzureMonitorSamples { new AzureMonitorRequest() .withWorkspaceId("a2090ead-8c9f-4fba-b70e-533e3e003163") .withPrimaryKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2164,13 +2150,12 @@ public final class ExtensionsEnableAzureMonitorSamples { ### Extensions_EnableMonitoring ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ClusterMonitoringRequest; /** Samples for Extensions EnableMonitoring. */ public final class ExtensionsEnableMonitoringSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. @@ -2186,7 +2171,7 @@ public final class ExtensionsEnableMonitoringSamples { new ClusterMonitoringRequest() .withWorkspaceId("a2090ead-8c9f-4fba-b70e-533e3e003163") .withPrimaryKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2194,12 +2179,10 @@ public final class ExtensionsEnableMonitoringSamples { ### Extensions_Get ```java -import com.azure.core.util.Context; - /** Samples for Extensions Get. */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtension.json */ /** * Sample code: Get an extension. @@ -2207,7 +2190,7 @@ public final class ExtensionsGetSamples { * @param manager Entry point to HDInsightManager. */ public static void getAnExtension(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().getWithResponse("rg1", "cluster1", "clustermonitoring", Context.NONE); + manager.extensions().getWithResponse("rg1", "cluster1", "clustermonitoring", com.azure.core.util.Context.NONE); } } ``` @@ -2215,12 +2198,10 @@ public final class ExtensionsGetSamples { ### Extensions_GetAzureAsyncOperationStatus ```java -import com.azure.core.util.Context; - /** Samples for Extensions GetAzureAsyncOperationStatus. */ public final class ExtensionsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtensionCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. @@ -2231,7 +2212,11 @@ public final class ExtensionsGetAzureAsyncOperationStatusSamples { manager .extensions() .getAzureAsyncOperationStatusWithResponse( - "rg1", "cluster1", "azuremonitor", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", + "cluster1", + "azuremonitor", + "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", + com.azure.core.util.Context.NONE); } } ``` @@ -2239,12 +2224,10 @@ public final class ExtensionsGetAzureAsyncOperationStatusSamples { ### Extensions_GetAzureMonitorStatus ```java -import com.azure.core.util.Context; - /** Samples for Extensions GetAzureMonitorStatus. */ public final class ExtensionsGetAzureMonitorStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterAzureMonitorStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json */ /** * Sample code: Enable cluster monitoring. @@ -2252,7 +2235,7 @@ public final class ExtensionsGetAzureMonitorStatusSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().getAzureMonitorStatusWithResponse("rg1", "cluster1", Context.NONE); + manager.extensions().getAzureMonitorStatusWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2260,12 +2243,10 @@ public final class ExtensionsGetAzureMonitorStatusSamples { ### Extensions_GetMonitoringStatus ```java -import com.azure.core.util.Context; - /** Samples for Extensions GetMonitoringStatus. */ public final class ExtensionsGetMonitoringStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterMonitoringStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterMonitoringStatus.json */ /** * Sample code: Enable cluster monitoring. @@ -2273,7 +2254,7 @@ public final class ExtensionsGetMonitoringStatusSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().getMonitoringStatusWithResponse("rg1", "cluster1", Context.NONE); + manager.extensions().getMonitoringStatusWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2281,13 +2262,12 @@ public final class ExtensionsGetMonitoringStatusSamples { ### Locations_CheckNameAvailability ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckRequestParameters; /** Samples for Locations CheckNameAvailability. */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_CheckClusterNameAvailability.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json */ /** * Sample code: Get the subscription usages for specific location. @@ -2301,7 +2281,7 @@ public final class LocationsCheckNameAvailabilitySamples { .checkNameAvailabilityWithResponse( "westus", new NameAvailabilityCheckRequestParameters().withName("test123").withType("clusters"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -2309,12 +2289,10 @@ public final class LocationsCheckNameAvailabilitySamples { ### Locations_GetAzureAsyncOperationStatus ```java -import com.azure.core.util.Context; - /** Samples for Locations GetAzureAsyncOperationStatus. */ public final class LocationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_GetAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. @@ -2325,7 +2303,7 @@ public final class LocationsGetAzureAsyncOperationStatusSamples { manager .locations() .getAzureAsyncOperationStatusWithResponse( - "East US 2", "8a0348f4-8a85-4ec2-abe0-03b26104a9a0-0", Context.NONE); + "East US 2", "8a0348f4-8a85-4ec2-abe0-03b26104a9a0-0", com.azure.core.util.Context.NONE); } } ``` @@ -2333,12 +2311,10 @@ public final class LocationsGetAzureAsyncOperationStatusSamples { ### Locations_GetCapabilities ```java -import com.azure.core.util.Context; - /** Samples for Locations GetCapabilities. */ public final class LocationsGetCapabilitiesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightCapabilities.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightCapabilities.json */ /** * Sample code: Get the subscription capabilities for specific location. @@ -2347,7 +2323,7 @@ public final class LocationsGetCapabilitiesSamples { */ public static void getTheSubscriptionCapabilitiesForSpecificLocation( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.locations().getCapabilitiesWithResponse("West US", Context.NONE); + manager.locations().getCapabilitiesWithResponse("West US", com.azure.core.util.Context.NONE); } } ``` @@ -2355,12 +2331,10 @@ public final class LocationsGetCapabilitiesSamples { ### Locations_ListBillingSpecs ```java -import com.azure.core.util.Context; - /** Samples for Locations ListBillingSpecs. */ public final class LocationsListBillingSpecsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ListBillingSpecs.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ListBillingSpecs.json */ /** * Sample code: Get the subscription billingSpecs for the specified location. @@ -2369,7 +2343,7 @@ public final class LocationsListBillingSpecsSamples { */ public static void getTheSubscriptionBillingSpecsForTheSpecifiedLocation( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.locations().listBillingSpecsWithResponse("East US 2", Context.NONE); + manager.locations().listBillingSpecsWithResponse("East US 2", com.azure.core.util.Context.NONE); } } ``` @@ -2377,12 +2351,10 @@ public final class LocationsListBillingSpecsSamples { ### Locations_ListUsages ```java -import com.azure.core.util.Context; - /** Samples for Locations ListUsages. */ public final class LocationsListUsagesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightUsages.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightUsages.json */ /** * Sample code: Get the subscription usages for specific location. @@ -2391,7 +2363,7 @@ public final class LocationsListUsagesSamples { */ public static void getTheSubscriptionUsagesForSpecificLocation( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.locations().listUsagesWithResponse("West US", Context.NONE); + manager.locations().listUsagesWithResponse("West US", com.azure.core.util.Context.NONE); } } ``` @@ -2400,7 +2372,6 @@ public final class LocationsListUsagesSamples { ```java import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.hdinsight.models.ClusterCreateProperties; import com.azure.resourcemanager.hdinsight.models.ClusterCreateRequestValidationParameters; @@ -2422,7 +2393,7 @@ import java.util.Map; /** Samples for Locations ValidateClusterCreateRequest. */ public final class LocationsValidateClusterCreateRequestSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ValidateClusterCreateRequest.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json */ /** * Sample code: Get the subscription usages for specific location. @@ -2508,13 +2479,14 @@ public final class LocationsValidateClusterCreateRequestSamples { .withContainer("contianername") .withKey("fakeTokenPlaceholder") .withResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storagename")))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storagename") + .withEnableSecureChannel(true)))) .withMinSupportedTlsVersion("1.2")) .withName("testclustername") .withType("Microsoft.HDInsight/clusters") .withTenantId("00000000-0000-0000-0000-000000000000") .withFetchAaddsResource(false), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -2533,12 +2505,10 @@ public final class LocationsValidateClusterCreateRequestSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ListHDInsightOperations.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ListHDInsightOperations.json */ /** * Sample code: Lists all of the available operations. @@ -2546,7 +2516,7 @@ public final class OperationsListSamples { * @param manager Entry point to HDInsightManager. */ public static void listsAllOfTheAvailableOperations(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -2560,7 +2530,7 @@ import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionSt /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ApprovePrivateEndpointConnection.json */ /** * Sample code: Approve a private endpoint connection manually. @@ -2586,12 +2556,10 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { ### PrivateEndpointConnections_Delete ```java -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeletePrivateEndpointConnection.json */ /** * Sample code: Delete specific private endpoint connection for a specific HDInsight cluster. @@ -2602,7 +2570,11 @@ public final class PrivateEndpointConnectionsDeleteSamples { com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .privateEndpointConnections() - .delete("rg1", "cluster1", "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", Context.NONE); + .delete( + "rg1", + "cluster1", + "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", + com.azure.core.util.Context.NONE); } } ``` @@ -2610,12 +2582,10 @@ public final class PrivateEndpointConnectionsDeleteSamples { ### PrivateEndpointConnections_Get ```java -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateEndpointConnection.json */ /** * Sample code: Get specific private endpoint connection for a specific HDInsight cluster. @@ -2626,7 +2596,11 @@ public final class PrivateEndpointConnectionsGetSamples { com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .privateEndpointConnections() - .getWithResponse("rg1", "cluster1", "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", Context.NONE); + .getWithResponse( + "rg1", + "cluster1", + "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", + com.azure.core.util.Context.NONE); } } ``` @@ -2634,12 +2608,10 @@ public final class PrivateEndpointConnectionsGetSamples { ### PrivateEndpointConnections_ListByCluster ```java -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnections ListByCluster. */ public final class PrivateEndpointConnectionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateEndpointConnectionsInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json */ /** * Sample code: Get all private endpoint connections for a specific HDInsight cluster. @@ -2648,7 +2620,7 @@ public final class PrivateEndpointConnectionsListByClusterSamples { */ public static void getAllPrivateEndpointConnectionsForASpecificHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.privateEndpointConnections().listByCluster("rg1", "cluster1", Context.NONE); + manager.privateEndpointConnections().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2656,12 +2628,10 @@ public final class PrivateEndpointConnectionsListByClusterSamples { ### PrivateLinkResources_Get ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateLinkResource.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateLinkResource.json */ /** * Sample code: Get specific private link resource in a specific HDInsight cluster. @@ -2670,7 +2640,7 @@ public final class PrivateLinkResourcesGetSamples { */ public static void getSpecificPrivateLinkResourceInASpecificHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.privateLinkResources().getWithResponse("rg1", "cluster1", "gateway", Context.NONE); + manager.privateLinkResources().getWithResponse("rg1", "cluster1", "gateway", com.azure.core.util.Context.NONE); } } ``` @@ -2678,12 +2648,10 @@ public final class PrivateLinkResourcesGetSamples { ### PrivateLinkResources_ListByCluster ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByCluster. */ public final class PrivateLinkResourcesListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateLinkResourcesInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json */ /** * Sample code: Get all private link resources in a specific HDInsight cluster. @@ -2692,7 +2660,7 @@ public final class PrivateLinkResourcesListByClusterSamples { */ public static void getAllPrivateLinkResourcesInASpecificHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.privateLinkResources().listByClusterWithResponse("rg1", "cluster1", Context.NONE); + manager.privateLinkResources().listByClusterWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2700,12 +2668,10 @@ public final class PrivateLinkResourcesListByClusterSamples { ### ScriptActions_Delete ```java -import com.azure.core.util.Context; - /** Samples for ScriptActions Delete. */ public final class ScriptActionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteScriptAction.json */ /** * Sample code: Delete a script action on HDInsight cluster. @@ -2714,7 +2680,7 @@ public final class ScriptActionsDeleteSamples { */ public static void deleteAScriptActionOnHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptActions().deleteWithResponse("rg1", "cluster1", "scriptName", Context.NONE); + manager.scriptActions().deleteWithResponse("rg1", "cluster1", "scriptName", com.azure.core.util.Context.NONE); } } ``` @@ -2722,12 +2688,10 @@ public final class ScriptActionsDeleteSamples { ### ScriptActions_GetExecutionAsyncOperationStatus ```java -import com.azure.core.util.Context; - /** Samples for ScriptActions GetExecutionAsyncOperationStatus. */ public final class ScriptActionsGetExecutionAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json */ /** * Sample code: Gets the async execution operation status. @@ -2739,7 +2703,7 @@ public final class ScriptActionsGetExecutionAsyncOperationStatusSamples { manager .scriptActions() .getExecutionAsyncOperationStatusWithResponse( - "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } ``` @@ -2747,12 +2711,10 @@ public final class ScriptActionsGetExecutionAsyncOperationStatusSamples { ### ScriptActions_GetExecutionDetail ```java -import com.azure.core.util.Context; - /** Samples for ScriptActions GetExecutionDetail. */ public final class ScriptActionsGetExecutionDetailSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptActionById.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptActionById.json */ /** * Sample code: Get script execution history by script id. @@ -2761,7 +2723,9 @@ public final class ScriptActionsGetExecutionDetailSamples { */ public static void getScriptExecutionHistoryByScriptId( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptActions().getExecutionDetailWithResponse("rg1", "cluster1", "391145124054712", Context.NONE); + manager + .scriptActions() + .getExecutionDetailWithResponse("rg1", "cluster1", "391145124054712", com.azure.core.util.Context.NONE); } } ``` @@ -2769,12 +2733,10 @@ public final class ScriptActionsGetExecutionDetailSamples { ### ScriptActions_ListByCluster ```java -import com.azure.core.util.Context; - /** Samples for ScriptActions ListByCluster. */ public final class ScriptActionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopScriptAction.json */ /** * Sample code: List all persisted script actions for the given cluster. @@ -2783,7 +2745,7 @@ public final class ScriptActionsListByClusterSamples { */ public static void listAllPersistedScriptActionsForTheGivenCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptActions().listByCluster("rg1", "cluster1", Context.NONE); + manager.scriptActions().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2791,12 +2753,10 @@ public final class ScriptActionsListByClusterSamples { ### ScriptExecutionHistory_ListByCluster ```java -import com.azure.core.util.Context; - /** Samples for ScriptExecutionHistory ListByCluster. */ public final class ScriptExecutionHistoryListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionHistory.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionHistory.json */ /** * Sample code: Get Script Execution History List. @@ -2804,7 +2764,7 @@ public final class ScriptExecutionHistoryListByClusterSamples { * @param manager Entry point to HDInsightManager. */ public static void getScriptExecutionHistoryList(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptExecutionHistories().listByCluster("rg1", "cluster1", Context.NONE); + manager.scriptExecutionHistories().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2812,12 +2772,10 @@ public final class ScriptExecutionHistoryListByClusterSamples { ### ScriptExecutionHistory_Promote ```java -import com.azure.core.util.Context; - /** Samples for ScriptExecutionHistory Promote. */ public final class ScriptExecutionHistoryPromoteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PromoteLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PromoteLinuxHadoopScriptAction.json */ /** * Sample code: Promote a script action on HDInsight cluster. @@ -2826,7 +2784,9 @@ public final class ScriptExecutionHistoryPromoteSamples { */ public static void promoteAScriptActionOnHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptExecutionHistories().promoteWithResponse("rg1", "cluster1", "391145124054712", Context.NONE); + manager + .scriptExecutionHistories() + .promoteWithResponse("rg1", "cluster1", "391145124054712", com.azure.core.util.Context.NONE); } } ``` @@ -2834,12 +2794,10 @@ public final class ScriptExecutionHistoryPromoteSamples { ### VirtualMachines_GetAsyncOperationStatus ```java -import com.azure.core.util.Context; - /** Samples for VirtualMachines GetAsyncOperationStatus. */ public final class VirtualMachinesGetAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetRestartHostsAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetRestartHostsAsyncOperationStatus.json */ /** * Sample code: Gets the async operation status of restarting host. @@ -2851,7 +2809,7 @@ public final class VirtualMachinesGetAsyncOperationStatusSamples { manager .virtualMachines() .getAsyncOperationStatusWithResponse( - "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } ``` @@ -2859,12 +2817,10 @@ public final class VirtualMachinesGetAsyncOperationStatusSamples { ### VirtualMachines_ListHosts ```java -import com.azure.core.util.Context; - /** Samples for VirtualMachines ListHosts. */ public final class VirtualMachinesListHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterVirtualMachines.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterVirtualMachines.json */ /** * Sample code: Get All hosts in the cluster. @@ -2872,7 +2828,7 @@ public final class VirtualMachinesListHostsSamples { * @param manager Entry point to HDInsightManager. */ public static void getAllHostsInTheCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.virtualMachines().listHostsWithResponse("rg1", "cluster1", Context.NONE); + manager.virtualMachines().listHostsWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -2880,13 +2836,12 @@ public final class VirtualMachinesListHostsSamples { ### VirtualMachines_RestartHosts ```java -import com.azure.core.util.Context; import java.util.Arrays; /** Samples for VirtualMachines RestartHosts. */ public final class VirtualMachinesRestartHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RestartVirtualMachinesOperation.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RestartVirtualMachinesOperation.json */ /** * Sample code: Restarts the specified HDInsight cluster hosts. @@ -2895,7 +2850,9 @@ public final class VirtualMachinesRestartHostsSamples { */ public static void restartsTheSpecifiedHDInsightClusterHosts( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.virtualMachines().restartHosts("rg1", "cluster1", Arrays.asList("gateway1", "gateway3"), Context.NONE); + manager + .virtualMachines() + .restartHosts("rg1", "cluster1", Arrays.asList("gateway1", "gateway3"), com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml index da75eba08874..7d3244c92062 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for HDInsight Management - This package contains Microsoft Azure SDK for HDInsight Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Management Client. Package tag package-2021-06. + This package contains Microsoft Azure SDK for HDInsight Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Management Client. Package tag package-preview-2023-04. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.java index 85c3fdb5b1fe..bd223f4410f9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/HDInsightManager.java @@ -56,28 +56,28 @@ /** Entry point to HDInsightManager. HDInsight Management Client. */ public final class HDInsightManager { - private Clusters clusters; - private Applications applications; - private Locations locations; + private Clusters clusters; private Configurations configurations; private Extensions extensions; - private ScriptActions scriptActions; - - private ScriptExecutionHistories scriptExecutionHistories; + private Locations locations; private Operations operations; - private VirtualMachines virtualMachines; - private PrivateEndpointConnections privateEndpointConnections; private PrivateLinkResources privateLinkResources; + private ScriptActions scriptActions; + + private ScriptExecutionHistories scriptExecutionHistories; + + private VirtualMachines virtualMachines; + private final HDInsightManagementClient clientObject; private HDInsightManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -243,7 +243,7 @@ public HDInsightManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.hdinsight") .append("/") - .append("1.0.0"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -300,18 +300,6 @@ public HDInsightManager authenticate(TokenCredential credential, AzureProfile pr } } - /** - * Gets the resource collection API of Clusters. It manages Cluster. - * - * @return Resource collection API of Clusters. - */ - public Clusters clusters() { - if (this.clusters == null) { - this.clusters = new ClustersImpl(clientObject.getClusters(), this); - } - return clusters; - } - /** * Gets the resource collection API of Applications. It manages Application. * @@ -325,15 +313,15 @@ public Applications applications() { } /** - * Gets the resource collection API of Locations. + * Gets the resource collection API of Clusters. It manages Cluster. * - * @return Resource collection API of Locations. + * @return Resource collection API of Clusters. */ - public Locations locations() { - if (this.locations == null) { - this.locations = new LocationsImpl(clientObject.getLocations(), this); + public Clusters clusters() { + if (this.clusters == null) { + this.clusters = new ClustersImpl(clientObject.getClusters(), this); } - return locations; + return clusters; } /** @@ -361,28 +349,15 @@ public Extensions extensions() { } /** - * Gets the resource collection API of ScriptActions. - * - * @return Resource collection API of ScriptActions. - */ - public ScriptActions scriptActions() { - if (this.scriptActions == null) { - this.scriptActions = new ScriptActionsImpl(clientObject.getScriptActions(), this); - } - return scriptActions; - } - - /** - * Gets the resource collection API of ScriptExecutionHistories. + * Gets the resource collection API of Locations. * - * @return Resource collection API of ScriptExecutionHistories. + * @return Resource collection API of Locations. */ - public ScriptExecutionHistories scriptExecutionHistories() { - if (this.scriptExecutionHistories == null) { - this.scriptExecutionHistories = - new ScriptExecutionHistoriesImpl(clientObject.getScriptExecutionHistories(), this); + public Locations locations() { + if (this.locations == null) { + this.locations = new LocationsImpl(clientObject.getLocations(), this); } - return scriptExecutionHistories; + return locations; } /** @@ -397,18 +372,6 @@ public Operations operations() { return operations; } - /** - * Gets the resource collection API of VirtualMachines. - * - * @return Resource collection API of VirtualMachines. - */ - public VirtualMachines virtualMachines() { - if (this.virtualMachines == null) { - this.virtualMachines = new VirtualMachinesImpl(clientObject.getVirtualMachines(), this); - } - return virtualMachines; - } - /** * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. * @@ -434,6 +397,43 @@ public PrivateLinkResources privateLinkResources() { return privateLinkResources; } + /** + * Gets the resource collection API of ScriptActions. + * + * @return Resource collection API of ScriptActions. + */ + public ScriptActions scriptActions() { + if (this.scriptActions == null) { + this.scriptActions = new ScriptActionsImpl(clientObject.getScriptActions(), this); + } + return scriptActions; + } + + /** + * Gets the resource collection API of ScriptExecutionHistories. + * + * @return Resource collection API of ScriptExecutionHistories. + */ + public ScriptExecutionHistories scriptExecutionHistories() { + if (this.scriptExecutionHistories == null) { + this.scriptExecutionHistories = + new ScriptExecutionHistoriesImpl(clientObject.getScriptExecutionHistories(), this); + } + return scriptExecutionHistories; + } + + /** + * Gets the resource collection API of VirtualMachines. + * + * @return Resource collection API of VirtualMachines. + */ + public VirtualMachines virtualMachines() { + if (this.virtualMachines == null) { + this.virtualMachines = new VirtualMachinesImpl(clientObject.getVirtualMachines(), this); + } + return virtualMachines; + } + /** * @return Wrapped service client HDInsightManagementClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java index 24fa47127074..b1a920d1dc2a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/ClustersClient.java @@ -646,6 +646,8 @@ void updateIdentityCertificate( * @param parameters The parameters for executing script actions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @@ -662,6 +664,8 @@ SyncPoller, Void> beginExecuteScriptActions( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @@ -677,6 +681,8 @@ SyncPoller, Void> beginExecuteScriptActions( * @param parameters The parameters for executing script actions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -691,6 +697,8 @@ SyncPoller, Void> beginExecuteScriptActions( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/HDInsightManagementClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/HDInsightManagementClient.java index e930ad75fe46..14478206975e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/HDInsightManagementClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/fluent/HDInsightManagementClient.java @@ -45,13 +45,6 @@ public interface HDInsightManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - ClustersClient getClusters(); - /** * Gets the ApplicationsClient object to access its operations. * @@ -60,11 +53,11 @@ public interface HDInsightManagementClient { ApplicationsClient getApplications(); /** - * Gets the LocationsClient object to access its operations. + * Gets the ClustersClient object to access its operations. * - * @return the LocationsClient object. + * @return the ClustersClient object. */ - LocationsClient getLocations(); + ClustersClient getClusters(); /** * Gets the ConfigurationsClient object to access its operations. @@ -81,18 +74,11 @@ public interface HDInsightManagementClient { ExtensionsClient getExtensions(); /** - * Gets the ScriptActionsClient object to access its operations. - * - * @return the ScriptActionsClient object. - */ - ScriptActionsClient getScriptActions(); - - /** - * Gets the ScriptExecutionHistoriesClient object to access its operations. + * Gets the LocationsClient object to access its operations. * - * @return the ScriptExecutionHistoriesClient object. + * @return the LocationsClient object. */ - ScriptExecutionHistoriesClient getScriptExecutionHistories(); + LocationsClient getLocations(); /** * Gets the OperationsClient object to access its operations. @@ -101,13 +87,6 @@ public interface HDInsightManagementClient { */ OperationsClient getOperations(); - /** - * Gets the VirtualMachinesClient object to access its operations. - * - * @return the VirtualMachinesClient object. - */ - VirtualMachinesClient getVirtualMachines(); - /** * Gets the PrivateEndpointConnectionsClient object to access its operations. * @@ -121,4 +100,25 @@ public interface HDInsightManagementClient { * @return the PrivateLinkResourcesClient object. */ PrivateLinkResourcesClient getPrivateLinkResources(); + + /** + * Gets the ScriptActionsClient object to access its operations. + * + * @return the ScriptActionsClient object. + */ + ScriptActionsClient getScriptActions(); + + /** + * Gets the ScriptExecutionHistoriesClient object to access its operations. + * + * @return the ScriptExecutionHistoriesClient object. + */ + ScriptExecutionHistoriesClient getScriptExecutionHistories(); + + /** + * Gets the VirtualMachinesClient object to access its operations. + * + * @return the VirtualMachinesClient object. + */ + VirtualMachinesClient getVirtualMachines(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java index b4ae73c43666..085f3b41f740 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ApplicationsClientImpl.java @@ -67,8 +67,7 @@ public final class ApplicationsClientImpl implements ApplicationsClient { public interface ApplicationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/applications") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCluster( @@ -82,8 +81,7 @@ Mono> listByCluster( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/applications/{applicationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -98,8 +96,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/applications/{applicationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -115,8 +112,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/applications/{applicationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -131,8 +127,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/applications/{applicationName}/azureasyncoperations/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}/azureasyncoperations/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getAzureAsyncOperationStatus( @@ -693,7 +688,7 @@ private PollerFlux, ApplicationInner> beginCreateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplicationInner> beginCreate( String resourceGroupName, String clusterName, String applicationName, ApplicationInner parameters) { - return beginCreateAsync(resourceGroupName, clusterName, applicationName, parameters).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, clusterName, applicationName, parameters).getSyncPoller(); } /** @@ -716,7 +711,9 @@ public SyncPoller, ApplicationInner> beginCreate( String applicationName, ApplicationInner parameters, Context context) { - return beginCreateAsync(resourceGroupName, clusterName, applicationName, parameters, context).getSyncPoller(); + return this + .beginCreateAsync(resourceGroupName, clusterName, applicationName, parameters, context) + .getSyncPoller(); } /** @@ -970,7 +967,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName) { - return beginDeleteAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName, applicationName).getSyncPoller(); } /** @@ -988,7 +985,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String applicationName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName, applicationName, context).getSyncPoller(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.java index e101622706b5..b280092dcda1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ClustersClientImpl.java @@ -78,8 +78,7 @@ public final class ClustersClientImpl implements ClustersClient { public interface ClustersService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -94,8 +93,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -110,8 +108,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -125,8 +122,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -153,8 +149,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/roles/{roleName}/resize") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/resize") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> resize( @@ -170,8 +165,7 @@ Mono>> resize( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/roles/{roleName}/autoscale") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/autoscale") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateAutoScaleConfiguration( @@ -198,8 +192,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/rotatediskencryptionkey") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/rotatediskencryptionkey") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> rotateDiskEncryptionKey( @@ -214,8 +207,7 @@ Mono>> rotateDiskEncryptionKey( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/getGatewaySettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/getGatewaySettings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getGatewaySettings( @@ -229,8 +221,7 @@ Mono> getGatewaySettings( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/updateGatewaySettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateGatewaySettings") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateGatewaySettings( @@ -245,8 +236,7 @@ Mono>> updateGatewaySettings( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/azureasyncoperations/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/azureasyncoperations/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getAzureAsyncOperationStatus( @@ -261,8 +251,7 @@ Mono> getAzureAsyncOperationStatus( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/updateClusterIdentityCertificate") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/updateClusterIdentityCertificate") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> updateIdentityCertificate( @@ -277,9 +266,11 @@ Mono>> updateIdentityCertificate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/executeScriptActions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions") @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType( + value = ManagementException.class, + code = {404}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> executeScriptActions( @HostParam("$host") String endpoint, @@ -479,7 +470,7 @@ private PollerFlux, ClusterInner> beginCreateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreate( String resourceGroupName, String clusterName, ClusterCreateParametersExtended parameters) { - return beginCreateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -497,7 +488,7 @@ public SyncPoller, ClusterInner> beginCreate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreate( String resourceGroupName, String clusterName, ClusterCreateParametersExtended parameters, Context context) { - return beginCreateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** @@ -879,7 +870,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { - return beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); } /** @@ -896,7 +887,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** @@ -1456,7 +1447,7 @@ private PollerFlux, Void> beginResizeAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginResize( String resourceGroupName, String clusterName, RoleName roleName, ClusterResizeParameters parameters) { - return beginResizeAsync(resourceGroupName, clusterName, roleName, parameters).getSyncPoller(); + return this.beginResizeAsync(resourceGroupName, clusterName, roleName, parameters).getSyncPoller(); } /** @@ -1479,7 +1470,7 @@ public SyncPoller, Void> beginResize( RoleName roleName, ClusterResizeParameters parameters, Context context) { - return beginResizeAsync(resourceGroupName, clusterName, roleName, parameters, context).getSyncPoller(); + return this.beginResizeAsync(resourceGroupName, clusterName, roleName, parameters, context).getSyncPoller(); } /** @@ -1764,7 +1755,8 @@ public SyncPoller, Void> beginUpdateAutoScaleConfiguration( String clusterName, RoleName roleName, AutoscaleConfigurationUpdateParameter parameters) { - return beginUpdateAutoScaleConfigurationAsync(resourceGroupName, clusterName, roleName, parameters) + return this + .beginUpdateAutoScaleConfigurationAsync(resourceGroupName, clusterName, roleName, parameters) .getSyncPoller(); } @@ -1788,7 +1780,8 @@ public SyncPoller, Void> beginUpdateAutoScaleConfiguration( RoleName roleName, AutoscaleConfigurationUpdateParameter parameters, Context context) { - return beginUpdateAutoScaleConfigurationAsync(resourceGroupName, clusterName, roleName, parameters, context) + return this + .beginUpdateAutoScaleConfigurationAsync(resourceGroupName, clusterName, roleName, parameters, context) .getSyncPoller(); } @@ -2191,7 +2184,7 @@ private PollerFlux, Void> beginRotateDiskEncryptionKeyAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRotateDiskEncryptionKey( String resourceGroupName, String clusterName, ClusterDiskEncryptionParameters parameters) { - return beginRotateDiskEncryptionKeyAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginRotateDiskEncryptionKeyAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -2209,7 +2202,9 @@ public SyncPoller, Void> beginRotateDiskEncryptionKey( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRotateDiskEncryptionKey( String resourceGroupName, String clusterName, ClusterDiskEncryptionParameters parameters, Context context) { - return beginRotateDiskEncryptionKeyAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this + .beginRotateDiskEncryptionKeyAsync(resourceGroupName, clusterName, parameters, context) + .getSyncPoller(); } /** @@ -2595,7 +2590,7 @@ private PollerFlux, Void> beginUpdateGatewaySettingsAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpdateGatewaySettings( String resourceGroupName, String clusterName, UpdateGatewaySettingsParameters parameters) { - return beginUpdateGatewaySettingsAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginUpdateGatewaySettingsAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -2613,7 +2608,9 @@ public SyncPoller, Void> beginUpdateGatewaySettings( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpdateGatewaySettings( String resourceGroupName, String clusterName, UpdateGatewaySettingsParameters parameters, Context context) { - return beginUpdateGatewaySettingsAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this + .beginUpdateGatewaySettingsAsync(resourceGroupName, clusterName, parameters, context) + .getSyncPoller(); } /** @@ -3020,7 +3017,7 @@ private PollerFlux, Void> beginUpdateIdentityCertificateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpdateIdentityCertificate( String resourceGroupName, String clusterName, UpdateClusterIdentityCertificateParameters parameters) { - return beginUpdateIdentityCertificateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginUpdateIdentityCertificateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -3041,7 +3038,9 @@ public SyncPoller, Void> beginUpdateIdentityCertificate( String clusterName, UpdateClusterIdentityCertificateParameters parameters, Context context) { - return beginUpdateIdentityCertificateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this + .beginUpdateIdentityCertificateAsync(resourceGroupName, clusterName, parameters, context) + .getSyncPoller(); } /** @@ -3130,6 +3129,7 @@ public void updateIdentityCertificate( * @param parameters The parameters for executing script actions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @@ -3186,6 +3186,7 @@ private Mono>> executeScriptActionsWithResponseAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response} on successful completion of {@link Mono}. */ @@ -3238,6 +3239,7 @@ private Mono>> executeScriptActionsWithResponseAsync( * @param parameters The parameters for executing script actions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @@ -3261,6 +3263,7 @@ private PollerFlux, Void> beginExecuteScriptActionsAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @@ -3283,13 +3286,14 @@ private PollerFlux, Void> beginExecuteScriptActionsAsync( * @param parameters The parameters for executing script actions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecuteScriptActions( String resourceGroupName, String clusterName, ExecuteScriptActionParameters parameters) { - return beginExecuteScriptActionsAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginExecuteScriptActionsAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -3301,13 +3305,14 @@ public SyncPoller, Void> beginExecuteScriptActions( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginExecuteScriptActions( String resourceGroupName, String clusterName, ExecuteScriptActionParameters parameters, Context context) { - return beginExecuteScriptActionsAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this.beginExecuteScriptActionsAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** @@ -3318,6 +3323,7 @@ public SyncPoller, Void> beginExecuteScriptActions( * @param parameters The parameters for executing script actions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @@ -3338,6 +3344,7 @@ private Mono executeScriptActionsAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return A {@link Mono} that completes when a successful response is received. */ @@ -3357,6 +3364,7 @@ private Mono executeScriptActionsAsync( * @param parameters The parameters for executing script actions. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -3374,6 +3382,7 @@ public void executeScriptActions( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java index 492b1a262546..a6a24fdacbf5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ConfigurationsClientImpl.java @@ -61,8 +61,7 @@ public final class ConfigurationsClientImpl implements ConfigurationsClient { public interface ConfigurationsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/configurations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -76,8 +75,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/configurations/{configurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -93,8 +91,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/configurations/{configurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> get( @@ -442,7 +439,7 @@ private PollerFlux, Void> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginUpdate( String resourceGroupName, String clusterName, String configurationName, Map parameters) { - return beginUpdateAsync(resourceGroupName, clusterName, configurationName, parameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, clusterName, configurationName, parameters).getSyncPoller(); } /** @@ -466,7 +463,9 @@ public SyncPoller, Void> beginUpdate( String configurationName, Map parameters, Context context) { - return beginUpdateAsync(resourceGroupName, clusterName, configurationName, parameters, context).getSyncPoller(); + return this + .beginUpdateAsync(resourceGroupName, clusterName, configurationName, parameters, context) + .getSyncPoller(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java index b0d590a54669..366a220410d7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ExtensionsClientImpl.java @@ -66,8 +66,7 @@ public final class ExtensionsClientImpl implements ExtensionsClient { public interface ExtensionsService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/clustermonitoring") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> enableMonitoring( @@ -82,8 +81,7 @@ Mono>> enableMonitoring( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/clustermonitoring") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getMonitoringStatus( @@ -97,8 +95,7 @@ Mono> getMonitoringStatus( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/clustermonitoring") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> disableMonitoring( @@ -112,8 +109,7 @@ Mono>> disableMonitoring( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/azureMonitor") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> enableAzureMonitor( @@ -128,8 +124,7 @@ Mono>> enableAzureMonitor( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/azureMonitor") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getAzureMonitorStatus( @@ -143,8 +138,7 @@ Mono> getAzureMonitorStatus( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/azureMonitor") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/azureMonitor") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> disableAzureMonitor( @@ -158,8 +152,7 @@ Mono>> disableAzureMonitor( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/{extensionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -175,8 +168,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/{extensionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -191,8 +183,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/{extensionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -207,8 +198,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/extensions/{extensionName}/azureAsyncOperations/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}/azureAsyncOperations/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getAzureAsyncOperationStatus( @@ -390,7 +380,7 @@ private PollerFlux, Void> beginEnableMonitoringAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginEnableMonitoring( String resourceGroupName, String clusterName, ClusterMonitoringRequest parameters) { - return beginEnableMonitoringAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginEnableMonitoringAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -408,7 +398,7 @@ public SyncPoller, Void> beginEnableMonitoring( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginEnableMonitoring( String resourceGroupName, String clusterName, ClusterMonitoringRequest parameters, Context context) { - return beginEnableMonitoringAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this.beginEnableMonitoringAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** @@ -776,7 +766,7 @@ private PollerFlux, Void> beginDisableMonitoringAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDisableMonitoring(String resourceGroupName, String clusterName) { - return beginDisableMonitoringAsync(resourceGroupName, clusterName).getSyncPoller(); + return this.beginDisableMonitoringAsync(resourceGroupName, clusterName).getSyncPoller(); } /** @@ -793,7 +783,7 @@ public SyncPoller, Void> beginDisableMonitoring(String resource @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDisableMonitoring( String resourceGroupName, String clusterName, Context context) { - return beginDisableMonitoringAsync(resourceGroupName, clusterName, context).getSyncPoller(); + return this.beginDisableMonitoringAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** @@ -1027,7 +1017,7 @@ private PollerFlux, Void> beginEnableAzureMonitorAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginEnableAzureMonitor( String resourceGroupName, String clusterName, AzureMonitorRequest parameters) { - return beginEnableAzureMonitorAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginEnableAzureMonitorAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -1045,7 +1035,7 @@ public SyncPoller, Void> beginEnableAzureMonitor( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginEnableAzureMonitor( String resourceGroupName, String clusterName, AzureMonitorRequest parameters, Context context) { - return beginEnableAzureMonitorAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this.beginEnableAzureMonitorAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** @@ -1411,7 +1401,7 @@ private PollerFlux, Void> beginDisableAzureMonitorAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDisableAzureMonitor(String resourceGroupName, String clusterName) { - return beginDisableAzureMonitorAsync(resourceGroupName, clusterName).getSyncPoller(); + return this.beginDisableAzureMonitorAsync(resourceGroupName, clusterName).getSyncPoller(); } /** @@ -1428,7 +1418,7 @@ public SyncPoller, Void> beginDisableAzureMonitor(String resour @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDisableAzureMonitor( String resourceGroupName, String clusterName, Context context) { - return beginDisableAzureMonitorAsync(resourceGroupName, clusterName, context).getSyncPoller(); + return this.beginDisableAzureMonitorAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** @@ -1675,7 +1665,7 @@ private PollerFlux, Void> beginCreateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreate( String resourceGroupName, String clusterName, String extensionName, Extension parameters) { - return beginCreateAsync(resourceGroupName, clusterName, extensionName, parameters).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, clusterName, extensionName, parameters).getSyncPoller(); } /** @@ -1694,7 +1684,9 @@ public SyncPoller, Void> beginCreate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginCreate( String resourceGroupName, String clusterName, String extensionName, Extension parameters, Context context) { - return beginCreateAsync(resourceGroupName, clusterName, extensionName, parameters, context).getSyncPoller(); + return this + .beginCreateAsync(resourceGroupName, clusterName, extensionName, parameters, context) + .getSyncPoller(); } /** @@ -2093,7 +2085,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String extensionName) { - return beginDeleteAsync(resourceGroupName, clusterName, extensionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName, extensionName).getSyncPoller(); } /** @@ -2111,7 +2103,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String extensionName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, extensionName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName, extensionName, context).getSyncPoller(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java index 5a904a2ae7b2..b57d509162a6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientImpl.java @@ -122,18 +122,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The ClustersClient object to access its operations. */ - private final ClustersClient clusters; - - /** - * Gets the ClustersClient object to access its operations. - * - * @return the ClustersClient object. - */ - public ClustersClient getClusters() { - return this.clusters; - } - /** The ApplicationsClient object to access its operations. */ private final ApplicationsClient applications; @@ -146,16 +134,16 @@ public ApplicationsClient getApplications() { return this.applications; } - /** The LocationsClient object to access its operations. */ - private final LocationsClient locations; + /** The ClustersClient object to access its operations. */ + private final ClustersClient clusters; /** - * Gets the LocationsClient object to access its operations. + * Gets the ClustersClient object to access its operations. * - * @return the LocationsClient object. + * @return the ClustersClient object. */ - public LocationsClient getLocations() { - return this.locations; + public ClustersClient getClusters() { + return this.clusters; } /** The ConfigurationsClient object to access its operations. */ @@ -182,28 +170,16 @@ public ExtensionsClient getExtensions() { return this.extensions; } - /** The ScriptActionsClient object to access its operations. */ - private final ScriptActionsClient scriptActions; - - /** - * Gets the ScriptActionsClient object to access its operations. - * - * @return the ScriptActionsClient object. - */ - public ScriptActionsClient getScriptActions() { - return this.scriptActions; - } - - /** The ScriptExecutionHistoriesClient object to access its operations. */ - private final ScriptExecutionHistoriesClient scriptExecutionHistories; + /** The LocationsClient object to access its operations. */ + private final LocationsClient locations; /** - * Gets the ScriptExecutionHistoriesClient object to access its operations. + * Gets the LocationsClient object to access its operations. * - * @return the ScriptExecutionHistoriesClient object. + * @return the LocationsClient object. */ - public ScriptExecutionHistoriesClient getScriptExecutionHistories() { - return this.scriptExecutionHistories; + public LocationsClient getLocations() { + return this.locations; } /** The OperationsClient object to access its operations. */ @@ -218,18 +194,6 @@ public OperationsClient getOperations() { return this.operations; } - /** The VirtualMachinesClient object to access its operations. */ - private final VirtualMachinesClient virtualMachines; - - /** - * Gets the VirtualMachinesClient object to access its operations. - * - * @return the VirtualMachinesClient object. - */ - public VirtualMachinesClient getVirtualMachines() { - return this.virtualMachines; - } - /** The PrivateEndpointConnectionsClient object to access its operations. */ private final PrivateEndpointConnectionsClient privateEndpointConnections; @@ -254,6 +218,42 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { return this.privateLinkResources; } + /** The ScriptActionsClient object to access its operations. */ + private final ScriptActionsClient scriptActions; + + /** + * Gets the ScriptActionsClient object to access its operations. + * + * @return the ScriptActionsClient object. + */ + public ScriptActionsClient getScriptActions() { + return this.scriptActions; + } + + /** The ScriptExecutionHistoriesClient object to access its operations. */ + private final ScriptExecutionHistoriesClient scriptExecutionHistories; + + /** + * Gets the ScriptExecutionHistoriesClient object to access its operations. + * + * @return the ScriptExecutionHistoriesClient object. + */ + public ScriptExecutionHistoriesClient getScriptExecutionHistories() { + return this.scriptExecutionHistories; + } + + /** The VirtualMachinesClient object to access its operations. */ + private final VirtualMachinesClient virtualMachines; + + /** + * Gets the VirtualMachinesClient object to access its operations. + * + * @return the VirtualMachinesClient object. + */ + public VirtualMachinesClient getVirtualMachines() { + return this.virtualMachines; + } + /** * Initializes an instance of HDInsightManagementClient client. * @@ -277,18 +277,18 @@ public PrivateLinkResourcesClient getPrivateLinkResources() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-06-01"; - this.clusters = new ClustersClientImpl(this); + this.apiVersion = "2023-04-15-preview"; this.applications = new ApplicationsClientImpl(this); - this.locations = new LocationsClientImpl(this); + this.clusters = new ClustersClientImpl(this); this.configurations = new ConfigurationsClientImpl(this); this.extensions = new ExtensionsClientImpl(this); - this.scriptActions = new ScriptActionsClientImpl(this); - this.scriptExecutionHistories = new ScriptExecutionHistoriesClientImpl(this); + this.locations = new LocationsClientImpl(this); this.operations = new OperationsClientImpl(this); - this.virtualMachines = new VirtualMachinesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); + this.scriptActions = new ScriptActionsClientImpl(this); + this.scriptExecutionHistories = new ScriptExecutionHistoriesClientImpl(this); + this.virtualMachines = new VirtualMachinesClientImpl(this); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java index fada0f874e94..5be675c8fcc3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/LocationsClientImpl.java @@ -98,8 +98,7 @@ Mono> listBillingSpecs( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/azureasyncoperations" - + "/{operationId}") + "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/azureasyncoperations/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getAzureAsyncOperationStatus( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java index 750ca95d75b9..5ff8d4df85e4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateEndpointConnectionsClientImpl.java @@ -68,8 +68,7 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi public interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/privateEndpointConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCluster( @@ -83,8 +82,7 @@ Mono> listByCluster( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -100,8 +98,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -116,8 +113,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -538,7 +534,8 @@ public SyncPoller, PrivateEndpointCon String clusterName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, clusterName, privateEndpointConnectionName, parameters) .getSyncPoller(); } @@ -562,7 +559,8 @@ public SyncPoller, PrivateEndpointCon String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, clusterName, privateEndpointConnectionName, parameters, context) .getSyncPoller(); } @@ -995,7 +993,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).getSyncPoller(); } /** @@ -1013,7 +1011,9 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).getSyncPoller(); + return this + .beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context) + .getSyncPoller(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java index 9ef0160b0a78..822577ce4cfd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/PrivateLinkResourcesClientImpl.java @@ -55,8 +55,7 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource public interface PrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCluster( @@ -70,8 +69,7 @@ Mono> listByCluster( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/privateLinkResources/{privateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java index a4f35cf3c835..e3f743f6e17a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptActionsClientImpl.java @@ -60,8 +60,7 @@ public final class ScriptActionsClientImpl implements ScriptActionsClient { public interface ScriptActionsService { @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/scriptActions/{scriptName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions/{scriptName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -76,8 +75,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/scriptActions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCluster( @@ -91,8 +89,7 @@ Mono> listByCluster( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/scriptExecutionHistory/{scriptExecutionId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getExecutionDetail( @@ -107,8 +104,7 @@ Mono> getExecutionDetail( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/executeScriptActions/azureasyncoperations/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions/azureasyncoperations/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getExecutionAsyncOperationStatus( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java index 7aa2950e56c2..30571f2f80fe 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/ScriptExecutionHistoriesClientImpl.java @@ -60,8 +60,7 @@ public final class ScriptExecutionHistoriesClientImpl implements ScriptExecution public interface ScriptExecutionHistoriesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/scriptExecutionHistory") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByCluster( @@ -75,8 +74,7 @@ Mono> listByCluster( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/scriptExecutionHistory/{scriptExecutionId}/promote") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId}/promote") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> promote( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java index 023b75fc6a43..c57f4b14307d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/VirtualMachinesClientImpl.java @@ -62,8 +62,7 @@ public final class VirtualMachinesClientImpl implements VirtualMachinesClient { public interface VirtualMachinesService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/listHosts") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/listHosts") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> listHosts( @@ -77,8 +76,7 @@ Mono>> listHosts( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/restartHosts") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> restartHosts( @@ -93,8 +91,7 @@ Mono>> restartHosts( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters" - + "/{clusterName}/restartHosts/azureasyncoperations/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/restartHosts/azureasyncoperations/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getAsyncOperationStatus( @@ -414,7 +411,7 @@ private PollerFlux, Void> beginRestartHostsAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestartHosts( String resourceGroupName, String clusterName, List hosts) { - return beginRestartHostsAsync(resourceGroupName, clusterName, hosts).getSyncPoller(); + return this.beginRestartHostsAsync(resourceGroupName, clusterName, hosts).getSyncPoller(); } /** @@ -432,7 +429,7 @@ public SyncPoller, Void> beginRestartHosts( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginRestartHosts( String resourceGroupName, String clusterName, List hosts, Context context) { - return beginRestartHostsAsync(resourceGroupName, clusterName, hosts, context).getSyncPoller(); + return this.beginRestartHostsAsync(resourceGroupName, clusterName, hosts, context).getSyncPoller(); } /** diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java index 3b26dab515a9..8e7d78c7065e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/AsyncOperationState.java @@ -19,6 +19,15 @@ public final class AsyncOperationState extends ExpandableStringEnum { /** Static value Sunday for DaysOfWeek. */ public static final DaysOfWeek SUNDAY = fromString("Sunday"); + /** + * Creates a new instance of DaysOfWeek value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DaysOfWeek() { + } + /** * Creates or finds a DaysOfWeek from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java index f42eb8f0d5d6..3cd3b7e555b0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/DirectoryType.java @@ -13,6 +13,15 @@ public final class DirectoryType extends ExpandableStringEnum { /** Static value ActiveDirectory for DirectoryType. */ public static final DirectoryType ACTIVE_DIRECTORY = fromString("ActiveDirectory"); + /** + * Creates a new instance of DirectoryType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DirectoryType() { + } + /** * Creates or finds a DirectoryType from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java index fc668b9f7344..ee614c5a824f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/FilterMode.java @@ -22,6 +22,15 @@ public final class FilterMode extends ExpandableStringEnum { /** Static value Default for FilterMode. */ public static final FilterMode DEFAULT = fromString("Default"); + /** + * Creates a new instance of FilterMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FilterMode() { + } + /** * Creates or finds a FilterMode from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java index 70bce5fbe10f..b5f5d4198ead 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/HDInsightClusterProvisioningState.java @@ -25,6 +25,15 @@ public final class HDInsightClusterProvisioningState extends ExpandableStringEnu /** Static value Deleting for HDInsightClusterProvisioningState. */ public static final HDInsightClusterProvisioningState DELETING = fromString("Deleting"); + /** + * Creates a new instance of HDInsightClusterProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HDInsightClusterProvisioningState() { + } + /** * Creates or finds a HDInsightClusterProvisioningState from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java index ed04a1b95fcd..57a5d17ff81f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/JsonWebKeyEncryptionAlgorithm.java @@ -19,6 +19,15 @@ public final class JsonWebKeyEncryptionAlgorithm extends ExpandableStringEnum { /** Static value Linux for OSType. */ public static final OSType LINUX = fromString("Linux"); + /** + * Creates a new instance of OSType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OSType() { + } + /** * Creates or finds a OSType from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java index 5e831607d1a6..c862cfc78bc5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateEndpointConnectionProvisioningState.java @@ -29,6 +29,15 @@ public final class PrivateEndpointConnectionProvisioningState /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + /** + * Creates a new instance of PrivateEndpointConnectionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionProvisioningState() { + } + /** * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java index 0c3067272037..855ea2aecf23 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateIpAllocationMethod.java @@ -16,6 +16,15 @@ public final class PrivateIpAllocationMethod extends ExpandableStringEnum { /** Static value Enabled for PrivateLink. */ public static final PrivateLink ENABLED = fromString("Enabled"); + /** + * Creates a new instance of PrivateLink value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateLink() { + } + /** * Creates or finds a PrivateLink from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java index 6c6623de2625..07a374e502f4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkConfigurationProvisioningState.java @@ -26,6 +26,15 @@ public final class PrivateLinkConfigurationProvisioningState /** Static value Deleting for PrivateLinkConfigurationProvisioningState. */ public static final PrivateLinkConfigurationProvisioningState DELETING = fromString("Deleting"); + /** + * Creates a new instance of PrivateLinkConfigurationProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateLinkConfigurationProvisioningState() { + } + /** * Creates or finds a PrivateLinkConfigurationProvisioningState from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java index 4cb01aa82594..f8f098e76c21 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/PrivateLinkServiceConnectionStatus.java @@ -22,6 +22,15 @@ public final class PrivateLinkServiceConnectionStatus extends ExpandableStringEn /** Static value Removed for PrivateLinkServiceConnectionStatus. */ public static final PrivateLinkServiceConnectionStatus REMOVED = fromString("Removed"); + /** + * Creates a new instance of PrivateLinkServiceConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateLinkServiceConnectionStatus() { + } + /** * Creates or finds a PrivateLinkServiceConnectionStatus from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java index 4f31b85f1c0d..b0ce5d2e1a58 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/ResourceIdentityType.java @@ -25,6 +25,15 @@ public final class ResourceIdentityType extends ExpandableStringEnum { /** Static value workernode for RoleName. */ public static final RoleName WORKERNODE = fromString("workernode"); + /** + * Creates a new instance of RoleName value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RoleName() { + } + /** * Creates or finds a RoleName from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java index 456cff6266c4..1428d3445b40 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/StorageAccount.java @@ -65,6 +65,13 @@ public final class StorageAccount { @JsonProperty(value = "fileshare") private String fileshare; + /* + * Enable secure channel or not, it's an optional field. Default value is false when cluster version < 5.1 and true + * when cluster version >= 5.1 , + */ + @JsonProperty(value = "enableSecureChannel") + private Boolean enableSecureChannel; + /** Creates an instance of StorageAccount class. */ public StorageAccount() { } @@ -253,6 +260,28 @@ public StorageAccount withFileshare(String fileshare) { return this; } + /** + * Get the enableSecureChannel property: Enable secure channel or not, it's an optional field. Default value is + * false when cluster version < 5.1 and true when cluster version >= 5.1 ,. + * + * @return the enableSecureChannel value. + */ + public Boolean enableSecureChannel() { + return this.enableSecureChannel; + } + + /** + * Set the enableSecureChannel property: Enable secure channel or not, it's an optional field. Default value is + * false when cluster version < 5.1 and true when cluster version >= 5.1 ,. + * + * @param enableSecureChannel the enableSecureChannel value to set. + * @return the StorageAccount object itself. + */ + public StorageAccount withEnableSecureChannel(Boolean enableSecureChannel) { + this.enableSecureChannel = enableSecureChannel; + return this; + } + /** * Validates the instance. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java index 33d67aa6dc95..209ee39387f4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/Tier.java @@ -16,6 +16,15 @@ public final class Tier extends ExpandableStringEnum { /** Static value Premium for Tier. */ public static final Tier PREMIUM = fromString("Premium"); + /** + * Creates a new instance of Tier value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Tier() { + } + /** * Creates or finds a Tier from its string representation. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java index 1e10aff007ba..9678da9e9530 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/UserAssignedIdentity.java @@ -9,7 +9,7 @@ /** The User Assigned Identity. */ @Fluent -public class UserAssignedIdentity { +public final class UserAssignedIdentity { /* * The principal id of user assigned identity. */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsCreateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsCreateSamples.java index 638487de02ef..e37e056fe906 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsCreateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsCreateSamples.java @@ -15,7 +15,7 @@ /** Samples for Applications Create. */ public final class ApplicationsCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateApplication.json */ /** * Sample code: Create Application. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteSamples.java index f628080b8972..59cb7a493b1f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteApplication.json */ /** * Sample code: Delete Application from HDInsight cluster. @@ -18,6 +16,6 @@ public final class ApplicationsDeleteSamples { */ public static void deleteApplicationFromHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().delete("rg1", "cluster1", "hue", Context.NONE); + manager.applications().delete("rg1", "cluster1", "hue", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetAzureAsyncOperationStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetAzureAsyncOperationStatusSamples.java index e574ec4c312f..e8ddf0a2a21b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetAzureAsyncOperationStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetAzureAsyncOperationStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Applications GetAzureAsyncOperationStatus. */ public final class ApplicationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json */ /** * Sample code: Get the azure async operation status. @@ -20,6 +18,6 @@ public static void getTheAzureAsyncOperationStatus(com.azure.resourcemanager.hdi manager .applications() .getAzureAsyncOperationStatusWithResponse( - "rg1", "cluster1", "app", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "app", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetSamples.java index d4ddae9d2309..ca82448cf0ee 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationInProgress.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationInProgress.json */ /** * Sample code: Get application on HDInsight cluster creation in progress. @@ -18,11 +16,11 @@ public final class ApplicationsGetSamples { */ public static void getApplicationOnHDInsightClusterCreationInProgress( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().getWithResponse("rg1", "cluster1", "app", Context.NONE); + manager.applications().getWithResponse("rg1", "cluster1", "app", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetApplicationCreated.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreated.json */ /** * Sample code: Get application on HDInsight cluster successfully created. @@ -31,6 +29,6 @@ public static void getApplicationOnHDInsightClusterCreationInProgress( */ public static void getApplicationOnHDInsightClusterSuccessfullyCreated( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().getWithResponse("rg1", "cluster1", "app", Context.NONE); + manager.applications().getWithResponse("rg1", "cluster1", "app", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsListByClusterSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsListByClusterSamples.java index 2b9010b6ba4d..db1db4d5fe78 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsListByClusterSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsListByClusterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Applications ListByCluster. */ public final class ApplicationsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllApplications.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllApplications.json */ /** * Sample code: Get All Applications for an HDInsight cluster. @@ -18,6 +16,6 @@ public final class ApplicationsListByClusterSamples { */ public static void getAllApplicationsForAnHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.applications().listByCluster("rg1", "cluster1", Context.NONE); + manager.applications().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersCreateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersCreateSamples.java index 5af36e2ceb10..e5a0f0919eaf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersCreateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersCreateSamples.java @@ -44,7 +44,7 @@ /** Samples for Clusters Create. */ public final class ClustersCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPassword.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH password. @@ -120,12 +120,13 @@ public static void createHadoopOnLinuxClusterWithSSHPassword( .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateKafkaClusterWithKafkaRestProxy.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json */ /** * Sample code: Create Kafka cluster with Kafka Rest Proxy. @@ -216,12 +217,13 @@ public static void createKafkaClusterWithKafkaRestProxy( .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAutoscaleConfig.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json */ /** * Sample code: Create HDInsight cluster with Autoscale configuration. @@ -333,12 +335,13 @@ public static void createHDInsightClusterWithAutoscaleConfiguration( .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("hdinsight-autoscale-tes-2019-06-18t05-49-16-591z") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSshPublicKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPublicKey.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH public key. @@ -421,12 +424,13 @@ public static void createHadoopOnLinuxClusterWithSSHPublicKey( .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithAvailabilityZones.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json */ /** * Sample code: Create cluster with availability zones. @@ -534,12 +538,13 @@ public static void createClusterWithAvailabilityZones(com.azure.resourcemanager. .withName("mystorage") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopAdlsGen2.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopAdlsGen2.json */ /** * Sample code: Create Hadoop cluster with Azure Data Lake Storage Gen 2. @@ -615,12 +620,13 @@ public static void createHadoopClusterWithAzureDataLakeStorageGen2( .withName("mystorage.dfs.core.windows.net") .withIsDefault(true) .withFileSystem("default") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxHadoopSecureHadoop.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSecureHadoop.json */ /** * Sample code: Create Secure Hadoop cluster. @@ -750,12 +756,13 @@ public static void createSecureHadoopCluster(com.azure.resourcemanager.hdinsight .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateLinuxSparkSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxSparkSshPassword.json */ /** * Sample code: Create Spark on Linux Cluster with SSH password. @@ -821,12 +828,13 @@ public static void createSparkOnLinuxClusterWithSSHPassword( .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder"))))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true))))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithCustomNetworkProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json */ /** * Sample code: Create cluster with network properties. @@ -915,7 +923,8 @@ public static void createClusterWithNetworkProperties(com.azure.resourcemanager. .withName("mystorage") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withNetworkProperties( new NetworkProperties() .withResourceProviderConnection(ResourceProviderConnection.OUTBOUND) @@ -924,7 +933,7 @@ public static void createClusterWithNetworkProperties(com.azure.resourcemanager. } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithTLS12.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithTLS12.json */ /** * Sample code: Create cluster with TLS 1.2. @@ -996,13 +1005,14 @@ public static void createClusterWithTLS12(com.azure.resourcemanager.hdinsight.HD .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("default8525") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withMinSupportedTlsVersion("1.2")) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionAtHost.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json */ /** * Sample code: Create cluster with encryption at host. @@ -1074,13 +1084,14 @@ public static void createClusterWithEncryptionAtHost(com.azure.resourcemanager.h .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("default8525") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withDiskEncryptionProperties(new DiskEncryptionProperties().withEncryptionAtHost(true))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithEncryptionInTransit.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json */ /** * Sample code: Create cluster with encryption in transit. @@ -1152,14 +1163,15 @@ public static void createClusterWithEncryptionInTransit( .withName("mystorage.blob.core.windows.net") .withIsDefault(true) .withContainer("default8525") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withEncryptionInTransitProperties( new EncryptionInTransitProperties().withIsEncryptionInTransitEnabled(true))) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateHDInsightClusterWithComputeIsolationProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json */ /** * Sample code: Create cluster with compute isolation properties. @@ -1236,7 +1248,8 @@ public static void createClusterWithComputeIsolationProperties( .withName("mystorage") .withIsDefault(true) .withContainer("containername") - .withKey("fakeTokenPlaceholder")))) + .withKey("fakeTokenPlaceholder") + .withEnableSecureChannel(true)))) .withComputeIsolationProperties(new ComputeIsolationProperties().withEnableComputeIsolation(true))) .create(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteSamples.java index 5d3a2b7dc177..5161b14227b5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteLinuxHadoopCluster.json */ /** * Sample code: Delete Hadoop on Linux cluster. @@ -17,6 +15,6 @@ public final class ClustersDeleteSamples { * @param manager Entry point to HDInsightManager. */ public static void deleteHadoopOnLinuxCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().delete("rg1", "cluster1", Context.NONE); + manager.clusters().delete("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsSamples.java index 8d11c74d4fc3..53f1fe6c3da3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ExecuteScriptActionParameters; import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction; import java.util.Arrays; @@ -12,7 +11,7 @@ /** Samples for Clusters ExecuteScriptActions. */ public final class ClustersExecuteScriptActionsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PostExecuteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PostExecuteScriptAction.json */ /** * Sample code: Execute script action on HDInsight cluster. @@ -36,6 +35,6 @@ public static void executeScriptActionOnHDInsightCluster( .withParameters("") .withRoles(Arrays.asList("headnode", "workernode")))) .withPersistOnSuccess(false), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetAzureAsyncOperationStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetAzureAsyncOperationStatusSamples.java index 784dd1f40b12..b367eeb1a65b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetAzureAsyncOperationStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetAzureAsyncOperationStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Clusters GetAzureAsyncOperationStatus. */ public final class ClustersGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterCreatingAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json */ /** * Sample code: Get Async Operation Status of Creating Cluster. @@ -21,6 +19,6 @@ public static void getAsyncOperationStatusOfCreatingCluster( manager .clusters() .getAzureAsyncOperationStatusWithResponse( - "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetByResourceGroupSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetByResourceGroupSamples.java index 458891e4f7f5..475a85acf595 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopCluster.json */ /** * Sample code: Get Hadoop on Linux cluster. @@ -17,11 +15,11 @@ public final class ClustersGetByResourceGroupSamples { * @param manager Entry point to HDInsightManager. */ public static void getHadoopOnLinuxCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", Context.NONE); + manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxSparkCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxSparkCluster.json */ /** * Sample code: Get Spark on Linux cluster. @@ -29,6 +27,6 @@ public static void getHadoopOnLinuxCluster(com.azure.resourcemanager.hdinsight.H * @param manager Entry point to HDInsightManager. */ public static void getSparkOnLinuxCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", Context.NONE); + manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetGatewaySettingsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetGatewaySettingsSamples.java index 4c6535e72dc2..fc4336f72fd1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetGatewaySettingsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersGetGatewaySettingsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Clusters GetGatewaySettings. */ public final class ClustersGetGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_GetGatewaySettings.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_GetGatewaySettings.json */ /** * Sample code: Get HTTP settings. @@ -17,6 +15,6 @@ public final class ClustersGetGatewaySettingsSamples { * @param manager Entry point to HDInsightManager. */ public static void getHTTPSettings(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().getGatewaySettingsWithResponse("rg1", "cluster1", Context.NONE); + manager.clusters().getGatewaySettingsWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListByResourceGroupSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListByResourceGroupSamples.java index aacf0a8b1b06..6b08696727b8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClustersInResourceGroup.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json */ /** * Sample code: Get All Hadoop on Linux clusters in a resource group. @@ -18,6 +16,6 @@ public final class ClustersListByResourceGroupSamples { */ public static void getAllHadoopOnLinuxClustersInAResourceGroup( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().listByResourceGroup("rg1", Context.NONE); + manager.clusters().listByResourceGroup("rg1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListSamples.java index 7697f5ac7529..f7fa0e7e82b3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopAllClusters.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClusters.json */ /** * Sample code: Get All Hadoop on Linux clusters. @@ -17,6 +15,6 @@ public final class ClustersListSamples { * @param manager Entry point to HDInsightManager. */ public static void getAllHadoopOnLinuxClusters(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.clusters().list(Context.NONE); + manager.clusters().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeSamples.java index b720388c8e34..765d15b0e572 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ClusterResizeParameters; import com.azure.resourcemanager.hdinsight.models.RoleName; /** Samples for Clusters Resize. */ public final class ClustersResizeSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ResizeLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ResizeLinuxHadoopCluster.json */ /** * Sample code: Resize the worker nodes for a Hadoop on Linux cluster. @@ -27,6 +26,6 @@ public static void resizeTheWorkerNodesForAHadoopOnLinuxCluster( "cluster1", RoleName.WORKERNODE, new ClusterResizeParameters().withTargetInstanceCount(10), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersRotateDiskEncryptionKeySamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersRotateDiskEncryptionKeySamples.java index e27086e6d345..1e555a4d4be8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersRotateDiskEncryptionKeySamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersRotateDiskEncryptionKeySamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ClusterDiskEncryptionParameters; /** Samples for Clusters RotateDiskEncryptionKey. */ public final class ClustersRotateDiskEncryptionKeySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json */ /** * Sample code: Rotate disk encryption key of the specified HDInsight cluster. @@ -28,6 +27,6 @@ public static void rotateDiskEncryptionKeyOfTheSpecifiedHDInsightCluster( .withVaultUri("https://newkeyvault.vault.azure.net/") .withKeyName("fakeTokenPlaceholder") .withKeyVersion("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationSamples.java index 27bfb03caa59..02b43279658f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.Autoscale; import com.azure.resourcemanager.hdinsight.models.AutoscaleCapacity; import com.azure.resourcemanager.hdinsight.models.AutoscaleConfigurationUpdateParameter; @@ -18,7 +17,7 @@ /** Samples for Clusters UpdateAutoScaleConfiguration. */ public final class ClustersUpdateAutoScaleConfigurationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the load based configuration for HDInsight cluster. @@ -37,11 +36,11 @@ public static void enableOrUpdateAutoscaleWithTheLoadBasedConfigurationForHDInsi .withAutoscale( new Autoscale() .withCapacity(new AutoscaleCapacity().withMinInstanceCount(3).withMaxInstanceCount(5))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableClusterAutoScale.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableClusterAutoScale.json */ /** * Sample code: Disable Autoscale for the HDInsight cluster. @@ -53,11 +52,15 @@ public static void disableAutoscaleForTheHDInsightCluster( manager .clusters() .updateAutoScaleConfiguration( - "rg1", "cluster1", RoleName.WORKERNODE, new AutoscaleConfigurationUpdateParameter(), Context.NONE); + "rg1", + "cluster1", + RoleName.WORKERNODE, + new AutoscaleConfigurationUpdateParameter(), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the schedule based configuration for HDInsight cluster. @@ -88,6 +91,6 @@ public static void enableOrUpdateAutoscaleWithTheScheduleBasedConfigurationForHD .withTime("16:00") .withMinInstanceCount(4) .withMaxInstanceCount(4)))))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateGatewaySettingsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateGatewaySettingsSamples.java index ceb77e77dc96..d15553aca699 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateGatewaySettingsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateGatewaySettingsSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.UpdateGatewaySettingsParameters; /** Samples for Clusters UpdateGatewaySettings. */ public final class ClustersUpdateGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json */ /** * Sample code: Enable HTTP connectivity. @@ -20,6 +19,7 @@ public final class ClustersUpdateGatewaySettingsSamples { public static void enableHTTPConnectivity(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .clusters() - .updateGatewaySettings("rg1", "cluster1", new UpdateGatewaySettingsParameters(), Context.NONE); + .updateGatewaySettings( + "rg1", "cluster1", new UpdateGatewaySettingsParameters(), com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateIdentityCertificateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateIdentityCertificateSamples.java index 9a75bc0863c1..fd96ad2a75ac 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateIdentityCertificateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateIdentityCertificateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.UpdateClusterIdentityCertificateParameters; /** Samples for Clusters UpdateIdentityCertificate. */ public final class ClustersUpdateIdentityCertificateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json */ /** * Sample code: Update cluster identity certificate. @@ -27,6 +26,6 @@ public static void updateClusterIdentityCertificate(com.azure.resourcemanager.hd .withApplicationId("applicationId") .withCertificate("base64encodedcertificate") .withCertificatePassword("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateSamples.java index 660e85a2ee43..fbbf85c37a7c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.Cluster; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PatchLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PatchLinuxHadoopCluster.json */ /** * Sample code: Patch HDInsight Linux clusters. @@ -21,7 +20,10 @@ public final class ClustersUpdateSamples { */ public static void patchHDInsightLinuxClusters(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { Cluster resource = - manager.clusters().getByResourceGroupWithResponse("rg1", "cluster1", Context.NONE).getValue(); + manager + .clusters() + .getByResourceGroupWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("key1", "val1", "key2", "val2")).apply(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetSamples.java index e900376a32b0..1eb73e7b7f66 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Configurations Get. */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_Get.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_Get.json */ /** * Sample code: Get Core site settings. @@ -17,6 +15,6 @@ public final class ConfigurationsGetSamples { * @param manager Entry point to HDInsightManager. */ public static void getCoreSiteSettings(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.configurations().getWithResponse("rg1", "cluster1", "core-site", Context.NONE); + manager.configurations().getWithResponse("rg1", "cluster1", "core-site", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListSamples.java index c0d0403a3c06..c5f1c072971d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Configurations List. */ public final class ConfigurationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Configurations_List.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_List.json */ /** * Sample code: Get all configuration information. @@ -17,6 +15,6 @@ public final class ConfigurationsListSamples { * @param manager Entry point to HDInsightManager. */ public static void getAllConfigurationInformation(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.configurations().listWithResponse("rg1", "cluster1", Context.NONE); + manager.configurations().listWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateSamples.java index cad430764895..f2d21d9e4030 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateSamples.java @@ -4,14 +4,13 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import java.util.HashMap; import java.util.Map; /** Samples for Configurations Update. */ public final class ConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityEnable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityEnable.json */ /** * Sample code: Enable HTTP connectivity. @@ -32,11 +31,11 @@ public static void enableHTTPConnectivity(com.azure.resourcemanager.hdinsight.HD "**********", "restAuthCredential.username", "hadoop"), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ChangeHttpConnectivityDisable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityDisable.json */ /** * Sample code: Disable HTTP connectivity. @@ -46,7 +45,12 @@ public static void enableHTTPConnectivity(com.azure.resourcemanager.hdinsight.HD public static void disableHTTPConnectivity(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .configurations() - .update("rg1", "cluster1", "gateway", mapOf("restAuthCredential.isEnabled", "false"), Context.NONE); + .update( + "rg1", + "cluster1", + "gateway", + mapOf("restAuthCredential.isEnabled", "false"), + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsCreateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsCreateSamples.java index cb39a7d923b1..a2e3c3da14d7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsCreateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsCreateSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.Extension; /** Samples for Extensions Create. */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/CreateExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateExtension.json */ /** * Sample code: Create a monitoring extension on Hadoop Linux cluster. @@ -28,6 +27,6 @@ public static void createAMonitoringExtensionOnHadoopLinuxCluster( new Extension() .withWorkspaceId("a2090ead-8c9f-4fba-b70e-533e3e003163") .withPrimaryKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteSamples.java index 89db00a825b4..2b4a03ae6413 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Extensions Delete. */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteExtension.json */ /** * Sample code: Delete an extension. @@ -17,6 +15,6 @@ public final class ExtensionsDeleteSamples { * @param manager Entry point to HDInsightManager. */ public static void deleteAnExtension(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().delete("rg1", "cluster1", "clustermonitoring", Context.NONE); + manager.extensions().delete("rg1", "cluster1", "clustermonitoring", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorSamples.java index 00aa2666982a..c3c3904ab9b3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Extensions DisableAzureMonitor. */ public final class ExtensionsDisableAzureMonitorSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. @@ -17,6 +15,6 @@ public final class ExtensionsDisableAzureMonitorSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().disableAzureMonitor("rg1", "cluster1", Context.NONE); + manager.extensions().disableAzureMonitor("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringSamples.java index fab7bd033823..f859ba3bbd94 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Extensions DisableMonitoring. */ public final class ExtensionsDisableMonitoringSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DisableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. @@ -17,6 +15,6 @@ public final class ExtensionsDisableMonitoringSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().disableMonitoring("rg1", "cluster1", Context.NONE); + manager.extensions().disableMonitoring("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableAzureMonitorSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableAzureMonitorSamples.java index b94c26a6df86..1fdb434e31bd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableAzureMonitorSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableAzureMonitorSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.AzureMonitorRequest; /** Samples for Extensions EnableAzureMonitor. */ public final class ExtensionsEnableAzureMonitorSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. @@ -26,6 +25,6 @@ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.H new AzureMonitorRequest() .withWorkspaceId("a2090ead-8c9f-4fba-b70e-533e3e003163") .withPrimaryKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableMonitoringSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableMonitoringSamples.java index 56b665185e82..67a8fec568dc 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableMonitoringSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsEnableMonitoringSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.ClusterMonitoringRequest; /** Samples for Extensions EnableMonitoring. */ public final class ExtensionsEnableMonitoringSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/EnableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. @@ -26,6 +25,6 @@ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.H new ClusterMonitoringRequest() .withWorkspaceId("a2090ead-8c9f-4fba-b70e-533e3e003163") .withPrimaryKey("fakeTokenPlaceholder"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureAsyncOperationStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureAsyncOperationStatusSamples.java index 1be291de48a2..01a89c737218 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureAsyncOperationStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureAsyncOperationStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Extensions GetAzureAsyncOperationStatus. */ public final class ExtensionsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtensionCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. @@ -20,6 +18,10 @@ public static void getsTheAzureAsyncOperationStatus(com.azure.resourcemanager.hd manager .extensions() .getAzureAsyncOperationStatusWithResponse( - "rg1", "cluster1", "azuremonitor", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", + "cluster1", + "azuremonitor", + "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusSamples.java index 1651a324689c..ba9b3b90585e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Extensions GetAzureMonitorStatus. */ public final class ExtensionsGetAzureMonitorStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterAzureMonitorStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json */ /** * Sample code: Enable cluster monitoring. @@ -17,6 +15,6 @@ public final class ExtensionsGetAzureMonitorStatusSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().getAzureMonitorStatusWithResponse("rg1", "cluster1", Context.NONE); + manager.extensions().getAzureMonitorStatusWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusSamples.java index c0c2edb58a72..1c744d62a88a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Extensions GetMonitoringStatus. */ public final class ExtensionsGetMonitoringStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxClusterMonitoringStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterMonitoringStatus.json */ /** * Sample code: Enable cluster monitoring. @@ -17,6 +15,6 @@ public final class ExtensionsGetMonitoringStatusSamples { * @param manager Entry point to HDInsightManager. */ public static void enableClusterMonitoring(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().getMonitoringStatusWithResponse("rg1", "cluster1", Context.NONE); + manager.extensions().getMonitoringStatusWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetSamples.java index a76049571ba3..e3f553cf237a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Extensions Get. */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtension.json */ /** * Sample code: Get an extension. @@ -17,6 +15,6 @@ public final class ExtensionsGetSamples { * @param manager Entry point to HDInsightManager. */ public static void getAnExtension(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.extensions().getWithResponse("rg1", "cluster1", "clustermonitoring", Context.NONE); + manager.extensions().getWithResponse("rg1", "cluster1", "clustermonitoring", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilitySamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilitySamples.java index 44f6ffae7a26..120ba5044c1b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilitySamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilitySamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckRequestParameters; /** Samples for Locations CheckNameAvailability. */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_CheckClusterNameAvailability.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json */ /** * Sample code: Get the subscription usages for specific location. @@ -24,6 +23,6 @@ public static void getTheSubscriptionUsagesForSpecificLocation( .checkNameAvailabilityWithResponse( "westus", new NameAvailabilityCheckRequestParameters().withName("test123").withType("clusters"), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetAzureAsyncOperationStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetAzureAsyncOperationStatusSamples.java index 8f7fcb158350..36ae85a81a2d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetAzureAsyncOperationStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetAzureAsyncOperationStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Locations GetAzureAsyncOperationStatus. */ public final class LocationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_GetAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. @@ -20,6 +18,6 @@ public static void getsTheAzureAsyncOperationStatus(com.azure.resourcemanager.hd manager .locations() .getAzureAsyncOperationStatusWithResponse( - "East US 2", "8a0348f4-8a85-4ec2-abe0-03b26104a9a0-0", Context.NONE); + "East US 2", "8a0348f4-8a85-4ec2-abe0-03b26104a9a0-0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesSamples.java index 0f204038a4c9..17eb2e6aa5a6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Locations GetCapabilities. */ public final class LocationsGetCapabilitiesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightCapabilities.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightCapabilities.json */ /** * Sample code: Get the subscription capabilities for specific location. @@ -18,6 +16,6 @@ public final class LocationsGetCapabilitiesSamples { */ public static void getTheSubscriptionCapabilitiesForSpecificLocation( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.locations().getCapabilitiesWithResponse("West US", Context.NONE); + manager.locations().getCapabilitiesWithResponse("West US", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsSamples.java index 9298ec78d2ba..6a1b411bd9ff 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Locations ListBillingSpecs. */ public final class LocationsListBillingSpecsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ListBillingSpecs.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ListBillingSpecs.json */ /** * Sample code: Get the subscription billingSpecs for the specified location. @@ -18,6 +16,6 @@ public final class LocationsListBillingSpecsSamples { */ public static void getTheSubscriptionBillingSpecsForTheSpecifiedLocation( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.locations().listBillingSpecsWithResponse("East US 2", Context.NONE); + manager.locations().listBillingSpecsWithResponse("East US 2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesSamples.java index e1897ff57b17..055d17f9918e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Locations ListUsages. */ public final class LocationsListUsagesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetHDInsightUsages.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightUsages.json */ /** * Sample code: Get the subscription usages for specific location. @@ -18,6 +16,6 @@ public final class LocationsListUsagesSamples { */ public static void getTheSubscriptionUsagesForSpecificLocation( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.locations().listUsagesWithResponse("West US", Context.NONE); + manager.locations().listUsagesWithResponse("West US", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsValidateClusterCreateRequestSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsValidateClusterCreateRequestSamples.java index 7157c5baedf1..658fad0e04c6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsValidateClusterCreateRequestSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/LocationsValidateClusterCreateRequestSamples.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.hdinsight.generated; import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.hdinsight.models.ClusterCreateProperties; import com.azure.resourcemanager.hdinsight.models.ClusterCreateRequestValidationParameters; @@ -27,7 +26,7 @@ /** Samples for Locations ValidateClusterCreateRequest. */ public final class LocationsValidateClusterCreateRequestSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/HDI_Locations_ValidateClusterCreateRequest.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json */ /** * Sample code: Get the subscription usages for specific location. @@ -113,13 +112,14 @@ public static void getTheSubscriptionUsagesForSpecificLocation( .withContainer("contianername") .withKey("fakeTokenPlaceholder") .withResourceId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storagename")))) + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Storage/storageAccounts/storagename") + .withEnableSecureChannel(true)))) .withMinSupportedTlsVersion("1.2")) .withName("testclustername") .withType("Microsoft.HDInsight/clusters") .withTenantId("00000000-0000-0000-0000-000000000000") .withFetchAaddsResource(false), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/OperationsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/OperationsListSamples.java index df2b8ad4a4fc..ba2c10cdc474 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/OperationsListSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ListHDInsightOperations.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ListHDInsightOperations.json */ /** * Sample code: Lists all of the available operations. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to HDInsightManager. */ public static void listsAllOfTheAvailableOperations(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index 047aa80ff110..7b9f9718161c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ApprovePrivateEndpointConnection.json */ /** * Sample code: Approve a private endpoint connection manually. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteSamples.java index b54a890447a6..3665e0dc1e8a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeletePrivateEndpointConnection.json */ /** * Sample code: Delete specific private endpoint connection for a specific HDInsight cluster. @@ -20,6 +18,10 @@ public static void deleteSpecificPrivateEndpointConnectionForASpecificHDInsightC com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .privateEndpointConnections() - .delete("rg1", "cluster1", "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", Context.NONE); + .delete( + "rg1", + "cluster1", + "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetSamples.java index f57c6365bc05..98b9d13fc468 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateEndpointConnection.json */ /** * Sample code: Get specific private endpoint connection for a specific HDInsight cluster. @@ -20,6 +18,10 @@ public static void getSpecificPrivateEndpointConnectionForASpecificHDInsightClus com.azure.resourcemanager.hdinsight.HDInsightManager manager) { manager .privateEndpointConnections() - .getWithResponse("rg1", "cluster1", "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", Context.NONE); + .getWithResponse( + "rg1", + "cluster1", + "testprivateep.b3bf5fed-9b12-4560-b7d0-2abe1bba07e2", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterSamples.java index bacf007d269b..d4f27c9b1da7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnections ListByCluster. */ public final class PrivateEndpointConnectionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateEndpointConnectionsInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json */ /** * Sample code: Get all private endpoint connections for a specific HDInsight cluster. @@ -18,6 +16,6 @@ public final class PrivateEndpointConnectionsListByClusterSamples { */ public static void getAllPrivateEndpointConnectionsForASpecificHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.privateEndpointConnections().listByCluster("rg1", "cluster1", Context.NONE); + manager.privateEndpointConnections().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetSamples.java index 20fe8a2cfc6b..e2217de1979e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetPrivateLinkResource.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateLinkResource.json */ /** * Sample code: Get specific private link resource in a specific HDInsight cluster. @@ -18,6 +16,6 @@ public final class PrivateLinkResourcesGetSamples { */ public static void getSpecificPrivateLinkResourceInASpecificHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.privateLinkResources().getWithResponse("rg1", "cluster1", "gateway", Context.NONE); + manager.privateLinkResources().getWithResponse("rg1", "cluster1", "gateway", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterSamples.java index e6c22fb1b965..5d8f407f906f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResources ListByCluster. */ public final class PrivateLinkResourcesListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetAllPrivateLinkResourcesInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json */ /** * Sample code: Get all private link resources in a specific HDInsight cluster. @@ -18,6 +16,6 @@ public final class PrivateLinkResourcesListByClusterSamples { */ public static void getAllPrivateLinkResourcesInASpecificHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.privateLinkResources().listByClusterWithResponse("rg1", "cluster1", Context.NONE); + manager.privateLinkResources().listByClusterWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteSamples.java index 09c1f30ad32c..8d2206a09e5f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for ScriptActions Delete. */ public final class ScriptActionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/DeleteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteScriptAction.json */ /** * Sample code: Delete a script action on HDInsight cluster. @@ -18,6 +16,6 @@ public final class ScriptActionsDeleteSamples { */ public static void deleteAScriptActionOnHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptActions().deleteWithResponse("rg1", "cluster1", "scriptName", Context.NONE); + manager.scriptActions().deleteWithResponse("rg1", "cluster1", "scriptName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionAsyncOperationStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionAsyncOperationStatusSamples.java index 6726aa92dbed..0ff7e9e0accf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionAsyncOperationStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionAsyncOperationStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for ScriptActions GetExecutionAsyncOperationStatus. */ public final class ScriptActionsGetExecutionAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json */ /** * Sample code: Gets the async execution operation status. @@ -21,6 +19,6 @@ public static void getsTheAsyncExecutionOperationStatus( manager .scriptActions() .getExecutionAsyncOperationStatusWithResponse( - "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailSamples.java index 8700391123ef..2ad074543307 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for ScriptActions GetExecutionDetail. */ public final class ScriptActionsGetExecutionDetailSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptActionById.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptActionById.json */ /** * Sample code: Get script execution history by script id. @@ -18,6 +16,8 @@ public final class ScriptActionsGetExecutionDetailSamples { */ public static void getScriptExecutionHistoryByScriptId( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptActions().getExecutionDetailWithResponse("rg1", "cluster1", "391145124054712", Context.NONE); + manager + .scriptActions() + .getExecutionDetailWithResponse("rg1", "cluster1", "391145124054712", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterSamples.java index db0e7355780f..532ddce8003c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for ScriptActions ListByCluster. */ public final class ScriptActionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopScriptAction.json */ /** * Sample code: List all persisted script actions for the given cluster. @@ -18,6 +16,6 @@ public final class ScriptActionsListByClusterSamples { */ public static void listAllPersistedScriptActionsForTheGivenCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptActions().listByCluster("rg1", "cluster1", Context.NONE); + manager.scriptActions().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryListByClusterSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryListByClusterSamples.java index c7dcc3cc7c9c..9405ef778fb1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryListByClusterSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryListByClusterSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for ScriptExecutionHistory ListByCluster. */ public final class ScriptExecutionHistoryListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetScriptExecutionHistory.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionHistory.json */ /** * Sample code: Get Script Execution History List. @@ -17,6 +15,6 @@ public final class ScriptExecutionHistoryListByClusterSamples { * @param manager Entry point to HDInsightManager. */ public static void getScriptExecutionHistoryList(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptExecutionHistories().listByCluster("rg1", "cluster1", Context.NONE); + manager.scriptExecutionHistories().listByCluster("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryPromoteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryPromoteSamples.java index ddef680f2ea5..3179809dc171 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryPromoteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoryPromoteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for ScriptExecutionHistory Promote. */ public final class ScriptExecutionHistoryPromoteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/PromoteLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PromoteLinuxHadoopScriptAction.json */ /** * Sample code: Promote a script action on HDInsight cluster. @@ -18,6 +16,8 @@ public final class ScriptExecutionHistoryPromoteSamples { */ public static void promoteAScriptActionOnHDInsightCluster( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.scriptExecutionHistories().promoteWithResponse("rg1", "cluster1", "391145124054712", Context.NONE); + manager + .scriptExecutionHistories() + .promoteWithResponse("rg1", "cluster1", "391145124054712", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesGetAsyncOperationStatusSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesGetAsyncOperationStatusSamples.java index 3f786f3b1510..82a7124da988 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesGetAsyncOperationStatusSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesGetAsyncOperationStatusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for VirtualMachines GetAsyncOperationStatus. */ public final class VirtualMachinesGetAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetRestartHostsAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetRestartHostsAsyncOperationStatus.json */ /** * Sample code: Gets the async operation status of restarting host. @@ -21,6 +19,6 @@ public static void getsTheAsyncOperationStatusOfRestartingHost( manager .virtualMachines() .getAsyncOperationStatusWithResponse( - "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", Context.NONE); + "rg1", "cluster1", "CF938302-6B4D-44A0-A6D2-C0D67E847AEC", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesListHostsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesListHostsSamples.java index 269e0018ccfd..2ff0d351a9bf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesListHostsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesListHostsSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; - /** Samples for VirtualMachines ListHosts. */ public final class VirtualMachinesListHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/GetClusterVirtualMachines.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterVirtualMachines.json */ /** * Sample code: Get All hosts in the cluster. @@ -17,6 +15,6 @@ public final class VirtualMachinesListHostsSamples { * @param manager Entry point to HDInsightManager. */ public static void getAllHostsInTheCluster(com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.virtualMachines().listHostsWithResponse("rg1", "cluster1", Context.NONE); + manager.virtualMachines().listHostsWithResponse("rg1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsSamples.java index 0838e9708309..4f9e1e38e0c4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/samples/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsSamples.java @@ -4,13 +4,12 @@ package com.azure.resourcemanager.hdinsight.generated; -import com.azure.core.util.Context; import java.util.Arrays; /** Samples for VirtualMachines RestartHosts. */ public final class VirtualMachinesRestartHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2021-06-01/examples/RestartVirtualMachinesOperation.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RestartVirtualMachinesOperation.json */ /** * Sample code: Restarts the specified HDInsight cluster hosts. @@ -19,6 +18,8 @@ public final class VirtualMachinesRestartHostsSamples { */ public static void restartsTheSpecifiedHDInsightClusterHosts( com.azure.resourcemanager.hdinsight.HDInsightManager manager) { - manager.virtualMachines().restartHosts("rg1", "cluster1", Arrays.asList("gateway1", "gateway3"), Context.NONE); + manager + .virtualMachines() + .restartHosts("rg1", "cluster1", Arrays.asList("gateway1", "gateway3"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AaddsResourceDetailsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AaddsResourceDetailsTests.java deleted file mode 100644 index ad69c70b5038..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AaddsResourceDetailsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AaddsResourceDetails; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AaddsResourceDetailsTests { - @Test - public void testDeserialize() { - AaddsResourceDetails model = - BinaryData - .fromString( - "{\"domainName\":\"cizsjqlhkrribdei\",\"initialSyncComplete\":true,\"ldapsEnabled\":false,\"ldapsPublicCertificateInBase64\":\"ghvxndzwmkrefa\",\"resourceId\":\"jorwkqnyhgbij\",\"subnetId\":\"ivfxzsjabibsyst\",\"tenantId\":\"fsdjpvkvp\"}") - .toObject(AaddsResourceDetails.class); - Assertions.assertEquals("cizsjqlhkrribdei", model.domainName()); - Assertions.assertEquals(true, model.initialSyncComplete()); - Assertions.assertEquals(false, model.ldapsEnabled()); - Assertions.assertEquals("ghvxndzwmkrefa", model.ldapsPublicCertificateInBase64()); - Assertions.assertEquals("jorwkqnyhgbij", model.resourceId()); - Assertions.assertEquals("ivfxzsjabibsyst", model.subnetId()); - Assertions.assertEquals("fsdjpvkvp", model.tenantId()); - } - - @Test - public void testSerialize() { - AaddsResourceDetails model = - new AaddsResourceDetails() - .withDomainName("cizsjqlhkrribdei") - .withInitialSyncComplete(true) - .withLdapsEnabled(false) - .withLdapsPublicCertificateInBase64("ghvxndzwmkrefa") - .withResourceId("jorwkqnyhgbij") - .withSubnetId("ivfxzsjabibsyst") - .withTenantId("fsdjpvkvp"); - model = BinaryData.fromObject(model).toObject(AaddsResourceDetails.class); - Assertions.assertEquals("cizsjqlhkrribdei", model.domainName()); - Assertions.assertEquals(true, model.initialSyncComplete()); - Assertions.assertEquals(false, model.ldapsEnabled()); - Assertions.assertEquals("ghvxndzwmkrefa", model.ldapsPublicCertificateInBase64()); - Assertions.assertEquals("jorwkqnyhgbij", model.resourceId()); - Assertions.assertEquals("ivfxzsjabibsyst", model.subnetId()); - Assertions.assertEquals("fsdjpvkvp", model.tenantId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetEndpointTests.java deleted file mode 100644 index a1871fc391ba..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetEndpointTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ApplicationGetEndpoint; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ApplicationGetEndpointTests { - @Test - public void testDeserialize() { - ApplicationGetEndpoint model = - BinaryData - .fromString( - "{\"location\":\"vhelxprglyatdd\",\"destinationPort\":1454263457,\"publicPort\":373907539,\"privateIPAddress\":\"ejrjxgciqibrho\"}") - .toObject(ApplicationGetEndpoint.class); - Assertions.assertEquals("vhelxprglyatdd", model.location()); - Assertions.assertEquals(1454263457, model.destinationPort()); - Assertions.assertEquals(373907539, model.publicPort()); - Assertions.assertEquals("ejrjxgciqibrho", model.privateIpAddress()); - } - - @Test - public void testSerialize() { - ApplicationGetEndpoint model = - new ApplicationGetEndpoint() - .withLocation("vhelxprglyatdd") - .withDestinationPort(1454263457) - .withPublicPort(373907539) - .withPrivateIpAddress("ejrjxgciqibrho"); - model = BinaryData.fromObject(model).toObject(ApplicationGetEndpoint.class); - Assertions.assertEquals("vhelxprglyatdd", model.location()); - Assertions.assertEquals(1454263457, model.destinationPort()); - Assertions.assertEquals(373907539, model.publicPort()); - Assertions.assertEquals("ejrjxgciqibrho", model.privateIpAddress()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetHttpsEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetHttpsEndpointTests.java deleted file mode 100644 index 93889f0bb45d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetHttpsEndpointTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ApplicationGetHttpsEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ApplicationGetHttpsEndpointTests { - @Test - public void testDeserialize() { - ApplicationGetHttpsEndpoint model = - BinaryData - .fromString( - "{\"accessModes\":[\"pzk\",\"mond\",\"mquxvypo\"],\"location\":\"kopkwhojvpajqgx\",\"destinationPort\":608982569,\"publicPort\":146904581,\"privateIPAddress\":\"bq\",\"subDomainSuffix\":\"vmkcx\",\"disableGatewayAuth\":true}") - .toObject(ApplicationGetHttpsEndpoint.class); - Assertions.assertEquals("pzk", model.accessModes().get(0)); - Assertions.assertEquals(608982569, model.destinationPort()); - Assertions.assertEquals("bq", model.privateIpAddress()); - Assertions.assertEquals("vmkcx", model.subDomainSuffix()); - Assertions.assertEquals(true, model.disableGatewayAuth()); - } - - @Test - public void testSerialize() { - ApplicationGetHttpsEndpoint model = - new ApplicationGetHttpsEndpoint() - .withAccessModes(Arrays.asList("pzk", "mond", "mquxvypo")) - .withDestinationPort(608982569) - .withPrivateIpAddress("bq") - .withSubDomainSuffix("vmkcx") - .withDisableGatewayAuth(true); - model = BinaryData.fromObject(model).toObject(ApplicationGetHttpsEndpoint.class); - Assertions.assertEquals("pzk", model.accessModes().get(0)); - Assertions.assertEquals(608982569, model.destinationPort()); - Assertions.assertEquals("bq", model.privateIpAddress()); - Assertions.assertEquals("vmkcx", model.subDomainSuffix()); - Assertions.assertEquals(true, model.disableGatewayAuth()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationListResultTests.java deleted file mode 100644 index a3842fabb0cf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationListResultTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.ApplicationInner; -import com.azure.resourcemanager.hdinsight.models.ApplicationListResult; -import com.azure.resourcemanager.hdinsight.models.ApplicationProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ApplicationListResultTests { - @Test - public void testDeserialize() { - ApplicationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"etag\":\"mzlfmisgwb\",\"tags\":{\"dawkzbali\":\"e\",\"hashsfwxosow\":\"urqhaka\",\"cjooxdjebwpucwwf\":\"xcug\",\"hzceuojgjrwjue\":\"ovbvmeueciv\"},\"properties\":{\"installScriptActions\":[],\"uninstallScriptActions\":[],\"httpsEndpoints\":[],\"sshEndpoints\":[],\"provisioningState\":\"tdx\",\"applicationType\":\"txnrjaw\",\"applicationState\":\"wgxhn\",\"errors\":[],\"createdDate\":\"x\",\"marketplaceIdentifier\":\"kpycgklwndnhjd\",\"privateLinkConfigurations\":[]},\"id\":\"hvylwzbt\",\"name\":\"h\",\"type\":\"ujznb\"}],\"nextLink\":\"ow\"}") - .toObject(ApplicationListResult.class); - Assertions.assertEquals("mzlfmisgwb", model.value().get(0).etag()); - Assertions.assertEquals("e", model.value().get(0).tags().get("dawkzbali")); - Assertions.assertEquals("txnrjaw", model.value().get(0).properties().applicationType()); - } - - @Test - public void testSerialize() { - ApplicationListResult model = - new ApplicationListResult() - .withValue( - Arrays - .asList( - new ApplicationInner() - .withEtag("mzlfmisgwb") - .withTags( - mapOf( - "dawkzbali", - "e", - "hashsfwxosow", - "urqhaka", - "cjooxdjebwpucwwf", - "xcug", - "hzceuojgjrwjue", - "ovbvmeueciv")) - .withProperties( - new ApplicationProperties() - .withInstallScriptActions(Arrays.asList()) - .withUninstallScriptActions(Arrays.asList()) - .withHttpsEndpoints(Arrays.asList()) - .withSshEndpoints(Arrays.asList()) - .withApplicationType("txnrjaw") - .withErrors(Arrays.asList()) - .withPrivateLinkConfigurations(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(ApplicationListResult.class); - Assertions.assertEquals("mzlfmisgwb", model.value().get(0).etag()); - Assertions.assertEquals("e", model.value().get(0).tags().get("dawkzbali")); - Assertions.assertEquals("txnrjaw", model.value().get(0).properties().applicationType()); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsCreateMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsCreateMockTests.java deleted file mode 100644 index c084bf15a649..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsCreateMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.Application; -import com.azure.resourcemanager.hdinsight.models.ApplicationProperties; -import com.azure.resourcemanager.hdinsight.models.ComputeProfile; -import java.nio.ByteBuffer; -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 org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"etag\":\"nsqyrpfoobrltt\",\"tags\":{\"nfwqzdzgtilaxhn\":\"jnygq\",\"wivkxo\":\"hqlyvijo\",\"ti\":\"zunbixx\",\"vtsoxf\":\"vcpwpgclrc\"},\"properties\":{\"computeProfile\":{\"roles\":[]},\"installScriptActions\":[],\"uninstallScriptActions\":[],\"httpsEndpoints\":[],\"sshEndpoints\":[],\"provisioningState\":\"Succeeded\",\"applicationType\":\"vmm\",\"applicationState\":\"pqfrtqlkz\",\"errors\":[],\"createdDate\":\"itgvkx\",\"marketplaceIdentifier\":\"yqdrf\",\"privateLinkConfigurations\":[]},\"id\":\"alzxwhcan\",\"name\":\"ymo\",\"type\":\"qhlwigdivbkbxgo\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Application response = - manager - .applications() - .define("fiwrxgkn") - .withExistingCluster("mtggu", "pijrajcivmmghf") - .withTags(mapOf("fvpgshoxgsg", "o", "gzdjtxvzf", "p")) - .withEtag("vyi") - .withProperties( - new ApplicationProperties() - .withComputeProfile(new ComputeProfile().withRoles(Arrays.asList())) - .withInstallScriptActions(Arrays.asList()) - .withUninstallScriptActions(Arrays.asList()) - .withHttpsEndpoints(Arrays.asList()) - .withSshEndpoints(Arrays.asList()) - .withApplicationType("utnw") - .withErrors(Arrays.asList()) - .withPrivateLinkConfigurations(Arrays.asList())) - .create(); - - Assertions.assertEquals("nsqyrpfoobrltt", response.etag()); - Assertions.assertEquals("jnygq", response.tags().get("nfwqzdzgtilaxhn")); - Assertions.assertEquals("vmm", response.properties().applicationType()); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteMockTests.java deleted file mode 100644 index ad5b1b63ea17..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.applications().delete("jhlfzswpchwahf", "ousnfepgfewe", "wlyxgncxyk", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetWithResponseMockTests.java deleted file mode 100644 index ec2988c8ff21..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsGetWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.Application; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"etag\":\"etoge\",\"tags\":{\"jcjbt\":\"xslhvnhlabrqnkk\",\"qbeitpkxztmoob\":\"gaehvvibrxjjst\"},\"properties\":{\"computeProfile\":{\"roles\":[]},\"installScriptActions\":[],\"uninstallScriptActions\":[],\"httpsEndpoints\":[],\"sshEndpoints\":[],\"provisioningState\":\"imaq\",\"applicationType\":\"hemjy\",\"applicationState\":\"hujswtwkozzwcul\",\"errors\":[],\"createdDate\":\"pfajnjwltlwtjj\",\"marketplaceIdentifier\":\"ktalhsnvkcdmxz\",\"privateLinkConfigurations\":[]},\"id\":\"imlnwiaaomylw\",\"name\":\"azul\",\"type\":\"sethwwn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Application response = - manager.applications().getWithResponse("lqxihhrmooiz", "seypxiutcxapz", "y", Context.NONE).getValue(); - - Assertions.assertEquals("etoge", response.etag()); - Assertions.assertEquals("xslhvnhlabrqnkk", response.tags().get("jcjbt")); - Assertions.assertEquals("hemjy", response.properties().applicationType()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsListByClusterMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsListByClusterMockTests.java deleted file mode 100644 index 4e51a3e1cdf5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsListByClusterMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.Application; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsListByClusterMockTests { - @Test - public void testListByCluster() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"etag\":\"hihihlhzdsqtzbsr\",\"tags\":{\"cact\":\"wcjhfgmv\"},\"properties\":{\"computeProfile\":{\"roles\":[]},\"installScriptActions\":[],\"uninstallScriptActions\":[],\"httpsEndpoints\":[],\"sshEndpoints\":[],\"provisioningState\":\"ovekqvgqouwi\",\"applicationType\":\"mpjw\",\"applicationState\":\"vqikfxcvhrfsphu\",\"errors\":[],\"createdDate\":\"tikteusqczkvykl\",\"marketplaceIdentifier\":\"byjaffmmf\",\"privateLinkConfigurations\":[]},\"id\":\"cuubgq\",\"name\":\"brta\",\"type\":\"metttwgd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.applications().listByCluster("u", "lcplc", Context.NONE); - - Assertions.assertEquals("hihihlhzdsqtzbsr", response.iterator().next().etag()); - Assertions.assertEquals("wcjhfgmv", response.iterator().next().tags().get("cact")); - Assertions.assertEquals("mpjw", response.iterator().next().properties().applicationType()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleCapacityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleCapacityTests.java deleted file mode 100644 index 100a32964317..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleCapacityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AutoscaleCapacity; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoscaleCapacityTests { - @Test - public void testDeserialize() { - AutoscaleCapacity model = - BinaryData - .fromString("{\"minInstanceCount\":253386723,\"maxInstanceCount\":1248526317}") - .toObject(AutoscaleCapacity.class); - Assertions.assertEquals(253386723, model.minInstanceCount()); - Assertions.assertEquals(1248526317, model.maxInstanceCount()); - } - - @Test - public void testSerialize() { - AutoscaleCapacity model = - new AutoscaleCapacity().withMinInstanceCount(253386723).withMaxInstanceCount(1248526317); - model = BinaryData.fromObject(model).toObject(AutoscaleCapacity.class); - Assertions.assertEquals(253386723, model.minInstanceCount()); - Assertions.assertEquals(1248526317, model.maxInstanceCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleConfigurationUpdateParameterTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleConfigurationUpdateParameterTests.java deleted file mode 100644 index dc19dfe04841..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleConfigurationUpdateParameterTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Autoscale; -import com.azure.resourcemanager.hdinsight.models.AutoscaleCapacity; -import com.azure.resourcemanager.hdinsight.models.AutoscaleConfigurationUpdateParameter; -import com.azure.resourcemanager.hdinsight.models.AutoscaleRecurrence; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoscaleConfigurationUpdateParameterTests { - @Test - public void testDeserialize() { - AutoscaleConfigurationUpdateParameter model = - BinaryData - .fromString( - "{\"autoscale\":{\"capacity\":{\"minInstanceCount\":421254098,\"maxInstanceCount\":661393497},\"recurrence\":{\"timeZone\":\"lhspkdee\",\"schedule\":[]}}}") - .toObject(AutoscaleConfigurationUpdateParameter.class); - Assertions.assertEquals(421254098, model.autoscale().capacity().minInstanceCount()); - Assertions.assertEquals(661393497, model.autoscale().capacity().maxInstanceCount()); - Assertions.assertEquals("lhspkdee", model.autoscale().recurrence().timeZone()); - } - - @Test - public void testSerialize() { - AutoscaleConfigurationUpdateParameter model = - new AutoscaleConfigurationUpdateParameter() - .withAutoscale( - new Autoscale() - .withCapacity( - new AutoscaleCapacity().withMinInstanceCount(421254098).withMaxInstanceCount(661393497)) - .withRecurrence( - new AutoscaleRecurrence().withTimeZone("lhspkdee").withSchedule(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(AutoscaleConfigurationUpdateParameter.class); - Assertions.assertEquals(421254098, model.autoscale().capacity().minInstanceCount()); - Assertions.assertEquals(661393497, model.autoscale().capacity().maxInstanceCount()); - Assertions.assertEquals("lhspkdee", model.autoscale().recurrence().timeZone()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleRecurrenceTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleRecurrenceTests.java deleted file mode 100644 index cde6f7fba798..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleRecurrenceTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AutoscaleRecurrence; -import com.azure.resourcemanager.hdinsight.models.AutoscaleSchedule; -import com.azure.resourcemanager.hdinsight.models.AutoscaleTimeAndCapacity; -import com.azure.resourcemanager.hdinsight.models.DaysOfWeek; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoscaleRecurrenceTests { - @Test - public void testDeserialize() { - AutoscaleRecurrence model = - BinaryData - .fromString( - "{\"timeZone\":\"uujitcjc\",\"schedule\":[{\"days\":[\"Thursday\",\"Monday\",\"Friday\"],\"timeAndCapacity\":{\"time\":\"wpdappdsbdkv\",\"minInstanceCount\":1134506891,\"maxInstanceCount\":1914162243}},{\"days\":[\"Thursday\",\"Thursday\"],\"timeAndCapacity\":{\"time\":\"tjelt\",\"minInstanceCount\":1403309762,\"maxInstanceCount\":1554551214}},{\"days\":[\"Monday\",\"Tuesday\",\"Tuesday\",\"Wednesday\"],\"timeAndCapacity\":{\"time\":\"qxhocdgeablgphut\",\"minInstanceCount\":732372528,\"maxInstanceCount\":1906017395}},{\"days\":[\"Monday\",\"Sunday\",\"Friday\",\"Friday\"],\"timeAndCapacity\":{\"time\":\"tyhxhurokft\",\"minInstanceCount\":900623903,\"maxInstanceCount\":214532343}}]}") - .toObject(AutoscaleRecurrence.class); - Assertions.assertEquals("uujitcjc", model.timeZone()); - Assertions.assertEquals(DaysOfWeek.THURSDAY, model.schedule().get(0).days().get(0)); - Assertions.assertEquals("wpdappdsbdkv", model.schedule().get(0).timeAndCapacity().time()); - Assertions.assertEquals(1134506891, model.schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(1914162243, model.schedule().get(0).timeAndCapacity().maxInstanceCount()); - } - - @Test - public void testSerialize() { - AutoscaleRecurrence model = - new AutoscaleRecurrence() - .withTimeZone("uujitcjc") - .withSchedule( - Arrays - .asList( - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.THURSDAY, DaysOfWeek.MONDAY, DaysOfWeek.FRIDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("wpdappdsbdkv") - .withMinInstanceCount(1134506891) - .withMaxInstanceCount(1914162243)), - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.THURSDAY, DaysOfWeek.THURSDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("tjelt") - .withMinInstanceCount(1403309762) - .withMaxInstanceCount(1554551214)), - new AutoscaleSchedule() - .withDays( - Arrays - .asList( - DaysOfWeek.MONDAY, - DaysOfWeek.TUESDAY, - DaysOfWeek.TUESDAY, - DaysOfWeek.WEDNESDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("qxhocdgeablgphut") - .withMinInstanceCount(732372528) - .withMaxInstanceCount(1906017395)), - new AutoscaleSchedule() - .withDays( - Arrays - .asList( - DaysOfWeek.MONDAY, DaysOfWeek.SUNDAY, DaysOfWeek.FRIDAY, DaysOfWeek.FRIDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("tyhxhurokft") - .withMinInstanceCount(900623903) - .withMaxInstanceCount(214532343)))); - model = BinaryData.fromObject(model).toObject(AutoscaleRecurrence.class); - Assertions.assertEquals("uujitcjc", model.timeZone()); - Assertions.assertEquals(DaysOfWeek.THURSDAY, model.schedule().get(0).days().get(0)); - Assertions.assertEquals("wpdappdsbdkv", model.schedule().get(0).timeAndCapacity().time()); - Assertions.assertEquals(1134506891, model.schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(1914162243, model.schedule().get(0).timeAndCapacity().maxInstanceCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleScheduleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleScheduleTests.java deleted file mode 100644 index 8beb0b3b7246..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleScheduleTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AutoscaleSchedule; -import com.azure.resourcemanager.hdinsight.models.AutoscaleTimeAndCapacity; -import com.azure.resourcemanager.hdinsight.models.DaysOfWeek; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoscaleScheduleTests { - @Test - public void testDeserialize() { - AutoscaleSchedule model = - BinaryData - .fromString( - "{\"days\":[\"Sunday\",\"Sunday\",\"Thursday\",\"Sunday\"],\"timeAndCapacity\":{\"time\":\"fkgiawxk\",\"minInstanceCount\":764612558,\"maxInstanceCount\":1861456902}}") - .toObject(AutoscaleSchedule.class); - Assertions.assertEquals(DaysOfWeek.SUNDAY, model.days().get(0)); - Assertions.assertEquals("fkgiawxk", model.timeAndCapacity().time()); - Assertions.assertEquals(764612558, model.timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(1861456902, model.timeAndCapacity().maxInstanceCount()); - } - - @Test - public void testSerialize() { - AutoscaleSchedule model = - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.SUNDAY, DaysOfWeek.SUNDAY, DaysOfWeek.THURSDAY, DaysOfWeek.SUNDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("fkgiawxk") - .withMinInstanceCount(764612558) - .withMaxInstanceCount(1861456902)); - model = BinaryData.fromObject(model).toObject(AutoscaleSchedule.class); - Assertions.assertEquals(DaysOfWeek.SUNDAY, model.days().get(0)); - Assertions.assertEquals("fkgiawxk", model.timeAndCapacity().time()); - Assertions.assertEquals(764612558, model.timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(1861456902, model.timeAndCapacity().maxInstanceCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTests.java deleted file mode 100644 index 3933ca457485..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Autoscale; -import com.azure.resourcemanager.hdinsight.models.AutoscaleCapacity; -import com.azure.resourcemanager.hdinsight.models.AutoscaleRecurrence; -import com.azure.resourcemanager.hdinsight.models.AutoscaleSchedule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoscaleTests { - @Test - public void testDeserialize() { - Autoscale model = - BinaryData - .fromString( - "{\"capacity\":{\"minInstanceCount\":461040275,\"maxInstanceCount\":564452713},\"recurrence\":{\"timeZone\":\"ljfmppee\",\"schedule\":[{\"days\":[]},{\"days\":[]}]}}") - .toObject(Autoscale.class); - Assertions.assertEquals(461040275, model.capacity().minInstanceCount()); - Assertions.assertEquals(564452713, model.capacity().maxInstanceCount()); - Assertions.assertEquals("ljfmppee", model.recurrence().timeZone()); - } - - @Test - public void testSerialize() { - Autoscale model = - new Autoscale() - .withCapacity(new AutoscaleCapacity().withMinInstanceCount(461040275).withMaxInstanceCount(564452713)) - .withRecurrence( - new AutoscaleRecurrence() - .withTimeZone("ljfmppee") - .withSchedule( - Arrays - .asList( - new AutoscaleSchedule().withDays(Arrays.asList()), - new AutoscaleSchedule().withDays(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(Autoscale.class); - Assertions.assertEquals(461040275, model.capacity().minInstanceCount()); - Assertions.assertEquals(564452713, model.capacity().maxInstanceCount()); - Assertions.assertEquals("ljfmppee", model.recurrence().timeZone()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTimeAndCapacityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTimeAndCapacityTests.java deleted file mode 100644 index eab6c1ecccf1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTimeAndCapacityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AutoscaleTimeAndCapacity; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoscaleTimeAndCapacityTests { - @Test - public void testDeserialize() { - AutoscaleTimeAndCapacity model = - BinaryData - .fromString("{\"time\":\"ckbasyypndd\",\"minInstanceCount\":1048772360,\"maxInstanceCount\":248766473}") - .toObject(AutoscaleTimeAndCapacity.class); - Assertions.assertEquals("ckbasyypndd", model.time()); - Assertions.assertEquals(1048772360, model.minInstanceCount()); - Assertions.assertEquals(248766473, model.maxInstanceCount()); - } - - @Test - public void testSerialize() { - AutoscaleTimeAndCapacity model = - new AutoscaleTimeAndCapacity() - .withTime("ckbasyypndd") - .withMinInstanceCount(1048772360) - .withMaxInstanceCount(248766473); - model = BinaryData.fromObject(model).toObject(AutoscaleTimeAndCapacity.class); - Assertions.assertEquals("ckbasyypndd", model.time()); - Assertions.assertEquals(1048772360, model.minInstanceCount()); - Assertions.assertEquals(248766473, model.maxInstanceCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorResponseInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorResponseInnerTests.java deleted file mode 100644 index 1d947f3f6bf2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorResponseInnerTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.AzureMonitorResponseInner; -import com.azure.resourcemanager.hdinsight.models.AzureMonitorSelectedConfigurations; -import com.azure.resourcemanager.hdinsight.models.AzureMonitorTableConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureMonitorResponseInnerTests { - @Test - public void testDeserialize() { - AzureMonitorResponseInner model = - BinaryData - .fromString( - "{\"clusterMonitoringEnabled\":true,\"workspaceId\":\"lg\",\"selectedConfigurations\":{\"configurationVersion\":\"vtvsexsowueluq\",\"globalConfigurations\":{\"wws\":\"hhxvrhmzkwpj\",\"qxujxukndxd\":\"ughftqsx\"},\"tableList\":[{\"name\":\"guufzd\"},{\"name\":\"yqtfihwh\"},{\"name\":\"tzingamvpph\"},{\"name\":\"zqzudph\"}]}}") - .toObject(AzureMonitorResponseInner.class); - Assertions.assertEquals(true, model.clusterMonitoringEnabled()); - Assertions.assertEquals("lg", model.workspaceId()); - Assertions.assertEquals("vtvsexsowueluq", model.selectedConfigurations().configurationVersion()); - Assertions.assertEquals("hhxvrhmzkwpj", model.selectedConfigurations().globalConfigurations().get("wws")); - Assertions.assertEquals("guufzd", model.selectedConfigurations().tableList().get(0).name()); - } - - @Test - public void testSerialize() { - AzureMonitorResponseInner model = - new AzureMonitorResponseInner() - .withClusterMonitoringEnabled(true) - .withWorkspaceId("lg") - .withSelectedConfigurations( - new AzureMonitorSelectedConfigurations() - .withConfigurationVersion("vtvsexsowueluq") - .withGlobalConfigurations(mapOf("wws", "hhxvrhmzkwpj", "qxujxukndxd", "ughftqsx")) - .withTableList( - Arrays - .asList( - new AzureMonitorTableConfiguration().withName("guufzd"), - new AzureMonitorTableConfiguration().withName("yqtfihwh"), - new AzureMonitorTableConfiguration().withName("tzingamvpph"), - new AzureMonitorTableConfiguration().withName("zqzudph")))); - model = BinaryData.fromObject(model).toObject(AzureMonitorResponseInner.class); - Assertions.assertEquals(true, model.clusterMonitoringEnabled()); - Assertions.assertEquals("lg", model.workspaceId()); - Assertions.assertEquals("vtvsexsowueluq", model.selectedConfigurations().configurationVersion()); - Assertions.assertEquals("hhxvrhmzkwpj", model.selectedConfigurations().globalConfigurations().get("wws")); - Assertions.assertEquals("guufzd", model.selectedConfigurations().tableList().get(0).name()); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorSelectedConfigurationsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorSelectedConfigurationsTests.java deleted file mode 100644 index 7b6852b176bf..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorSelectedConfigurationsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AzureMonitorSelectedConfigurations; -import com.azure.resourcemanager.hdinsight.models.AzureMonitorTableConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureMonitorSelectedConfigurationsTests { - @Test - public void testDeserialize() { - AzureMonitorSelectedConfigurations model = - BinaryData - .fromString( - "{\"configurationVersion\":\"kixrj\",\"globalConfigurations\":{\"frl\":\"rgz\",\"jylwbtlhflsj\":\"zszrnwoiindfpw\"},\"tableList\":[{\"name\":\"zfjvfbgofe\"},{\"name\":\"a\"}]}") - .toObject(AzureMonitorSelectedConfigurations.class); - Assertions.assertEquals("kixrj", model.configurationVersion()); - Assertions.assertEquals("rgz", model.globalConfigurations().get("frl")); - Assertions.assertEquals("zfjvfbgofe", model.tableList().get(0).name()); - } - - @Test - public void testSerialize() { - AzureMonitorSelectedConfigurations model = - new AzureMonitorSelectedConfigurations() - .withConfigurationVersion("kixrj") - .withGlobalConfigurations(mapOf("frl", "rgz", "jylwbtlhflsj", "zszrnwoiindfpw")) - .withTableList( - Arrays - .asList( - new AzureMonitorTableConfiguration().withName("zfjvfbgofe"), - new AzureMonitorTableConfiguration().withName("a"))); - model = BinaryData.fromObject(model).toObject(AzureMonitorSelectedConfigurations.class); - Assertions.assertEquals("kixrj", model.configurationVersion()); - Assertions.assertEquals("rgz", model.globalConfigurations().get("frl")); - Assertions.assertEquals("zfjvfbgofe", model.tableList().get(0).name()); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorTableConfigurationTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorTableConfigurationTests.java deleted file mode 100644 index 0cf06e73c8ad..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorTableConfigurationTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AzureMonitorTableConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureMonitorTableConfigurationTests { - @Test - public void testDeserialize() { - AzureMonitorTableConfiguration model = - BinaryData.fromString("{\"name\":\"qmqhldvriii\"}").toObject(AzureMonitorTableConfiguration.class); - Assertions.assertEquals("qmqhldvriii", model.name()); - } - - @Test - public void testSerialize() { - AzureMonitorTableConfiguration model = new AzureMonitorTableConfiguration().withName("qmqhldvriii"); - model = BinaryData.fromObject(model).toObject(AzureMonitorTableConfiguration.class); - Assertions.assertEquals("qmqhldvriii", model.name()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingMetersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingMetersTests.java deleted file mode 100644 index 0a0ffdffd45f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingMetersTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.BillingMeters; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMetersTests { - @Test - public void testDeserialize() { - BillingMeters model = - BinaryData - .fromString("{\"meterParameter\":\"t\",\"meter\":\"fhpagmhrskdsnf\",\"unit\":\"doakgtdlmkkzevdl\"}") - .toObject(BillingMeters.class); - Assertions.assertEquals("t", model.meterParameter()); - Assertions.assertEquals("fhpagmhrskdsnf", model.meter()); - Assertions.assertEquals("doakgtdlmkkzevdl", model.unit()); - } - - @Test - public void testSerialize() { - BillingMeters model = - new BillingMeters().withMeterParameter("t").withMeter("fhpagmhrskdsnf").withUnit("doakgtdlmkkzevdl"); - model = BinaryData.fromObject(model).toObject(BillingMeters.class); - Assertions.assertEquals("t", model.meterParameter()); - Assertions.assertEquals("fhpagmhrskdsnf", model.meter()); - Assertions.assertEquals("doakgtdlmkkzevdl", model.unit()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResourcesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResourcesTests.java deleted file mode 100644 index 50225fa16c60..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResourcesTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.BillingMeters; -import com.azure.resourcemanager.hdinsight.models.BillingResources; -import com.azure.resourcemanager.hdinsight.models.DiskBillingMeters; -import com.azure.resourcemanager.hdinsight.models.Tier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingResourcesTests { - @Test - public void testDeserialize() { - BillingResources model = - BinaryData - .fromString( - "{\"region\":\"ruvdmov\",\"billingMeters\":[{\"meterParameter\":\"xwabmqoe\",\"meter\":\"ifrvtpu\",\"unit\":\"jmqlgkfb\"},{\"meterParameter\":\"doaon\",\"meter\":\"jcntuj\",\"unit\":\"c\"},{\"meterParameter\":\"df\",\"meter\":\"waezkojvd\",\"unit\":\"zfoqouicybxar\"},{\"meterParameter\":\"szufoxciqopidoa\",\"meter\":\"iodhkhazxkhnz\",\"unit\":\"nlwntoe\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"wbw\",\"sku\":\"szzcmrvexztv\",\"tier\":\"Premium\"},{\"diskRpMeter\":\"sfraoyzko\",\"sku\":\"tlmngu\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"aldsy\",\"sku\":\"ximerqfobwyznk\",\"tier\":\"Standard\"}]}") - .toObject(BillingResources.class); - Assertions.assertEquals("ruvdmov", model.region()); - Assertions.assertEquals("xwabmqoe", model.billingMeters().get(0).meterParameter()); - Assertions.assertEquals("ifrvtpu", model.billingMeters().get(0).meter()); - Assertions.assertEquals("jmqlgkfb", model.billingMeters().get(0).unit()); - Assertions.assertEquals("wbw", model.diskBillingMeters().get(0).diskRpMeter()); - Assertions.assertEquals("szzcmrvexztv", model.diskBillingMeters().get(0).sku()); - Assertions.assertEquals(Tier.PREMIUM, model.diskBillingMeters().get(0).tier()); - } - - @Test - public void testSerialize() { - BillingResources model = - new BillingResources() - .withRegion("ruvdmov") - .withBillingMeters( - Arrays - .asList( - new BillingMeters() - .withMeterParameter("xwabmqoe") - .withMeter("ifrvtpu") - .withUnit("jmqlgkfb"), - new BillingMeters().withMeterParameter("doaon").withMeter("jcntuj").withUnit("c"), - new BillingMeters() - .withMeterParameter("df") - .withMeter("waezkojvd") - .withUnit("zfoqouicybxar"), - new BillingMeters() - .withMeterParameter("szufoxciqopidoa") - .withMeter("iodhkhazxkhnz") - .withUnit("nlwntoe"))) - .withDiskBillingMeters( - Arrays - .asList( - new DiskBillingMeters() - .withDiskRpMeter("wbw") - .withSku("szzcmrvexztv") - .withTier(Tier.PREMIUM), - new DiskBillingMeters() - .withDiskRpMeter("sfraoyzko") - .withSku("tlmngu") - .withTier(Tier.STANDARD), - new DiskBillingMeters() - .withDiskRpMeter("aldsy") - .withSku("ximerqfobwyznk") - .withTier(Tier.STANDARD))); - model = BinaryData.fromObject(model).toObject(BillingResources.class); - Assertions.assertEquals("ruvdmov", model.region()); - Assertions.assertEquals("xwabmqoe", model.billingMeters().get(0).meterParameter()); - Assertions.assertEquals("ifrvtpu", model.billingMeters().get(0).meter()); - Assertions.assertEquals("jmqlgkfb", model.billingMeters().get(0).unit()); - Assertions.assertEquals("wbw", model.diskBillingMeters().get(0).diskRpMeter()); - Assertions.assertEquals("szzcmrvexztv", model.diskBillingMeters().get(0).sku()); - Assertions.assertEquals(Tier.PREMIUM, model.diskBillingMeters().get(0).tier()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResponseListResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResponseListResultInnerTests.java deleted file mode 100644 index 6ef9b254964e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResponseListResultInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.BillingResponseListResultInner; -import com.azure.resourcemanager.hdinsight.models.BillingResources; -import com.azure.resourcemanager.hdinsight.models.FilterMode; -import com.azure.resourcemanager.hdinsight.models.OSType; -import com.azure.resourcemanager.hdinsight.models.VmSizeCompatibilityFilterV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingResponseListResultInnerTests { - @Test - public void testDeserialize() { - BillingResponseListResultInner model = - BinaryData - .fromString( - "{\"vmSizes\":[\"ofwq\",\"zqalkrmnjijpx\",\"cqqudf\",\"byxbaaabjy\"],\"vmSizesWithEncryptionAtHost\":[\"ffimrzrtuzqogsex\",\"evfdnwnwm\",\"wzsyyceuzs\",\"i\"],\"vmSizeFilters\":[{\"filterMode\":\"Recommend\",\"regions\":[\"xtrthz\"],\"clusterFlavors\":[\"tdwkqbrq\"],\"nodeTypes\":[\"axhexiilivp\"],\"clusterVersions\":[\"irqtdqoa\",\"oruzfgsquyfxrxx\"],\"osType\":[\"Windows\",\"Linux\"],\"vmSizes\":[\"xje\",\"wlwnwxuqlcv\"],\"espApplied\":\"ypatdooaojkniod\",\"computeIsolationSupported\":\"oebwnujhemms\"}],\"vmSizeProperties\":[{\"name\":\"c\",\"cores\":1751076005,\"dataDiskStorageTier\":\"jinfw\",\"label\":\"fltkacjv\",\"maxDataDiskCount\":6490344131392989957,\"memoryInMb\":6193547240906523394,\"supportedByVirtualMachines\":false,\"supportedByWebWorkerRoles\":false,\"virtualMachineResourceDiskSizeInMb\":2710412149295788675,\"webWorkerResourceDiskSizeInMb\":9061986906029534156},{\"name\":\"wpu\",\"cores\":593695187,\"dataDiskStorageTier\":\"lyls\",\"label\":\"k\",\"maxDataDiskCount\":2784365804369972582,\"memoryInMb\":1128791944810811868,\"supportedByVirtualMachines\":false,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":2466892292618671362,\"webWorkerResourceDiskSizeInMb\":1824695374727321161}],\"billingResources\":[{\"region\":\"psbzkfzbeyvpn\",\"billingMeters\":[],\"diskBillingMeters\":[]}]}") - .toObject(BillingResponseListResultInner.class); - Assertions.assertEquals("ofwq", model.vmSizes().get(0)); - Assertions.assertEquals("ffimrzrtuzqogsex", model.vmSizesWithEncryptionAtHost().get(0)); - Assertions.assertEquals(FilterMode.RECOMMEND, model.vmSizeFilters().get(0).filterMode()); - Assertions.assertEquals("xtrthz", model.vmSizeFilters().get(0).regions().get(0)); - Assertions.assertEquals("tdwkqbrq", model.vmSizeFilters().get(0).clusterFlavors().get(0)); - Assertions.assertEquals("axhexiilivp", model.vmSizeFilters().get(0).nodeTypes().get(0)); - Assertions.assertEquals("irqtdqoa", model.vmSizeFilters().get(0).clusterVersions().get(0)); - Assertions.assertEquals(OSType.WINDOWS, model.vmSizeFilters().get(0).osType().get(0)); - Assertions.assertEquals("xje", model.vmSizeFilters().get(0).vmSizes().get(0)); - Assertions.assertEquals("ypatdooaojkniod", model.vmSizeFilters().get(0).espApplied()); - Assertions.assertEquals("oebwnujhemms", model.vmSizeFilters().get(0).computeIsolationSupported()); - Assertions.assertEquals("psbzkfzbeyvpn", model.billingResources().get(0).region()); - } - - @Test - public void testSerialize() { - BillingResponseListResultInner model = - new BillingResponseListResultInner() - .withVmSizes(Arrays.asList("ofwq", "zqalkrmnjijpx", "cqqudf", "byxbaaabjy")) - .withVmSizesWithEncryptionAtHost(Arrays.asList("ffimrzrtuzqogsex", "evfdnwnwm", "wzsyyceuzs", "i")) - .withVmSizeFilters( - Arrays - .asList( - new VmSizeCompatibilityFilterV2() - .withFilterMode(FilterMode.RECOMMEND) - .withRegions(Arrays.asList("xtrthz")) - .withClusterFlavors(Arrays.asList("tdwkqbrq")) - .withNodeTypes(Arrays.asList("axhexiilivp")) - .withClusterVersions(Arrays.asList("irqtdqoa", "oruzfgsquyfxrxx")) - .withOsType(Arrays.asList(OSType.WINDOWS, OSType.LINUX)) - .withVmSizes(Arrays.asList("xje", "wlwnwxuqlcv")) - .withEspApplied("ypatdooaojkniod") - .withComputeIsolationSupported("oebwnujhemms"))) - .withBillingResources( - Arrays - .asList( - new BillingResources() - .withRegion("psbzkfzbeyvpn") - .withBillingMeters(Arrays.asList()) - .withDiskBillingMeters(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(BillingResponseListResultInner.class); - Assertions.assertEquals("ofwq", model.vmSizes().get(0)); - Assertions.assertEquals("ffimrzrtuzqogsex", model.vmSizesWithEncryptionAtHost().get(0)); - Assertions.assertEquals(FilterMode.RECOMMEND, model.vmSizeFilters().get(0).filterMode()); - Assertions.assertEquals("xtrthz", model.vmSizeFilters().get(0).regions().get(0)); - Assertions.assertEquals("tdwkqbrq", model.vmSizeFilters().get(0).clusterFlavors().get(0)); - Assertions.assertEquals("axhexiilivp", model.vmSizeFilters().get(0).nodeTypes().get(0)); - Assertions.assertEquals("irqtdqoa", model.vmSizeFilters().get(0).clusterVersions().get(0)); - Assertions.assertEquals(OSType.WINDOWS, model.vmSizeFilters().get(0).osType().get(0)); - Assertions.assertEquals("xje", model.vmSizeFilters().get(0).vmSizes().get(0)); - Assertions.assertEquals("ypatdooaojkniod", model.vmSizeFilters().get(0).espApplied()); - Assertions.assertEquals("oebwnujhemms", model.vmSizeFilters().get(0).computeIsolationSupported()); - Assertions.assertEquals("psbzkfzbeyvpn", model.billingResources().get(0).region()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/CapabilitiesResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/CapabilitiesResultInnerTests.java deleted file mode 100644 index b3c980842aff..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/CapabilitiesResultInnerTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.CapabilitiesResultInner; -import com.azure.resourcemanager.hdinsight.models.RegionsCapability; -import com.azure.resourcemanager.hdinsight.models.VersionsCapability; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CapabilitiesResultInnerTests { - @Test - public void testDeserialize() { - CapabilitiesResultInner model = - BinaryData - .fromString( - "{\"versions\":{\"rhzo\":{\"available\":[]},\"bmrqyibahwfl\":{\"available\":[]},\"dtmhrkwofyyvoqa\":{\"available\":[]},\"expbtg\":{\"available\":[]}},\"regions\":{\"xwbpokulpiuj\":{\"available\":[\"enwash\",\"tdtkcn\"]},\"wcciuqgbdbu\":{\"available\":[\"sipqii\",\"byuqerpqlp\"]},\"kkpwdreqnovvq\":{\"available\":[\"vfbtkuwh\",\"mhykojoxafnndl\",\"ichkoymkcdyhb\"]}},\"features\":[\"ljxywsu\",\"syrsndsytgadgvra\"],\"quota\":{\"coresUsed\":3800115719889326698,\"maxCoresAllowed\":4293634280481383135,\"regionalQuotas\":[{\"regionName\":\"wlquuijfqkace\",\"coresUsed\":9040428680411345053,\"coresAvailable\":7317687022147254934},{\"regionName\":\"ji\",\"coresUsed\":4782165638110518920,\"coresAvailable\":4706346504350614547},{\"regionName\":\"qkvpuvksgplsakn\",\"coresUsed\":3402828126111711911,\"coresAvailable\":44531628104673471},{\"regionName\":\"ph\",\"coresUsed\":7200001329577551370,\"coresAvailable\":4359673283515658098}]}}") - .toObject(CapabilitiesResultInner.class); - Assertions.assertEquals("enwash", model.regions().get("xwbpokulpiuj").available().get(0)); - Assertions.assertEquals("ljxywsu", model.features().get(0)); - } - - @Test - public void testSerialize() { - CapabilitiesResultInner model = - new CapabilitiesResultInner() - .withVersions( - mapOf( - "rhzo", - new VersionsCapability().withAvailable(Arrays.asList()), - "bmrqyibahwfl", - new VersionsCapability().withAvailable(Arrays.asList()), - "dtmhrkwofyyvoqa", - new VersionsCapability().withAvailable(Arrays.asList()), - "expbtg", - new VersionsCapability().withAvailable(Arrays.asList()))) - .withRegions( - mapOf( - "xwbpokulpiuj", - new RegionsCapability().withAvailable(Arrays.asList("enwash", "tdtkcn")), - "wcciuqgbdbu", - new RegionsCapability().withAvailable(Arrays.asList("sipqii", "byuqerpqlp")), - "kkpwdreqnovvq", - new RegionsCapability() - .withAvailable(Arrays.asList("vfbtkuwh", "mhykojoxafnndl", "ichkoymkcdyhb")))) - .withFeatures(Arrays.asList("ljxywsu", "syrsndsytgadgvra")); - model = BinaryData.fromObject(model).toObject(CapabilitiesResultInner.class); - Assertions.assertEquals("enwash", model.regions().get("xwbpokulpiuj").available().get(0)); - Assertions.assertEquals("ljxywsu", model.features().get(0)); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClientGroupInfoTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClientGroupInfoTests.java deleted file mode 100644 index bc75be2bbf9a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClientGroupInfoTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ClientGroupInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientGroupInfoTests { - @Test - public void testDeserialize() { - ClientGroupInfo model = - BinaryData - .fromString("{\"groupName\":\"crzevdphlx\",\"groupId\":\"lthqtrgqjbp\"}") - .toObject(ClientGroupInfo.class); - Assertions.assertEquals("crzevdphlx", model.groupName()); - Assertions.assertEquals("lthqtrgqjbp", model.groupId()); - } - - @Test - public void testSerialize() { - ClientGroupInfo model = new ClientGroupInfo().withGroupName("crzevdphlx").withGroupId("lthqtrgqjbp"); - model = BinaryData.fromObject(model).toObject(ClientGroupInfo.class); - Assertions.assertEquals("crzevdphlx", model.groupName()); - Assertions.assertEquals("lthqtrgqjbp", model.groupId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterConfigurationsInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterConfigurationsInnerTests.java deleted file mode 100644 index 8e1bbdf85c7d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterConfigurationsInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.ClusterConfigurationsInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClusterConfigurationsInnerTests { - @Test - public void testDeserialize() { - ClusterConfigurationsInner model = - BinaryData - .fromString( - "{\"configurations\":{\"bjbsybb\":{\"gkakmokzhjjklff\":\"kzbzkdvncjabudu\",\"bizikayuhq\":\"mouwqlgzrfzeey\"},\"dgmfpgvmpipasl\":{\"t\":\"r\"},\"pdrhne\":{\"wutwbdsre\":\"aqfxss\"}}}") - .toObject(ClusterConfigurationsInner.class); - Assertions.assertEquals("kzbzkdvncjabudu", model.configurations().get("bjbsybb").get("gkakmokzhjjklff")); - } - - @Test - public void testSerialize() { - ClusterConfigurationsInner model = - new ClusterConfigurationsInner() - .withConfigurations( - mapOf( - "bjbsybb", - mapOf("gkakmokzhjjklff", "kzbzkdvncjabudu", "bizikayuhq", "mouwqlgzrfzeey"), - "dgmfpgvmpipasl", - mapOf("t", "r"), - "pdrhne", - mapOf("wutwbdsre", "aqfxss"))); - model = BinaryData.fromObject(model).toObject(ClusterConfigurationsInner.class); - Assertions.assertEquals("kzbzkdvncjabudu", model.configurations().get("bjbsybb").get("gkakmokzhjjklff")); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterDefinitionTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterDefinitionTests.java deleted file mode 100644 index ca832332e8bb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterDefinitionTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ClusterDefinition; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClusterDefinitionTests { - @Test - public void testDeserialize() { - ClusterDefinition model = - BinaryData - .fromString( - "{\"blueprint\":\"audccsnhs\",\"kind\":\"nyejhkryhtnap\",\"componentVersion\":{\"ni\":\"lokjyemkk\",\"ilzyd\":\"joxzjnchgejspodm\"},\"configurations\":\"datao\"}") - .toObject(ClusterDefinition.class); - Assertions.assertEquals("audccsnhs", model.blueprint()); - Assertions.assertEquals("nyejhkryhtnap", model.kind()); - Assertions.assertEquals("lokjyemkk", model.componentVersion().get("ni")); - } - - @Test - public void testSerialize() { - ClusterDefinition model = - new ClusterDefinition() - .withBlueprint("audccsnhs") - .withKind("nyejhkryhtnap") - .withComponentVersion(mapOf("ni", "lokjyemkk", "ilzyd", "joxzjnchgejspodm")) - .withConfigurations("datao"); - model = BinaryData.fromObject(model).toObject(ClusterDefinition.class); - Assertions.assertEquals("audccsnhs", model.blueprint()); - Assertions.assertEquals("nyejhkryhtnap", model.kind()); - Assertions.assertEquals("lokjyemkk", model.componentVersion().get("ni")); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterIdentityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterIdentityTests.java deleted file mode 100644 index 88260224bb97..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterIdentityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ClusterIdentity; -import com.azure.resourcemanager.hdinsight.models.ResourceIdentityType; -import com.azure.resourcemanager.hdinsight.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClusterIdentityTests { - @Test - public void testDeserialize() { - ClusterIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"u\",\"tenantId\":\"a\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"tthzrvqd\":{\"principalId\":\"vvtpgvdfgio\",\"clientId\":\"ftutqxlngxlefgu\",\"tenantId\":\"xkrxdqmi\"},\"nyktzlcuiy\":{\"principalId\":\"bhj\",\"clientId\":\"igeho\",\"tenantId\":\"bowsk\"},\"ocpecfvmmco\":{\"principalId\":\"qyw\",\"clientId\":\"drvyn\",\"tenantId\":\"gpphrcgyn\"}}}") - .toObject(ClusterIdentity.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("xkrxdqmi", model.userAssignedIdentities().get("tthzrvqd").tenantId()); - } - - @Test - public void testSerialize() { - ClusterIdentity model = - new ClusterIdentity() - .withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "tthzrvqd", - new UserAssignedIdentity().withTenantId("xkrxdqmi"), - "nyktzlcuiy", - new UserAssignedIdentity().withTenantId("bowsk"), - "ocpecfvmmco", - new UserAssignedIdentity().withTenantId("gpphrcgyn"))); - model = BinaryData.fromObject(model).toObject(ClusterIdentity.class); - Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); - Assertions.assertEquals("xkrxdqmi", model.userAssignedIdentities().get("tthzrvqd").tenantId()); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterListResultTests.java deleted file mode 100644 index 6bc1b2987e44..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterListResultTests.java +++ /dev/null @@ -1,187 +0,0 @@ -// 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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.ClusterInner; -import com.azure.resourcemanager.hdinsight.models.ClusterGetProperties; -import com.azure.resourcemanager.hdinsight.models.ClusterIdentity; -import com.azure.resourcemanager.hdinsight.models.ClusterListResult; -import com.azure.resourcemanager.hdinsight.models.HDInsightClusterProvisioningState; -import com.azure.resourcemanager.hdinsight.models.OSType; -import com.azure.resourcemanager.hdinsight.models.ResourceIdentityType; -import com.azure.resourcemanager.hdinsight.models.Tier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClusterListResultTests { - @Test - public void testDeserialize() { - ClusterListResult model = - BinaryData - .fromString( - "{\"value\":[{\"etag\":\"buxwgip\",\"zones\":[\"nowkgshw\",\"nkixzbinj\"],\"properties\":{\"clusterVersion\":\"ttmrywnuzoqf\",\"clusterHdpVersion\":\"yqzrnkcqvyxlw\",\"osType\":\"Linux\",\"tier\":\"Premium\",\"clusterId\":\"ohoqqnwvlryav\",\"provisioningState\":\"Failed\",\"createdDate\":\"mqhgyxzkonocuk\",\"clusterState\":\"lyaxuc\",\"errors\":[],\"connectivityEndpoints\":[],\"minSupportedTlsVersion\":\"beypewrmjmw\",\"privateLinkConfigurations\":[],\"privateEndpointConnections\":[]},\"identity\":{\"principalId\":\"senhwlrs\",\"tenantId\":\"rzpwvlqdqgbiq\",\"type\":\"SystemAssigned," - + " UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"aetcktvfcivfs\",\"tags\":{\"ctq\":\"m\",\"ebrjcxe\":\"jf\",\"jrbirphxepcyv\":\"fuwutttxf\",\"j\":\"hfnljkyq\"},\"id\":\"uujqgidokgjljyo\",\"name\":\"gvcl\",\"type\":\"bgsncghkjeszzhb\"},{\"etag\":\"htxfvgxbfsmxnehm\",\"zones\":[\"cxgod\"],\"properties\":{\"clusterVersion\":\"qkkrb\",\"clusterHdpVersion\":\"ukgri\",\"osType\":\"Linux\",\"tier\":\"Premium\",\"clusterId\":\"bxzpuzycisp\",\"provisioningState\":\"Deleting\",\"createdDate\":\"kbrpyydhibnuq\",\"clusterState\":\"pikad\",\"errors\":[],\"connectivityEndpoints\":[],\"minSupportedTlsVersion\":\"buynhijggm\",\"privateLinkConfigurations\":[],\"privateEndpointConnections\":[]},\"identity\":{\"principalId\":\"utrc\",\"tenantId\":\"na\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"runmp\",\"tags\":{\"skpbhenbtkcxywn\":\"dbhrbnlankxm\",\"qidybyx\":\"tnrsyn\",\"aaxdbabphlwrq\":\"zfcl\"},\"id\":\"fkts\",\"name\":\"hsucoc\",\"type\":\"nyyazttbtwwrqpue\"},{\"etag\":\"kzywbiex\",\"zones\":[\"yueaxibxujwb\",\"qwalmuzyoxaepd\",\"zjancuxr\",\"d\"],\"properties\":{\"clusterVersion\":\"v\",\"clusterHdpVersion\":\"niwdjsw\",\"osType\":\"Windows\",\"tier\":\"Standard\",\"clusterId\":\"gnxytxhpzxbz\",\"provisioningState\":\"Succeeded\",\"createdDate\":\"cuh\",\"clusterState\":\"tcty\",\"errors\":[],\"connectivityEndpoints\":[],\"minSupportedTlsVersion\":\"plwzbhvgyugu\",\"privateLinkConfigurations\":[],\"privateEndpointConnections\":[]},\"identity\":{\"principalId\":\"xquk\",\"tenantId\":\"plgmgsxnk\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"slpvlop\",\"tags\":{\"wzbaiue\":\"ighxpk\",\"a\":\"baumnyqupedeoj\"},\"id\":\"ckhsmtxpsieb\",\"name\":\"fhvpesaps\",\"type\":\"rdqmhjjdhtldwkyz\"},{\"etag\":\"utknc\",\"zones\":[\"wsvlxotogtwrupqs\",\"vnm\",\"cykvceo\"],\"properties\":{\"clusterVersion\":\"lo\",\"clusterHdpVersion\":\"oty\",\"osType\":\"Windows\",\"tier\":\"Premium\",\"clusterId\":\"bkc\",\"provisioningState\":\"InProgress\",\"createdDate\":\"kphywpnvjto\",\"clusterState\":\"ermclfplphoxuscr\",\"errors\":[],\"connectivityEndpoints\":[],\"minSupportedTlsVersion\":\"bjtazqugxywpmu\",\"privateLinkConfigurations\":[],\"privateEndpointConnections\":[]},\"identity\":{\"principalId\":\"kqujidsuyono\",\"tenantId\":\"laocqxtccmg\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"tlmoyrx\",\"tags\":{\"wpzntxhdzh\":\"u\",\"rxsbkyvp\":\"rqjbhckfrl\"},\"id\":\"ca\",\"name\":\"uzbpzkafku\",\"type\":\"b\"}],\"nextLink\":\"nwbmeh\"}") - .toObject(ClusterListResult.class); - Assertions.assertEquals("aetcktvfcivfs", model.value().get(0).location()); - Assertions.assertEquals("m", model.value().get(0).tags().get("ctq")); - Assertions.assertEquals("buxwgip", model.value().get(0).etag()); - Assertions.assertEquals("nowkgshw", model.value().get(0).zones().get(0)); - Assertions.assertEquals("ttmrywnuzoqf", model.value().get(0).properties().clusterVersion()); - Assertions.assertEquals("yqzrnkcqvyxlw", model.value().get(0).properties().clusterHdpVersion()); - Assertions.assertEquals(OSType.LINUX, model.value().get(0).properties().osType()); - Assertions.assertEquals(Tier.PREMIUM, model.value().get(0).properties().tier()); - Assertions.assertEquals("ohoqqnwvlryav", model.value().get(0).properties().clusterId()); - Assertions - .assertEquals( - HDInsightClusterProvisioningState.FAILED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("mqhgyxzkonocuk", model.value().get(0).properties().createdDate()); - Assertions.assertEquals("lyaxuc", model.value().get(0).properties().clusterState()); - Assertions.assertEquals("beypewrmjmw", model.value().get(0).properties().minSupportedTlsVersion()); - Assertions - .assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - } - - @Test - public void testSerialize() { - ClusterListResult model = - new ClusterListResult() - .withValue( - Arrays - .asList( - new ClusterInner() - .withLocation("aetcktvfcivfs") - .withTags( - mapOf("ctq", "m", "ebrjcxe", "jf", "jrbirphxepcyv", "fuwutttxf", "j", "hfnljkyq")) - .withEtag("buxwgip") - .withZones(Arrays.asList("nowkgshw", "nkixzbinj")) - .withProperties( - new ClusterGetProperties() - .withClusterVersion("ttmrywnuzoqf") - .withClusterHdpVersion("yqzrnkcqvyxlw") - .withOsType(OSType.LINUX) - .withTier(Tier.PREMIUM) - .withClusterId("ohoqqnwvlryav") - .withProvisioningState(HDInsightClusterProvisioningState.FAILED) - .withCreatedDate("mqhgyxzkonocuk") - .withClusterState("lyaxuc") - .withErrors(Arrays.asList()) - .withConnectivityEndpoints(Arrays.asList()) - .withMinSupportedTlsVersion("beypewrmjmw") - .withPrivateLinkConfigurations(Arrays.asList())) - .withIdentity( - new ClusterIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())), - new ClusterInner() - .withLocation("runmp") - .withTags( - mapOf( - "skpbhenbtkcxywn", - "dbhrbnlankxm", - "qidybyx", - "tnrsyn", - "aaxdbabphlwrq", - "zfcl")) - .withEtag("htxfvgxbfsmxnehm") - .withZones(Arrays.asList("cxgod")) - .withProperties( - new ClusterGetProperties() - .withClusterVersion("qkkrb") - .withClusterHdpVersion("ukgri") - .withOsType(OSType.LINUX) - .withTier(Tier.PREMIUM) - .withClusterId("bxzpuzycisp") - .withProvisioningState(HDInsightClusterProvisioningState.DELETING) - .withCreatedDate("kbrpyydhibnuq") - .withClusterState("pikad") - .withErrors(Arrays.asList()) - .withConnectivityEndpoints(Arrays.asList()) - .withMinSupportedTlsVersion("buynhijggm") - .withPrivateLinkConfigurations(Arrays.asList())) - .withIdentity( - new ClusterIdentity() - .withType(ResourceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())), - new ClusterInner() - .withLocation("slpvlop") - .withTags(mapOf("wzbaiue", "ighxpk", "a", "baumnyqupedeoj")) - .withEtag("kzywbiex") - .withZones(Arrays.asList("yueaxibxujwb", "qwalmuzyoxaepd", "zjancuxr", "d")) - .withProperties( - new ClusterGetProperties() - .withClusterVersion("v") - .withClusterHdpVersion("niwdjsw") - .withOsType(OSType.WINDOWS) - .withTier(Tier.STANDARD) - .withClusterId("gnxytxhpzxbz") - .withProvisioningState(HDInsightClusterProvisioningState.SUCCEEDED) - .withCreatedDate("cuh") - .withClusterState("tcty") - .withErrors(Arrays.asList()) - .withConnectivityEndpoints(Arrays.asList()) - .withMinSupportedTlsVersion("plwzbhvgyugu") - .withPrivateLinkConfigurations(Arrays.asList())) - .withIdentity( - new ClusterIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())), - new ClusterInner() - .withLocation("tlmoyrx") - .withTags(mapOf("wpzntxhdzh", "u", "rxsbkyvp", "rqjbhckfrl")) - .withEtag("utknc") - .withZones(Arrays.asList("wsvlxotogtwrupqs", "vnm", "cykvceo")) - .withProperties( - new ClusterGetProperties() - .withClusterVersion("lo") - .withClusterHdpVersion("oty") - .withOsType(OSType.WINDOWS) - .withTier(Tier.PREMIUM) - .withClusterId("bkc") - .withProvisioningState(HDInsightClusterProvisioningState.IN_PROGRESS) - .withCreatedDate("kphywpnvjto") - .withClusterState("ermclfplphoxuscr") - .withErrors(Arrays.asList()) - .withConnectivityEndpoints(Arrays.asList()) - .withMinSupportedTlsVersion("bjtazqugxywpmu") - .withPrivateLinkConfigurations(Arrays.asList())) - .withIdentity( - new ClusterIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())))); - model = BinaryData.fromObject(model).toObject(ClusterListResult.class); - Assertions.assertEquals("aetcktvfcivfs", model.value().get(0).location()); - Assertions.assertEquals("m", model.value().get(0).tags().get("ctq")); - Assertions.assertEquals("buxwgip", model.value().get(0).etag()); - Assertions.assertEquals("nowkgshw", model.value().get(0).zones().get(0)); - Assertions.assertEquals("ttmrywnuzoqf", model.value().get(0).properties().clusterVersion()); - Assertions.assertEquals("yqzrnkcqvyxlw", model.value().get(0).properties().clusterHdpVersion()); - Assertions.assertEquals(OSType.LINUX, model.value().get(0).properties().osType()); - Assertions.assertEquals(Tier.PREMIUM, model.value().get(0).properties().tier()); - Assertions.assertEquals("ohoqqnwvlryav", model.value().get(0).properties().clusterId()); - Assertions - .assertEquals( - HDInsightClusterProvisioningState.FAILED, model.value().get(0).properties().provisioningState()); - Assertions.assertEquals("mqhgyxzkonocuk", model.value().get(0).properties().createdDate()); - Assertions.assertEquals("lyaxuc", model.value().get(0).properties().clusterState()); - Assertions.assertEquals("beypewrmjmw", model.value().get(0).properties().minSupportedTlsVersion()); - Assertions - .assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterMonitoringResponseInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterMonitoringResponseInnerTests.java deleted file mode 100644 index 84fd31bf1309..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterMonitoringResponseInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.ClusterMonitoringResponseInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClusterMonitoringResponseInnerTests { - @Test - public void testDeserialize() { - ClusterMonitoringResponseInner model = - BinaryData - .fromString("{\"clusterMonitoringEnabled\":true,\"workspaceId\":\"imejzanl\"}") - .toObject(ClusterMonitoringResponseInner.class); - Assertions.assertEquals(true, model.clusterMonitoringEnabled()); - Assertions.assertEquals("imejzanl", model.workspaceId()); - } - - @Test - public void testSerialize() { - ClusterMonitoringResponseInner model = - new ClusterMonitoringResponseInner().withClusterMonitoringEnabled(true).withWorkspaceId("imejzanl"); - model = BinaryData.fromObject(model).toObject(ClusterMonitoringResponseInner.class); - Assertions.assertEquals(true, model.clusterMonitoringEnabled()); - Assertions.assertEquals("imejzanl", model.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterPatchParametersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterPatchParametersTests.java deleted file mode 100644 index 9a3b5c9e8ac1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterPatchParametersTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ClusterPatchParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClusterPatchParametersTests { - @Test - public void testDeserialize() { - ClusterPatchParameters model = - BinaryData - .fromString("{\"tags\":{\"hajdeyeamdpha\":\"ifsjttgzfbishcb\"}}") - .toObject(ClusterPatchParameters.class); - Assertions.assertEquals("ifsjttgzfbishcb", model.tags().get("hajdeyeamdpha")); - } - - @Test - public void testSerialize() { - ClusterPatchParameters model = new ClusterPatchParameters().withTags(mapOf("hajdeyeamdpha", "ifsjttgzfbishcb")); - model = BinaryData.fromObject(model).toObject(ClusterPatchParameters.class); - Assertions.assertEquals("ifsjttgzfbishcb", model.tags().get("hajdeyeamdpha")); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterResizeParametersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterResizeParametersTests.java deleted file mode 100644 index 49776b8c3d7b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterResizeParametersTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ClusterResizeParameters; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClusterResizeParametersTests { - @Test - public void testDeserialize() { - ClusterResizeParameters model = - BinaryData.fromString("{\"targetInstanceCount\":2008133985}").toObject(ClusterResizeParameters.class); - Assertions.assertEquals(2008133985, model.targetInstanceCount()); - } - - @Test - public void testSerialize() { - ClusterResizeParameters model = new ClusterResizeParameters().withTargetInstanceCount(2008133985); - model = BinaryData.fromObject(model).toObject(ClusterResizeParameters.class); - Assertions.assertEquals(2008133985, model.targetInstanceCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteMockTests.java deleted file mode 100644 index 9343aff5aa6b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("fhjxakvvjgs", "ordilmywwtkgkxny", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsMockTests.java deleted file mode 100644 index edb2db3fcbbd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// 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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.ExecuteScriptActionParameters; -import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersExecuteScriptActionsMockTests { - @Test - public void testExecuteScriptActions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusters() - .executeScriptActions( - "lfkqojpy", - "vgtrdcnifmzzs", - new ExecuteScriptActionParameters() - .withScriptActions( - Arrays - .asList( - new RuntimeScriptAction() - .withName("brn") - .withUri("suxmpraf") - .withParameters("ckh") - .withRoles(Arrays.asList("xvd", "ffwafq", "oudaspavehhrvk", "unzo")))) - .withPersistOnSuccess(true), - Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeMockTests.java deleted file mode 100644 index 3bc5863eb3e9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.ClusterResizeParameters; -import com.azure.resourcemanager.hdinsight.models.RoleName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersResizeMockTests { - @Test - public void testResize() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusters() - .resize( - "vldspa", - "tjb", - RoleName.WORKERNODE, - new ClusterResizeParameters().withTargetInstanceCount(1616776415), - Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationMockTests.java deleted file mode 100644 index f0bff17005de..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.Autoscale; -import com.azure.resourcemanager.hdinsight.models.AutoscaleCapacity; -import com.azure.resourcemanager.hdinsight.models.AutoscaleConfigurationUpdateParameter; -import com.azure.resourcemanager.hdinsight.models.AutoscaleRecurrence; -import com.azure.resourcemanager.hdinsight.models.RoleName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClustersUpdateAutoScaleConfigurationMockTests { - @Test - public void testUpdateAutoScaleConfiguration() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .clusters() - .updateAutoScaleConfiguration( - "flvestmjlxrrilo", - "apeewchpxlkt", - RoleName.WORKERNODE, - new AutoscaleConfigurationUpdateParameter() - .withAutoscale( - new Autoscale() - .withCapacity( - new AutoscaleCapacity() - .withMinInstanceCount(1984241161) - .withMaxInstanceCount(463707796)) - .withRecurrence( - new AutoscaleRecurrence().withTimeZone("vu").withSchedule(Arrays.asList()))), - Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeIsolationPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeIsolationPropertiesTests.java deleted file mode 100644 index d3eab0913e18..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeIsolationPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ComputeIsolationProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ComputeIsolationPropertiesTests { - @Test - public void testDeserialize() { - ComputeIsolationProperties model = - BinaryData - .fromString("{\"enableComputeIsolation\":false,\"hostSku\":\"rfidfvzwdz\"}") - .toObject(ComputeIsolationProperties.class); - Assertions.assertEquals(false, model.enableComputeIsolation()); - Assertions.assertEquals("rfidfvzwdz", model.hostSku()); - } - - @Test - public void testSerialize() { - ComputeIsolationProperties model = - new ComputeIsolationProperties().withEnableComputeIsolation(false).withHostSku("rfidfvzwdz"); - model = BinaryData.fromObject(model).toObject(ComputeIsolationProperties.class); - Assertions.assertEquals(false, model.enableComputeIsolation()); - Assertions.assertEquals("rfidfvzwdz", model.hostSku()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeProfileTests.java deleted file mode 100644 index 4da073be7363..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeProfileTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Autoscale; -import com.azure.resourcemanager.hdinsight.models.ComputeProfile; -import com.azure.resourcemanager.hdinsight.models.HardwareProfile; -import com.azure.resourcemanager.hdinsight.models.OsProfile; -import com.azure.resourcemanager.hdinsight.models.Role; -import com.azure.resourcemanager.hdinsight.models.VirtualNetworkProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ComputeProfileTests { - @Test - public void testDeserialize() { - ComputeProfile model = - BinaryData - .fromString( - "{\"roles\":[{\"name\":\"vyevcciqi\",\"minInstanceCount\":720964194,\"targetInstanceCount\":1574404612,\"VMGroupName\":\"bwjzr\",\"autoscale\":{},\"hardwareProfile\":{\"vmSize\":\"ispe\"},\"osProfile\":{},\"virtualNetworkProfile\":{\"id\":\"kufubljo\",\"subnet\":\"qeof\"},\"dataDisksGroups\":[],\"scriptActions\":[],\"encryptDataDisks\":false}]}") - .toObject(ComputeProfile.class); - Assertions.assertEquals("vyevcciqi", model.roles().get(0).name()); - Assertions.assertEquals(720964194, model.roles().get(0).minInstanceCount()); - Assertions.assertEquals(1574404612, model.roles().get(0).targetInstanceCount()); - Assertions.assertEquals("bwjzr", model.roles().get(0).vMGroupName()); - Assertions.assertEquals("ispe", model.roles().get(0).hardwareProfile().vmSize()); - Assertions.assertEquals("kufubljo", model.roles().get(0).virtualNetworkProfile().id()); - Assertions.assertEquals("qeof", model.roles().get(0).virtualNetworkProfile().subnet()); - Assertions.assertEquals(false, model.roles().get(0).encryptDataDisks()); - } - - @Test - public void testSerialize() { - ComputeProfile model = - new ComputeProfile() - .withRoles( - Arrays - .asList( - new Role() - .withName("vyevcciqi") - .withMinInstanceCount(720964194) - .withTargetInstanceCount(1574404612) - .withVMGroupName("bwjzr") - .withAutoscaleConfiguration(new Autoscale()) - .withHardwareProfile(new HardwareProfile().withVmSize("ispe")) - .withOsProfile(new OsProfile()) - .withVirtualNetworkProfile( - new VirtualNetworkProfile().withId("kufubljo").withSubnet("qeof")) - .withDataDisksGroups(Arrays.asList()) - .withScriptActions(Arrays.asList()) - .withEncryptDataDisks(false))); - model = BinaryData.fromObject(model).toObject(ComputeProfile.class); - Assertions.assertEquals("vyevcciqi", model.roles().get(0).name()); - Assertions.assertEquals(720964194, model.roles().get(0).minInstanceCount()); - Assertions.assertEquals(1574404612, model.roles().get(0).targetInstanceCount()); - Assertions.assertEquals("bwjzr", model.roles().get(0).vMGroupName()); - Assertions.assertEquals("ispe", model.roles().get(0).hardwareProfile().vmSize()); - Assertions.assertEquals("kufubljo", model.roles().get(0).virtualNetworkProfile().id()); - Assertions.assertEquals("qeof", model.roles().get(0).virtualNetworkProfile().subnet()); - Assertions.assertEquals(false, model.roles().get(0).encryptDataDisks()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetWithResponseMockTests.java deleted file mode 100644 index 333594a6c01e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"muapcvhdbevw\":\"lm\",\"qzinkfkbg\":\"qxeysko\",\"owxeqocljmy\":\"z\",\"jeokbzefezrxccz\":\"vkzqk\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Map response = - manager.configurations().getWithResponse("gqcwdhohsdtmc", "zsu", "cohdx", Context.NONE).getValue(); - - Assertions.assertEquals("lm", response.get("muapcvhdbevw")); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListWithResponseMockTests.java deleted file mode 100644 index 67cbfefad12b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.ClusterConfigurations; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConfigurationsListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"configurations\":{\"irpghriypoqeyh\":{\"mq\":\"eeebtijvacv\",\"nw\":\"bqqxlaj\",\"afgaoqlt\":\"acevehjkuyx\",\"gv\":\"aeylinm\"},\"vmqfoud\":{\"kprlpyznuc\":\"h\",\"fuxtyasiibmiybnn\":\"qdsmexiit\",\"hnmgixhcm\":\"stgnl\"},\"xhugcm\":{\"ndm\":\"hcgyyprotwyp\"},\"ftpmdtzfjltfv\":{\"rb\":\"avlg\"}}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterConfigurations response = - manager.configurations().listWithResponse("czbgomfgbeg", "qgleohibetnluank", Context.NONE).getValue(); - - Assertions.assertEquals("eeebtijvacv", response.configurations().get("irpghriypoqeyh").get("mq")); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateMockTests.java deleted file mode 100644 index 26329d2130f5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConfigurationsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.configurations().update("zcyjtot", "vopvp", "dbzqgqqihed", mapOf("bcysih", "qwthmky"), Context.NONE); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConnectivityEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConnectivityEndpointTests.java deleted file mode 100644 index f2ebaeda3bdc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConnectivityEndpointTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectivityEndpointTests { - @Test - public void testDeserialize() { - ConnectivityEndpoint model = - BinaryData - .fromString( - "{\"name\":\"vsovmyokac\",\"protocol\":\"kwlhzdo\",\"location\":\"xjmflbvv\",\"port\":681133133,\"privateIPAddress\":\"kcciwwzjuqkhr\"}") - .toObject(ConnectivityEndpoint.class); - Assertions.assertEquals("vsovmyokac", model.name()); - Assertions.assertEquals("kwlhzdo", model.protocol()); - Assertions.assertEquals("xjmflbvv", model.location()); - Assertions.assertEquals(681133133, model.port()); - Assertions.assertEquals("kcciwwzjuqkhr", model.privateIpAddress()); - } - - @Test - public void testSerialize() { - ConnectivityEndpoint model = - new ConnectivityEndpoint() - .withName("vsovmyokac") - .withProtocol("kwlhzdo") - .withLocation("xjmflbvv") - .withPort(681133133) - .withPrivateIpAddress("kcciwwzjuqkhr"); - model = BinaryData.fromObject(model).toObject(ConnectivityEndpoint.class); - Assertions.assertEquals("vsovmyokac", model.name()); - Assertions.assertEquals("kwlhzdo", model.protocol()); - Assertions.assertEquals("xjmflbvv", model.location()); - Assertions.assertEquals(681133133, model.port()); - Assertions.assertEquals("kcciwwzjuqkhr", model.privateIpAddress()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DataDisksGroupsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DataDisksGroupsTests.java deleted file mode 100644 index aec14e20f250..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DataDisksGroupsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.DataDisksGroups; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DataDisksGroupsTests { - @Test - public void testDeserialize() { - DataDisksGroups model = - BinaryData - .fromString( - "{\"disksPerNode\":913932124,\"storageAccountType\":\"dosvqwhbmdgbbjf\",\"diskSizeGB\":763703494}") - .toObject(DataDisksGroups.class); - Assertions.assertEquals(913932124, model.disksPerNode()); - } - - @Test - public void testSerialize() { - DataDisksGroups model = new DataDisksGroups().withDisksPerNode(913932124); - model = BinaryData.fromObject(model).toObject(DataDisksGroups.class); - Assertions.assertEquals(913932124, model.disksPerNode()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DimensionTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DimensionTests.java deleted file mode 100644 index 8e495d7aa92f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DimensionTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Dimension; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DimensionTests { - @Test - public void testDeserialize() { - Dimension model = - BinaryData - .fromString( - "{\"name\":\"jbazpjuohminy\",\"displayName\":\"norwmduvwpklvx\",\"internalName\":\"ygdxpgpqchis\",\"toBeExportedForShoebox\":false}") - .toObject(Dimension.class); - Assertions.assertEquals("jbazpjuohminy", model.name()); - Assertions.assertEquals("norwmduvwpklvx", model.displayName()); - Assertions.assertEquals("ygdxpgpqchis", model.internalName()); - Assertions.assertEquals(false, model.toBeExportedForShoebox()); - } - - @Test - public void testSerialize() { - Dimension model = - new Dimension() - .withName("jbazpjuohminy") - .withDisplayName("norwmduvwpklvx") - .withInternalName("ygdxpgpqchis") - .withToBeExportedForShoebox(false); - model = BinaryData.fromObject(model).toObject(Dimension.class); - Assertions.assertEquals("jbazpjuohminy", model.name()); - Assertions.assertEquals("norwmduvwpklvx", model.displayName()); - Assertions.assertEquals("ygdxpgpqchis", model.internalName()); - Assertions.assertEquals(false, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DiskBillingMetersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DiskBillingMetersTests.java deleted file mode 100644 index 57e5268a253d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DiskBillingMetersTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.DiskBillingMeters; -import com.azure.resourcemanager.hdinsight.models.Tier; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiskBillingMetersTests { - @Test - public void testDeserialize() { - DiskBillingMeters model = - BinaryData - .fromString("{\"diskRpMeter\":\"wpusdsttwvogv\",\"sku\":\"ejdcngqqmoakuf\",\"tier\":\"Premium\"}") - .toObject(DiskBillingMeters.class); - Assertions.assertEquals("wpusdsttwvogv", model.diskRpMeter()); - Assertions.assertEquals("ejdcngqqmoakuf", model.sku()); - Assertions.assertEquals(Tier.PREMIUM, model.tier()); - } - - @Test - public void testSerialize() { - DiskBillingMeters model = - new DiskBillingMeters().withDiskRpMeter("wpusdsttwvogv").withSku("ejdcngqqmoakuf").withTier(Tier.PREMIUM); - model = BinaryData.fromObject(model).toObject(DiskBillingMeters.class); - Assertions.assertEquals("wpusdsttwvogv", model.diskRpMeter()); - Assertions.assertEquals("ejdcngqqmoakuf", model.sku()); - Assertions.assertEquals(Tier.PREMIUM, model.tier()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/EncryptionInTransitPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/EncryptionInTransitPropertiesTests.java deleted file mode 100644 index 9792c9bcacaa..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/EncryptionInTransitPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.EncryptionInTransitProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EncryptionInTransitPropertiesTests { - @Test - public void testDeserialize() { - EncryptionInTransitProperties model = - BinaryData - .fromString("{\"isEncryptionInTransitEnabled\":false}") - .toObject(EncryptionInTransitProperties.class); - Assertions.assertEquals(false, model.isEncryptionInTransitEnabled()); - } - - @Test - public void testSerialize() { - EncryptionInTransitProperties model = - new EncryptionInTransitProperties().withIsEncryptionInTransitEnabled(false); - model = BinaryData.fromObject(model).toObject(EncryptionInTransitProperties.class); - Assertions.assertEquals(false, model.isEncryptionInTransitEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExcludedServicesConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExcludedServicesConfigTests.java deleted file mode 100644 index 8f9c576d6262..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExcludedServicesConfigTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ExcludedServicesConfig; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ExcludedServicesConfigTests { - @Test - public void testDeserialize() { - ExcludedServicesConfig model = - BinaryData - .fromString( - "{\"excludedServicesConfigId\":\"jiwkuofoskghsau\",\"excludedServicesList\":\"mjmvxieduugidyjr\"}") - .toObject(ExcludedServicesConfig.class); - Assertions.assertEquals("jiwkuofoskghsau", model.excludedServicesConfigId()); - Assertions.assertEquals("mjmvxieduugidyjr", model.excludedServicesList()); - } - - @Test - public void testSerialize() { - ExcludedServicesConfig model = - new ExcludedServicesConfig() - .withExcludedServicesConfigId("jiwkuofoskghsau") - .withExcludedServicesList("mjmvxieduugidyjr"); - model = BinaryData.fromObject(model).toObject(ExcludedServicesConfig.class); - Assertions.assertEquals("jiwkuofoskghsau", model.excludedServicesConfigId()); - Assertions.assertEquals("mjmvxieduugidyjr", model.excludedServicesList()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExecuteScriptActionParametersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExecuteScriptActionParametersTests.java deleted file mode 100644 index d20eb75dfc2d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExecuteScriptActionParametersTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ExecuteScriptActionParameters; -import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ExecuteScriptActionParametersTests { - @Test - public void testDeserialize() { - ExecuteScriptActionParameters model = - BinaryData - .fromString( - "{\"scriptActions\":[{\"name\":\"hmtnvy\",\"uri\":\"iatkzwpcnp\",\"parameters\":\"cjaesgvvs\",\"roles\":[\"yajguqfhwygzlv\",\"nk\"],\"applicationName\":\"usemdwzrmuhap\"},{\"name\":\"cqdpsqxqvpsvuoym\",\"uri\":\"ccelve\",\"parameters\":\"ypql\",\"roles\":[\"eokerqwkyhkobopg\"],\"applicationName\":\"dkow\"},{\"name\":\"pbqpcrfkbwccsn\",\"uri\":\"vcdwxlpqekftn\",\"parameters\":\"tjsyin\",\"roles\":[\"fq\",\"tmtdhtmdvypgik\"],\"applicationName\":\"szywkbirryu\"}],\"persistOnSuccess\":true}") - .toObject(ExecuteScriptActionParameters.class); - Assertions.assertEquals("hmtnvy", model.scriptActions().get(0).name()); - Assertions.assertEquals("iatkzwpcnp", model.scriptActions().get(0).uri()); - Assertions.assertEquals("cjaesgvvs", model.scriptActions().get(0).parameters()); - Assertions.assertEquals("yajguqfhwygzlv", model.scriptActions().get(0).roles().get(0)); - Assertions.assertEquals(true, model.persistOnSuccess()); - } - - @Test - public void testSerialize() { - ExecuteScriptActionParameters model = - new ExecuteScriptActionParameters() - .withScriptActions( - Arrays - .asList( - new RuntimeScriptAction() - .withName("hmtnvy") - .withUri("iatkzwpcnp") - .withParameters("cjaesgvvs") - .withRoles(Arrays.asList("yajguqfhwygzlv", "nk")), - new RuntimeScriptAction() - .withName("cqdpsqxqvpsvuoym") - .withUri("ccelve") - .withParameters("ypql") - .withRoles(Arrays.asList("eokerqwkyhkobopg")), - new RuntimeScriptAction() - .withName("pbqpcrfkbwccsn") - .withUri("vcdwxlpqekftn") - .withParameters("tjsyin") - .withRoles(Arrays.asList("fq", "tmtdhtmdvypgik")))) - .withPersistOnSuccess(true); - model = BinaryData.fromObject(model).toObject(ExecuteScriptActionParameters.class); - Assertions.assertEquals("hmtnvy", model.scriptActions().get(0).name()); - Assertions.assertEquals("iatkzwpcnp", model.scriptActions().get(0).uri()); - Assertions.assertEquals("cjaesgvvs", model.scriptActions().get(0).parameters()); - Assertions.assertEquals("yajguqfhwygzlv", model.scriptActions().get(0).roles().get(0)); - Assertions.assertEquals(true, model.persistOnSuccess()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteMockTests.java deleted file mode 100644 index 8dd5e7008eb4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExtensionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.extensions().delete("dsxwaab", "mifrygznmma", "ri", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorMockTests.java deleted file mode 100644 index 993825e65935..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExtensionsDisableAzureMonitorMockTests { - @Test - public void testDisableAzureMonitor() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.extensions().disableAzureMonitor("azlnqnmcjngzqdqx", "bjwgnyfus", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringMockTests.java deleted file mode 100644 index 7a1575d41080..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExtensionsDisableMonitoringMockTests { - @Test - public void testDisableMonitoring() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.extensions().disableMonitoring("iojlvfhrb", "pn", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusWithResponseMockTests.java deleted file mode 100644 index 33b7f0316ca5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.AzureMonitorResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExtensionsGetAzureMonitorStatusWithResponseMockTests { - @Test - public void testGetAzureMonitorStatusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"clusterMonitoringEnabled\":true,\"workspaceId\":\"iuubwefqsf\",\"selectedConfigurations\":{\"configurationVersion\":\"qtferrqwexjkmf\",\"globalConfigurations\":{\"abtqwpwyawbzasqb\":\"jwogqqnobpudc\",\"kyexaoguyaipi\":\"clj\",\"um\":\"sdaultxij\"},\"tableList\":[]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AzureMonitorResponse response = - manager.extensions().getAzureMonitorStatusWithResponse("hahzvechndbnwi", "hol", Context.NONE).getValue(); - - Assertions.assertEquals(true, response.clusterMonitoringEnabled()); - Assertions.assertEquals("iuubwefqsf", response.workspaceId()); - Assertions.assertEquals("qtferrqwexjkmf", response.selectedConfigurations().configurationVersion()); - Assertions - .assertEquals( - "jwogqqnobpudc", response.selectedConfigurations().globalConfigurations().get("abtqwpwyawbzasqb")); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusWithResponseMockTests.java deleted file mode 100644 index bbd0d36082c7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.ClusterMonitoringResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExtensionsGetMonitoringStatusWithResponseMockTests { - @Test - public void testGetMonitoringStatusWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"clusterMonitoringEnabled\":false,\"workspaceId\":\"tutmzl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterMonitoringResponse response = - manager.extensions().getMonitoringStatusWithResponse("tmcg", "bostzel", Context.NONE).getValue(); - - Assertions.assertEquals(false, response.clusterMonitoringEnabled()); - Assertions.assertEquals("tutmzl", response.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetWithResponseMockTests.java deleted file mode 100644 index 0415f64614e6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.ClusterMonitoringResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ExtensionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"clusterMonitoringEnabled\":false,\"workspaceId\":\"jlrigjkskyrioovz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterMonitoringResponse response = - manager.extensions().getWithResponse("zn", "tgoe", "ybbabpfhvfsl", Context.NONE).getValue(); - - Assertions.assertEquals(false, response.clusterMonitoringEnabled()); - Assertions.assertEquals("jlrigjkskyrioovz", response.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/HardwareProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/HardwareProfileTests.java deleted file mode 100644 index 9406c817235b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/HardwareProfileTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.HardwareProfile; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HardwareProfileTests { - @Test - public void testDeserialize() { - HardwareProfile model = BinaryData.fromString("{\"vmSize\":\"cph\"}").toObject(HardwareProfile.class); - Assertions.assertEquals("cph", model.vmSize()); - } - - @Test - public void testSerialize() { - HardwareProfile model = new HardwareProfile().withVmSize("cph"); - model = BinaryData.fromObject(model).toObject(HardwareProfile.class); - Assertions.assertEquals("cph", model.vmSize()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationPropertiesTests.java deleted file mode 100644 index 38ca6ad0cd13..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.IpConfigurationProperties; -import com.azure.resourcemanager.hdinsight.models.PrivateIpAllocationMethod; -import com.azure.resourcemanager.hdinsight.models.ResourceId; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IpConfigurationPropertiesTests { - @Test - public void testDeserialize() { - IpConfigurationProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Deleting\",\"primary\":true,\"privateIPAddress\":\"cxmqciwqvhkhix\",\"privateIPAllocationMethod\":\"static\",\"subnet\":{\"id\":\"opbobj\"}}") - .toObject(IpConfigurationProperties.class); - Assertions.assertEquals(true, model.primary()); - Assertions.assertEquals("cxmqciwqvhkhix", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("opbobj", model.subnet().id()); - } - - @Test - public void testSerialize() { - IpConfigurationProperties model = - new IpConfigurationProperties() - .withPrimary(true) - .withPrivateIpAddress("cxmqciwqvhkhix") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.STATIC) - .withSubnet(new ResourceId().withId("opbobj")); - model = BinaryData.fromObject(model).toObject(IpConfigurationProperties.class); - Assertions.assertEquals(true, model.primary()); - Assertions.assertEquals("cxmqciwqvhkhix", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("opbobj", model.subnet().id()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationTests.java deleted file mode 100644 index 50698cf4ad9b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.IpConfiguration; -import com.azure.resourcemanager.hdinsight.models.PrivateIpAllocationMethod; -import com.azure.resourcemanager.hdinsight.models.ResourceId; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IpConfigurationTests { - @Test - public void testDeserialize() { - IpConfiguration model = - BinaryData - .fromString( - "{\"id\":\"dtocj\",\"name\":\"xhvpmoue\",\"type\":\"dzxibqeojnxqbzvd\",\"properties\":{\"provisioningState\":\"InProgress\",\"primary\":true,\"privateIPAddress\":\"icbtwnpzao\",\"privateIPAllocationMethod\":\"static\",\"subnet\":{\"id\":\"hcffcyddglmjthjq\"}}}") - .toObject(IpConfiguration.class); - Assertions.assertEquals("xhvpmoue", model.name()); - Assertions.assertEquals(true, model.primary()); - Assertions.assertEquals("icbtwnpzao", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("hcffcyddglmjthjq", model.subnet().id()); - } - - @Test - public void testSerialize() { - IpConfiguration model = - new IpConfiguration() - .withName("xhvpmoue") - .withPrimary(true) - .withPrivateIpAddress("icbtwnpzao") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.STATIC) - .withSubnet(new ResourceId().withId("hcffcyddglmjthjq")); - model = BinaryData.fromObject(model).toObject(IpConfiguration.class); - Assertions.assertEquals("xhvpmoue", model.name()); - Assertions.assertEquals(true, model.primary()); - Assertions.assertEquals("icbtwnpzao", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("hcffcyddglmjthjq", model.subnet().id()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/KafkaRestPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/KafkaRestPropertiesTests.java deleted file mode 100644 index 770fee442cee..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/KafkaRestPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ClientGroupInfo; -import com.azure.resourcemanager.hdinsight.models.KafkaRestProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class KafkaRestPropertiesTests { - @Test - public void testDeserialize() { - KafkaRestProperties model = - BinaryData - .fromString( - "{\"clientGroupInfo\":{\"groupName\":\"ahuxinpm\",\"groupId\":\"jaqwixjsp\"},\"configurationOverride\":{\"wmfdatscmdvpjhul\":\"vcputegj\",\"odjpslwejd\":\"uuvmkjozkrwfnd\",\"cctazakljlahbc\":\"vwryoqpso\",\"gexpaojakhmsbz\":\"yffdfdos\"}}") - .toObject(KafkaRestProperties.class); - Assertions.assertEquals("ahuxinpm", model.clientGroupInfo().groupName()); - Assertions.assertEquals("jaqwixjsp", model.clientGroupInfo().groupId()); - Assertions.assertEquals("vcputegj", model.configurationOverride().get("wmfdatscmdvpjhul")); - } - - @Test - public void testSerialize() { - KafkaRestProperties model = - new KafkaRestProperties() - .withClientGroupInfo(new ClientGroupInfo().withGroupName("ahuxinpm").withGroupId("jaqwixjsp")) - .withConfigurationOverride( - mapOf( - "wmfdatscmdvpjhul", - "vcputegj", - "odjpslwejd", - "uuvmkjozkrwfnd", - "cctazakljlahbc", - "vwryoqpso", - "gexpaojakhmsbz", - "yffdfdos")); - model = BinaryData.fromObject(model).toObject(KafkaRestProperties.class); - Assertions.assertEquals("ahuxinpm", model.clientGroupInfo().groupName()); - Assertions.assertEquals("jaqwixjsp", model.clientGroupInfo().groupId()); - Assertions.assertEquals("vcputegj", model.configurationOverride().get("wmfdatscmdvpjhul")); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocalizedNameTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocalizedNameTests.java deleted file mode 100644 index 499987079425..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocalizedNameTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.LocalizedName; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LocalizedNameTests { - @Test - public void testDeserialize() { - LocalizedName model = - BinaryData - .fromString("{\"value\":\"n\",\"localizedValue\":\"xqugjhkycubedd\"}") - .toObject(LocalizedName.class); - Assertions.assertEquals("n", model.value()); - Assertions.assertEquals("xqugjhkycubedd", model.localizedValue()); - } - - @Test - public void testSerialize() { - LocalizedName model = new LocalizedName().withValue("n").withLocalizedValue("xqugjhkycubedd"); - model = BinaryData.fromObject(model).toObject(LocalizedName.class); - Assertions.assertEquals("n", model.value()); - Assertions.assertEquals("xqugjhkycubedd", model.localizedValue()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 80b1ae69de7d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckRequestParameters; -import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"mysu\",\"message\":\"wq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailabilityCheckResult response = - manager - .locations() - .checkNameAvailabilityWithResponse( - "wpgdak", - new NameAvailabilityCheckRequestParameters().withName("zyvli").withType("nrkcxkj"), - Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesWithResponseMockTests.java deleted file mode 100644 index 65082cef66b1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesWithResponseMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.CapabilitiesResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsGetCapabilitiesWithResponseMockTests { - @Test - public void testGetCapabilitiesWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"versions\":{\"y\":{\"available\":[]},\"xakjsqzhzb\":{\"available\":[]}},\"regions\":{\"kzyb\":{\"available\":[\"msidxasicddyvv\",\"skgfmocwahpq\",\"atjeaahh\",\"jhhn\"]},\"xkyxvxevblbj\":{\"available\":[\"idjks\"]},\"gwklnsr\":{\"available\":[\"ljlageuaulxu\",\"smjbnkppxyn\",\"nlsvxeiz\"]}},\"features\":[\"eycxcktpiymertee\",\"mmxqiekkkzddrtk\",\"doj\"],\"quota\":{\"coresUsed\":2124241015903648306,\"maxCoresAllowed\":6657276478448220579,\"regionalQuotas\":[]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CapabilitiesResult response = - manager.locations().getCapabilitiesWithResponse("fajuwas", Context.NONE).getValue(); - - Assertions.assertEquals("msidxasicddyvv", response.regions().get("kzyb").available().get(0)); - Assertions.assertEquals("eycxcktpiymertee", response.features().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsWithResponseMockTests.java deleted file mode 100644 index 77887f4bc825..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.BillingResponseListResult; -import com.azure.resourcemanager.hdinsight.models.FilterMode; -import com.azure.resourcemanager.hdinsight.models.OSType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsListBillingSpecsWithResponseMockTests { - @Test - public void testListBillingSpecsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"vmSizes\":[\"dmdqb\"],\"vmSizesWithEncryptionAtHost\":[\"pqtgsfjac\"],\"vmSizeFilters\":[{\"filterMode\":\"Recommend\",\"regions\":[\"db\",\"vodhtn\"],\"clusterFlavors\":[\"ud\",\"z\",\"mes\",\"kdlpa\"],\"nodeTypes\":[\"cxfailcfxwmdboxd\",\"gsftufqobrjlnacg\",\"ckknhxkizvy\",\"nrzvuljraaer\"],\"clusterVersions\":[\"kqg\",\"kkjqnvbroylaxxu\",\"cdisd\"],\"osType\":[\"Linux\"],\"vmSizes\":[\"svgjrwhryvy\"],\"espApplied\":\"t\",\"computeIsolationSupported\":\"lxgccknfnwmbtm\"},{\"filterMode\":\"Recommend\",\"regions\":[\"dhttzaefedxihchr\",\"hk\",\"crjdqnsdfzpbgtg\",\"ylkdghrje\"],\"clusterFlavors\":[\"lwxezwzhokvbwnh\"],\"nodeTypes\":[\"lgehg\",\"pipifh\"],\"clusterVersions\":[\"oajvgcxtxjcs\"],\"osType\":[\"Windows\",\"Linux\",\"Windows\"],\"vmSizes\":[\"ugsresmkssjhoi\",\"txfkfweg\",\"rhptilluc\",\"iqtgdqoh\"],\"espApplied\":\"wsldrizetpwbr\",\"computeIsolationSupported\":\"llibphbqzmizak\"},{\"filterMode\":\"Recommend\",\"regions\":[\"jpdn\",\"zhajoylhjlmuo\",\"xprimrsop\"],\"clusterFlavors\":[\"cjmeislstvasy\"],\"nodeTypes\":[\"dzaumweooh\"],\"clusterVersions\":[\"fuzboyjathwtzolb\",\"emwmdxmebwjs\"],\"osType\":[\"Linux\"],\"vmSizes\":[\"xveabf\",\"xnmwmqtibxyijddt\",\"qcttadijaeukmrsi\"],\"espApplied\":\"kpn\",\"computeIsolationSupported\":\"aapm\"},{\"filterMode\":\"Default\",\"regions\":[\"qwigpibudqwyxe\"],\"clusterFlavors\":[\"bpmzzn\",\"tffyaqit\",\"hheioqaqhvseuf\",\"qyrxp\"],\"nodeTypes\":[\"gql\"],\"clusterVersions\":[\"mjqfrddgamquhio\",\"rsjuivfcdisyir\",\"xzhczexrxz\"],\"osType\":[\"Linux\",\"Windows\",\"Linux\"],\"vmSizes\":[\"vwrevkhgnlnzon\",\"lrpiqywnc\"],\"espApplied\":\"tszcofizehtdhgb\",\"computeIsolationSupported\":\"vreljea\"}],\"vmSizeProperties\":[{\"name\":\"zmlovuanash\",\"cores\":1712193542,\"dataDiskStorageTier\":\"mjerbdk\",\"label\":\"vidizozsdb\",\"maxDataDiskCount\":6191416292355922762,\"memoryInMb\":1398684791655344997,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":1108415883260069498,\"webWorkerResourceDiskSizeInMb\":4527807456286813914},{\"name\":\"w\",\"cores\":1941131866,\"dataDiskStorageTier\":\"uqj\",\"label\":\"zenkeifzzhmkd\",\"maxDataDiskCount\":640466404560653051,\"memoryInMb\":3956942710936432469,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":5039655555288828221,\"webWorkerResourceDiskSizeInMb\":5098089409961855245},{\"name\":\"boldforobwj\",\"cores\":998979559,\"dataDiskStorageTier\":\"bfhfovvacqp\",\"label\":\"uodxesza\",\"maxDataDiskCount\":7104035762189802588,\"memoryInMb\":741706840028604356,\"supportedByVirtualMachines\":false,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":199833503819632386,\"webWorkerResourceDiskSizeInMb\":7026636829095827227}],\"billingResources\":[{\"region\":\"cqucwyhahnom\",\"billingMeters\":[],\"diskBillingMeters\":[]},{\"region\":\"hpsvfu\",\"billingMeters\":[],\"diskBillingMeters\":[]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BillingResponseListResult response = - manager.locations().listBillingSpecsWithResponse("tvtzeexavoxtfg", Context.NONE).getValue(); - - Assertions.assertEquals("dmdqb", response.vmSizes().get(0)); - Assertions.assertEquals("pqtgsfjac", response.vmSizesWithEncryptionAtHost().get(0)); - Assertions.assertEquals(FilterMode.RECOMMEND, response.vmSizeFilters().get(0).filterMode()); - Assertions.assertEquals("db", response.vmSizeFilters().get(0).regions().get(0)); - Assertions.assertEquals("ud", response.vmSizeFilters().get(0).clusterFlavors().get(0)); - Assertions.assertEquals("cxfailcfxwmdboxd", response.vmSizeFilters().get(0).nodeTypes().get(0)); - Assertions.assertEquals("kqg", response.vmSizeFilters().get(0).clusterVersions().get(0)); - Assertions.assertEquals(OSType.LINUX, response.vmSizeFilters().get(0).osType().get(0)); - Assertions.assertEquals("svgjrwhryvy", response.vmSizeFilters().get(0).vmSizes().get(0)); - Assertions.assertEquals("t", response.vmSizeFilters().get(0).espApplied()); - Assertions.assertEquals("lxgccknfnwmbtm", response.vmSizeFilters().get(0).computeIsolationSupported()); - Assertions.assertEquals("cqucwyhahnom", response.billingResources().get(0).region()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesWithResponseMockTests.java deleted file mode 100644 index 9b022866f222..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesWithResponseMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.UsagesListResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsListUsagesWithResponseMockTests { - @Test - public void testListUsagesWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"unit\":\"txsu\",\"currentValue\":7425481231307193610,\"limit\":4136420798110514219},{\"unit\":\"wddji\",\"currentValue\":3042675003672880790,\"limit\":6958305132617717680}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UsagesListResult response = manager.locations().listUsagesWithResponse("eesvecu", Context.NONE).getValue(); - - Assertions.assertEquals("txsu", response.value().get(0).unit()); - Assertions.assertEquals(7425481231307193610L, response.value().get(0).currentValue()); - Assertions.assertEquals(4136420798110514219L, response.value().get(0).limit()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/MetricSpecificationsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/MetricSpecificationsTests.java deleted file mode 100644 index 54a9aff8157f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/MetricSpecificationsTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Dimension; -import com.azure.resourcemanager.hdinsight.models.MetricSpecifications; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MetricSpecificationsTests { - @Test - public void testDeserialize() { - MetricSpecifications model = - BinaryData - .fromString( - "{\"name\":\"smlmbtxhwgfwsrta\",\"displayName\":\"oezbrhubsk\",\"displayDescription\":\"dyg\",\"unit\":\"okkqfqjbvleo\",\"aggregationType\":\"ml\",\"supportedAggregationTypes\":[\"tqzfavyv\",\"qqybarye\",\"ayjkqa\"],\"supportedTimeGrainTypes\":[\"zslesjcbher\",\"ntiew\",\"jcvb\",\"uwrbehwagoh\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"kmr\",\"sourceMdmNamespace\":\"mvvhmxtdrjfuta\",\"metricFilterPattern\":\"ebjvewzcjzn\",\"fillGapWithZero\":true,\"category\":\"mguaadraufa\",\"resourceIdDimensionNameOverride\":\"kahzo\",\"isInternal\":true,\"delegateMetricNameOverride\":\"ziuxxpshnee\",\"dimensions\":[{\"name\":\"gs\",\"displayName\":\"ubkwdle\",\"internalName\":\"d\",\"toBeExportedForShoebox\":true}]}") - .toObject(MetricSpecifications.class); - Assertions.assertEquals("smlmbtxhwgfwsrta", model.name()); - Assertions.assertEquals("oezbrhubsk", model.displayName()); - Assertions.assertEquals("dyg", model.displayDescription()); - Assertions.assertEquals("okkqfqjbvleo", model.unit()); - Assertions.assertEquals("ml", model.aggregationType()); - Assertions.assertEquals("tqzfavyv", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("zslesjcbher", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("kmr", model.sourceMdmAccount()); - Assertions.assertEquals("mvvhmxtdrjfuta", model.sourceMdmNamespace()); - Assertions.assertEquals("ebjvewzcjzn", model.metricFilterPattern()); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("mguaadraufa", model.category()); - Assertions.assertEquals("kahzo", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.isInternal()); - Assertions.assertEquals("ziuxxpshnee", model.delegateMetricNameOverride()); - Assertions.assertEquals("gs", model.dimensions().get(0).name()); - Assertions.assertEquals("ubkwdle", model.dimensions().get(0).displayName()); - Assertions.assertEquals("d", model.dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - } - - @Test - public void testSerialize() { - MetricSpecifications model = - new MetricSpecifications() - .withName("smlmbtxhwgfwsrta") - .withDisplayName("oezbrhubsk") - .withDisplayDescription("dyg") - .withUnit("okkqfqjbvleo") - .withAggregationType("ml") - .withSupportedAggregationTypes(Arrays.asList("tqzfavyv", "qqybarye", "ayjkqa")) - .withSupportedTimeGrainTypes(Arrays.asList("zslesjcbher", "ntiew", "jcvb", "uwrbehwagoh")) - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("kmr") - .withSourceMdmNamespace("mvvhmxtdrjfuta") - .withMetricFilterPattern("ebjvewzcjzn") - .withFillGapWithZero(true) - .withCategory("mguaadraufa") - .withResourceIdDimensionNameOverride("kahzo") - .withIsInternal(true) - .withDelegateMetricNameOverride("ziuxxpshnee") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("gs") - .withDisplayName("ubkwdle") - .withInternalName("d") - .withToBeExportedForShoebox(true))); - model = BinaryData.fromObject(model).toObject(MetricSpecifications.class); - Assertions.assertEquals("smlmbtxhwgfwsrta", model.name()); - Assertions.assertEquals("oezbrhubsk", model.displayName()); - Assertions.assertEquals("dyg", model.displayDescription()); - Assertions.assertEquals("okkqfqjbvleo", model.unit()); - Assertions.assertEquals("ml", model.aggregationType()); - Assertions.assertEquals("tqzfavyv", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("zslesjcbher", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("kmr", model.sourceMdmAccount()); - Assertions.assertEquals("mvvhmxtdrjfuta", model.sourceMdmNamespace()); - Assertions.assertEquals("ebjvewzcjzn", model.metricFilterPattern()); - Assertions.assertEquals(true, model.fillGapWithZero()); - Assertions.assertEquals("mguaadraufa", model.category()); - Assertions.assertEquals("kahzo", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.isInternal()); - Assertions.assertEquals("ziuxxpshnee", model.delegateMetricNameOverride()); - Assertions.assertEquals("gs", model.dimensions().get(0).name()); - Assertions.assertEquals("ubkwdle", model.dimensions().get(0).displayName()); - Assertions.assertEquals("d", model.dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckRequestParametersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckRequestParametersTests.java deleted file mode 100644 index 47b6f1eb5a9b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckRequestParametersTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckRequestParameters; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NameAvailabilityCheckRequestParametersTests { - @Test - public void testDeserialize() { - NameAvailabilityCheckRequestParameters model = - BinaryData - .fromString("{\"name\":\"rwr\",\"type\":\"rtwaenuuzko\"}") - .toObject(NameAvailabilityCheckRequestParameters.class); - Assertions.assertEquals("rwr", model.name()); - Assertions.assertEquals("rtwaenuuzko", model.type()); - } - - @Test - public void testSerialize() { - NameAvailabilityCheckRequestParameters model = - new NameAvailabilityCheckRequestParameters().withName("rwr").withType("rtwaenuuzko"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityCheckRequestParameters.class); - Assertions.assertEquals("rwr", model.name()); - Assertions.assertEquals("rtwaenuuzko", model.type()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckResultInnerTests.java deleted file mode 100644 index 7b9712f9c281..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckResultInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.NameAvailabilityCheckResultInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NameAvailabilityCheckResultInnerTests { - @Test - public void testDeserialize() { - NameAvailabilityCheckResultInner model = - BinaryData - .fromString("{\"nameAvailable\":false,\"reason\":\"nrfdw\",\"message\":\"uhhziuiefozbhdm\"}") - .toObject(NameAvailabilityCheckResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - } - - @Test - public void testSerialize() { - NameAvailabilityCheckResultInner model = new NameAvailabilityCheckResultInner().withNameAvailable(false); - model = BinaryData.fromObject(model).toObject(NameAvailabilityCheckResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NetworkPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NetworkPropertiesTests.java deleted file mode 100644 index 3de21a936f00..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NetworkPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.NetworkProperties; -import com.azure.resourcemanager.hdinsight.models.PrivateLink; -import com.azure.resourcemanager.hdinsight.models.ResourceProviderConnection; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NetworkPropertiesTests { - @Test - public void testDeserialize() { - NetworkProperties model = - BinaryData - .fromString("{\"resourceProviderConnection\":\"Inbound\",\"privateLink\":\"Disabled\"}") - .toObject(NetworkProperties.class); - Assertions.assertEquals(ResourceProviderConnection.INBOUND, model.resourceProviderConnection()); - Assertions.assertEquals(PrivateLink.DISABLED, model.privateLink()); - } - - @Test - public void testSerialize() { - NetworkProperties model = - new NetworkProperties() - .withResourceProviderConnection(ResourceProviderConnection.INBOUND) - .withPrivateLink(PrivateLink.DISABLED); - model = BinaryData.fromObject(model).toObject(NetworkProperties.class); - Assertions.assertEquals(ResourceProviderConnection.INBOUND, model.resourceProviderConnection()); - Assertions.assertEquals(PrivateLink.DISABLED, model.privateLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationDisplayTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationDisplayTests.java deleted file mode 100644 index 6c97f8b062c0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationDisplayTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"jviylwdshfs\",\"resource\":\"rbgyefry\",\"operation\":\"gaojf\",\"description\":\"nc\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("jviylwdshfs", model.provider()); - Assertions.assertEquals("rbgyefry", model.resource()); - Assertions.assertEquals("gaojf", model.operation()); - Assertions.assertEquals("nc", model.description()); - } - - @Test - public void testSerialize() { - OperationDisplay model = - new OperationDisplay() - .withProvider("jviylwdshfs") - .withResource("rbgyefry") - .withOperation("gaojf") - .withDescription("nc"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("jviylwdshfs", model.provider()); - Assertions.assertEquals("rbgyefry", model.resource()); - Assertions.assertEquals("gaojf", model.operation()); - Assertions.assertEquals("nc", model.description()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationInnerTests.java deleted file mode 100644 index 2d8df0608681..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.models.OperationDisplay; -import com.azure.resourcemanager.hdinsight.models.OperationProperties; -import com.azure.resourcemanager.hdinsight.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationInnerTests { - @Test - public void testDeserialize() { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"vgrvkffo\",\"display\":{\"provider\":\"hpjbib\",\"resource\":\"mfxumvfcluyovw\",\"operation\":\"bkfezzxscyhwzdgi\",\"description\":\"jbzbomvzzbtdcq\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("vgrvkffo", model.name()); - Assertions.assertEquals("hpjbib", model.display().provider()); - Assertions.assertEquals("mfxumvfcluyovw", model.display().resource()); - Assertions.assertEquals("bkfezzxscyhwzdgi", model.display().operation()); - Assertions.assertEquals("jbzbomvzzbtdcq", model.display().description()); - } - - @Test - public void testSerialize() { - OperationInner model = - new OperationInner() - .withName("vgrvkffo") - .withDisplay( - new OperationDisplay() - .withProvider("hpjbib") - .withResource("mfxumvfcluyovw") - .withOperation("bkfezzxscyhwzdgi") - .withDescription("jbzbomvzzbtdcq")) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification().withMetricSpecifications(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("vgrvkffo", model.name()); - Assertions.assertEquals("hpjbib", model.display().provider()); - Assertions.assertEquals("mfxumvfcluyovw", model.display().resource()); - Assertions.assertEquals("bkfezzxscyhwzdgi", model.display().operation()); - Assertions.assertEquals("jbzbomvzzbtdcq", model.display().description()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationListResultTests.java deleted file mode 100644 index 8293c6841f48..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationListResultTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.models.OperationDisplay; -import com.azure.resourcemanager.hdinsight.models.OperationListResult; -import com.azure.resourcemanager.hdinsight.models.OperationProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationListResultTests { - @Test - public void testDeserialize() { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"nkrxfrddhcr\",\"display\":{\"provider\":\"zzronasx\",\"resource\":\"tozqyzhftwesgo\",\"operation\":\"zhonnxkrlgnyhmo\",\"description\":\"xkk\"},\"properties\":{}},{\"name\":\"rghxjb\",\"display\":{\"provider\":\"xvcxgfrpdsofbshr\",\"resource\":\"vbuswd\",\"operation\":\"yybyc\",\"description\":\"nvjsrtkfa\"},\"properties\":{}},{\"name\":\"qg\",\"display\":{\"provider\":\"zirtxdyuxzejntps\",\"resource\":\"gioilqu\",\"operation\":\"ydxtqm\",\"description\":\"ox\"},\"properties\":{}}],\"nextLink\":\"ufhyaomtbgh\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("nkrxfrddhcr", model.value().get(0).name()); - Assertions.assertEquals("zzronasx", model.value().get(0).display().provider()); - Assertions.assertEquals("tozqyzhftwesgo", model.value().get(0).display().resource()); - Assertions.assertEquals("zhonnxkrlgnyhmo", model.value().get(0).display().operation()); - Assertions.assertEquals("xkk", model.value().get(0).display().description()); - Assertions.assertEquals("ufhyaomtbgh", model.nextLink()); - } - - @Test - public void testSerialize() { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("nkrxfrddhcr") - .withDisplay( - new OperationDisplay() - .withProvider("zzronasx") - .withResource("tozqyzhftwesgo") - .withOperation("zhonnxkrlgnyhmo") - .withDescription("xkk")) - .withProperties(new OperationProperties()), - new OperationInner() - .withName("rghxjb") - .withDisplay( - new OperationDisplay() - .withProvider("xvcxgfrpdsofbshr") - .withResource("vbuswd") - .withOperation("yybyc") - .withDescription("nvjsrtkfa")) - .withProperties(new OperationProperties()), - new OperationInner() - .withName("qg") - .withDisplay( - new OperationDisplay() - .withProvider("zirtxdyuxzejntps") - .withResource("gioilqu") - .withOperation("ydxtqm") - .withDescription("ox")) - .withProperties(new OperationProperties()))) - .withNextLink("ufhyaomtbgh"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("nkrxfrddhcr", model.value().get(0).name()); - Assertions.assertEquals("zzronasx", model.value().get(0).display().provider()); - Assertions.assertEquals("tozqyzhftwesgo", model.value().get(0).display().resource()); - Assertions.assertEquals("zhonnxkrlgnyhmo", model.value().get(0).display().operation()); - Assertions.assertEquals("xkk", model.value().get(0).display().description()); - Assertions.assertEquals("ufhyaomtbgh", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationPropertiesTests.java deleted file mode 100644 index e98474141ce1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.MetricSpecifications; -import com.azure.resourcemanager.hdinsight.models.OperationProperties; -import com.azure.resourcemanager.hdinsight.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationPropertiesTests { - @Test - public void testDeserialize() { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"hirctymoxoftpipi\",\"displayName\":\"czuhxacpqjlihh\",\"displayDescription\":\"spskasdvlmfwdgz\",\"unit\":\"lucvpam\",\"aggregationType\":\"reuzvxurisjn\",\"supportedAggregationTypes\":[],\"supportedTimeGrainTypes\":[],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"fq\",\"sourceMdmNamespace\":\"gxmrhublwp\",\"metricFilterPattern\":\"sutrgjup\",\"fillGapWithZero\":true,\"category\":\"p\",\"resourceIdDimensionNameOverride\":\"qhih\",\"isInternal\":false,\"delegateMetricNameOverride\":\"w\",\"dimensions\":[]}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("hirctymoxoftpipi", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("czuhxacpqjlihh", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "spskasdvlmfwdgz", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lucvpam", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals("reuzvxurisjn", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("fq", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "gxmrhublwp", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions - .assertEquals("sutrgjup", model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("p", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "qhih", model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions - .assertEquals("w", model.serviceSpecification().metricSpecifications().get(0).delegateMetricNameOverride()); - } - - @Test - public void testSerialize() { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications() - .withName("hirctymoxoftpipi") - .withDisplayName("czuhxacpqjlihh") - .withDisplayDescription("spskasdvlmfwdgz") - .withUnit("lucvpam") - .withAggregationType("reuzvxurisjn") - .withSupportedAggregationTypes(Arrays.asList()) - .withSupportedTimeGrainTypes(Arrays.asList()) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("fq") - .withSourceMdmNamespace("gxmrhublwp") - .withMetricFilterPattern("sutrgjup") - .withFillGapWithZero(true) - .withCategory("p") - .withResourceIdDimensionNameOverride("qhih") - .withIsInternal(false) - .withDelegateMetricNameOverride("w") - .withDimensions(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("hirctymoxoftpipi", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("czuhxacpqjlihh", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "spskasdvlmfwdgz", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("lucvpam", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals("reuzvxurisjn", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("fq", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "gxmrhublwp", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions - .assertEquals("sutrgjup", model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("p", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "qhih", model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions - .assertEquals("w", model.serviceSpecification().metricSpecifications().get(0).delegateMetricNameOverride()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationsListMockTests.java deleted file mode 100644 index 004900ceceac..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationsListMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"wcobie\",\"display\":{\"provider\":\"mninwjizcilng\",\"resource\":\"shejjtbxqm\",\"operation\":\"uxlxqzvners\",\"description\":\"cucrwnamikze\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[]}}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(Context.NONE); - - Assertions.assertEquals("wcobie", response.iterator().next().name()); - Assertions.assertEquals("mninwjizcilng", response.iterator().next().display().provider()); - Assertions.assertEquals("shejjtbxqm", response.iterator().next().display().resource()); - Assertions.assertEquals("uxlxqzvners", response.iterator().next().display().operation()); - Assertions.assertEquals("cucrwnamikze", response.iterator().next().display().description()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index ca5e0415bef8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionInnerTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"y\"},\"privateLinkServiceConnectionState\":{\"status\":\"Removed\",\"description\":\"v\",\"actionsRequired\":\"csonpclhoco\"},\"linkIdentifier\":\"lkevle\",\"provisioningState\":\"Failed\"},\"id\":\"buhfmvfaxkffeiit\",\"name\":\"lvmezyvshxmzsbbz\",\"type\":\"ggi\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REMOVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("v", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("csonpclhoco", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REMOVED) - .withDescription("v") - .withActionsRequired("csonpclhoco")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REMOVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("v", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("csonpclhoco", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index bba11be9dced..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionListResultTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnectionListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionListResultTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"linkIdentifier\":\"bqplh\",\"provisioningState\":\"Updating\"},\"id\":\"uepzl\",\"name\":\"phwzsoldweyuqdu\",\"type\":\"vmnnrw\"},{\"properties\":{\"linkIdentifier\":\"ork\",\"provisioningState\":\"InProgress\"},\"id\":\"wjhhgdnhxmsivf\",\"name\":\"miloxggdufiqndie\",\"type\":\"zaofjchvcyy\"}],\"nextLink\":\"fgdo\"}") - .toObject(PrivateEndpointConnectionListResult.class); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionListResult model = - new PrivateEndpointConnectionListResult() - .withValue(Arrays.asList(new PrivateEndpointConnectionInner(), new PrivateEndpointConnectionInner())); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index e64b06640b1a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionPropertiesTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"wburvjxxjnspydpt\"},\"privateLinkServiceConnectionState\":{\"status\":\"Removed\",\"description\":\"nkoukn\",\"actionsRequired\":\"dwtiukbldngkp\"},\"linkIdentifier\":\"ipazyxoegukgjnpi\",\"provisioningState\":\"InProgress\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REMOVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("nkoukn", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dwtiukbldngkp", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REMOVED) - .withDescription("nkoukn") - .withActionsRequired("dwtiukbldngkp")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REMOVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("nkoukn", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dwtiukbldngkp", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 86a3bfd5db61..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnection; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"gozxw\"},\"privateLinkServiceConnectionState\":{\"status\":\"Removed\",\"description\":\"bydpizqaclnapxb\",\"actionsRequired\":\"gn\"},\"linkIdentifier\":\"j\",\"provisioningState\":\"Succeeded\"},\"id\":\"mfcttux\",\"name\":\"uyilflqoiquvrehm\",\"type\":\"njhvsujztc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .define("qmp") - .withExistingCluster("gqoweyirdhlisn", "wfl") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.PENDING) - .withDescription("asi") - .withActionsRequired("tmkzjvkviirhgfgr")) - .create(); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REMOVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bydpizqaclnapxb", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("gn", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index 6ef992afcf93..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.privateEndpointConnections().delete("pakdkifmjnnawt", "abpxuc", "p", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index f59a78b8ef5f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnection; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"bpdqmjxlyy\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"gouwtlmj\",\"actionsRequired\":\"uojqt\"},\"linkIdentifier\":\"axkjeytunlbfjk\",\"provisioningState\":\"Updating\"},\"id\":\"nkqbhsyrq\",\"name\":\"njqhdenxa\",\"type\":\"l\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("nnbsoqeqa", "arvlagunbt", "febwlnbmhyreeudz", Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gouwtlmj", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("uojqt", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterMockTests.java deleted file mode 100644 index 714adf5f56d7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnection; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListByClusterMockTests { - @Test - public void testListByCluster() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"rksxwpndfc\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"znth\",\"actionsRequired\":\"wkjaos\"},\"linkIdentifier\":\"uzvoamktcqiosm\",\"provisioningState\":\"Updating\"},\"id\":\"hgxqdlyrt\",\"name\":\"tlaprltzkatb\",\"type\":\"jm\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateEndpointConnections().listByCluster("cy", "ilrmcaykggnox", Context.NONE); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("znth", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals("wkjaos", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointTests.java deleted file mode 100644 index e59886ff306f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointTests { - @Test - public void testDeserialize() { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"gevqznty\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("gevqznty", model.id()); - } - - @Test - public void testSerialize() { - PrivateEndpoint model = new PrivateEndpoint().withId("gevqznty"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("gevqznty", model.id()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationPropertiesTests.java deleted file mode 100644 index bfbafee110b6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationPropertiesTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkConfigurationProperties; -import com.azure.resourcemanager.hdinsight.models.IpConfiguration; -import com.azure.resourcemanager.hdinsight.models.PrivateIpAllocationMethod; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkConfigurationPropertiesTests { - @Test - public void testDeserialize() { - PrivateLinkConfigurationProperties model = - BinaryData - .fromString( - "{\"groupId\":\"sqwpgrjb\",\"provisioningState\":\"Failed\",\"ipConfigurations\":[{\"id\":\"jxvsnbyxqabn\",\"name\":\"ocpcy\",\"type\":\"urzafb\",\"properties\":{\"provisioningState\":\"Deleting\",\"primary\":true,\"privateIPAddress\":\"oq\",\"privateIPAllocationMethod\":\"dynamic\"}},{\"id\":\"javbqidtqajz\",\"name\":\"ulpkudjkrl\",\"type\":\"bzhfepgzgqexz\",\"properties\":{\"provisioningState\":\"Succeeded\",\"primary\":false,\"privateIPAddress\":\"aierhhb\",\"privateIPAllocationMethod\":\"dynamic\"}},{\"id\":\"mmajtjaodx\",\"name\":\"bnbdxkqpxokajion\",\"type\":\"mexgstxgcp\",\"properties\":{\"provisioningState\":\"InProgress\",\"primary\":true,\"privateIPAddress\":\"r\",\"privateIPAllocationMethod\":\"dynamic\"}},{\"id\":\"zrlovmclwhijcoej\",\"name\":\"tbzaqsqsycbkbfk\",\"type\":\"kdkexxp\",\"properties\":{\"provisioningState\":\"Succeeded\",\"primary\":true,\"privateIPAddress\":\"c\",\"privateIPAllocationMethod\":\"dynamic\"}}]}") - .toObject(PrivateLinkConfigurationProperties.class); - Assertions.assertEquals("sqwpgrjb", model.groupId()); - Assertions.assertEquals("ocpcy", model.ipConfigurations().get(0).name()); - Assertions.assertEquals(true, model.ipConfigurations().get(0).primary()); - Assertions.assertEquals("oq", model.ipConfigurations().get(0).privateIpAddress()); - Assertions - .assertEquals( - PrivateIpAllocationMethod.DYNAMIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); - } - - @Test - public void testSerialize() { - PrivateLinkConfigurationProperties model = - new PrivateLinkConfigurationProperties() - .withGroupId("sqwpgrjb") - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration() - .withName("ocpcy") - .withPrimary(true) - .withPrivateIpAddress("oq") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.DYNAMIC), - new IpConfiguration() - .withName("ulpkudjkrl") - .withPrimary(false) - .withPrivateIpAddress("aierhhb") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.DYNAMIC), - new IpConfiguration() - .withName("bnbdxkqpxokajion") - .withPrimary(true) - .withPrivateIpAddress("r") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.DYNAMIC), - new IpConfiguration() - .withName("tbzaqsqsycbkbfk") - .withPrimary(true) - .withPrivateIpAddress("c") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.DYNAMIC))); - model = BinaryData.fromObject(model).toObject(PrivateLinkConfigurationProperties.class); - Assertions.assertEquals("sqwpgrjb", model.groupId()); - Assertions.assertEquals("ocpcy", model.ipConfigurations().get(0).name()); - Assertions.assertEquals(true, model.ipConfigurations().get(0).primary()); - Assertions.assertEquals("oq", model.ipConfigurations().get(0).privateIpAddress()); - Assertions - .assertEquals( - PrivateIpAllocationMethod.DYNAMIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationTests.java deleted file mode 100644 index 5d80703ec589..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.IpConfiguration; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkConfigurationTests { - @Test - public void testDeserialize() { - PrivateLinkConfiguration model = - BinaryData - .fromString( - "{\"id\":\"tymw\",\"name\":\"sdkf\",\"type\":\"wxmnteiwao\",\"properties\":{\"groupId\":\"vkmijcmmxdcuf\",\"provisioningState\":\"Succeeded\",\"ipConfigurations\":[{\"id\":\"ymzidn\",\"name\":\"ezcxtbzsgfyccsne\",\"type\":\"dwzjeiach\"},{\"id\":\"sflnrosfqp\",\"name\":\"eeh\",\"type\":\"vypyqrimzinpv\"},{\"id\":\"dkirsoodqxhcr\",\"name\":\"nohjt\",\"type\":\"whdsoifiyip\"}]}}") - .toObject(PrivateLinkConfiguration.class); - Assertions.assertEquals("sdkf", model.name()); - Assertions.assertEquals("vkmijcmmxdcuf", model.groupId()); - Assertions.assertEquals("ezcxtbzsgfyccsne", model.ipConfigurations().get(0).name()); - } - - @Test - public void testSerialize() { - PrivateLinkConfiguration model = - new PrivateLinkConfiguration() - .withName("sdkf") - .withGroupId("vkmijcmmxdcuf") - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration().withName("ezcxtbzsgfyccsne"), - new IpConfiguration().withName("eeh"), - new IpConfiguration().withName("nohjt"))); - model = BinaryData.fromObject(model).toObject(PrivateLinkConfiguration.class); - Assertions.assertEquals("sdkf", model.name()); - Assertions.assertEquals("vkmijcmmxdcuf", model.groupId()); - Assertions.assertEquals("ezcxtbzsgfyccsne", model.ipConfigurations().get(0).name()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index 9cb42cb153cd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourceInnerTests { - @Test - public void testDeserialize() { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"tx\",\"requiredMembers\":[\"ukxit\",\"m\",\"tg\",\"qqxhrnxrxcpj\"],\"requiredZoneNames\":[\"av\",\"k\",\"dzf\"]},\"id\":\"zivj\",\"name\":\"frqttbajlkatnw\",\"type\":\"yiopi\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("av", model.requiredZoneNames().get(0)); - } - - @Test - public void testSerialize() { - PrivateLinkResourceInner model = - new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("av", "k", "dzf")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("av", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceListResultInnerTests.java deleted file mode 100644 index 62c15641b0bb..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceListResultInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceListResultInner; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourceListResultInnerTests { - @Test - public void testDeserialize() { - PrivateLinkResourceListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"ip\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"oqonma\",\"name\":\"jeknizshq\",\"type\":\"cimpevfg\"},{\"properties\":{\"groupId\":\"rrilbywdxsmic\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"fscjfnynszquji\",\"name\":\"dvoqyt\",\"type\":\"byowbblgyavutp\"},{\"properties\":{\"groupId\":\"oxoismsksbpim\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"jxkcgxxlxsff\",\"name\":\"cvizqzdwlvw\",\"type\":\"youpfgfbkj\"},{\"properties\":{\"groupId\":\"yhgk\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"sgow\",\"name\":\"fttsttk\",\"type\":\"lahb\"}]}") - .toObject(PrivateLinkResourceListResultInner.class); - } - - @Test - public void testSerialize() { - PrivateLinkResourceListResultInner model = - new PrivateLinkResourceListResultInner() - .withValue( - Arrays - .asList( - new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()), - new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()), - new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()), - new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index bc99ed822447..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcePropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourcePropertiesTests { - @Test - public void testDeserialize() { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"qqfkuv\",\"requiredMembers\":[\"kdmligovi\",\"rxkpmloazuruoc\"],\"requiredZoneNames\":[\"orbteoy\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("orbteoy", model.requiredZoneNames().get(0)); - } - - @Test - public void testSerialize() { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("orbteoy")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("orbteoy", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index c0b670a88a58..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"fpubcpzgpxti\",\"requiredMembers\":[\"knidib\"],\"requiredZoneNames\":[\"xgpnr\",\"govfgpikqmhhaow\",\"rmzvupo\"]},\"id\":\"zdfuydzvkfvxcnqm\",\"name\":\"qpswokmvkhlggdhb\",\"type\":\"mzqkz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = - manager - .privateLinkResources() - .getWithResponse("vxlx", "aglqivbgkcvkh", "zvuqdflvon", Context.NONE) - .getValue(); - - Assertions.assertEquals("xgpnr", response.requiredZoneNames().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterWithResponseMockTests.java deleted file mode 100644 index c8ea03693e08..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkResourceListResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListByClusterWithResponseMockTests { - @Test - public void testListByClusterWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"fprnjl\",\"name\":\"tlxs\",\"type\":\"rpddouifamo\"},{\"id\":\"iynknlq\",\"name\":\"zdvpiw\",\"type\":\"xqszdtmaajquh\"},{\"id\":\"lrjvmtyg\",\"name\":\"bmzyospsps\",\"type\":\"c\"},{\"id\":\"yjpmspbpssdfppyo\",\"name\":\"tieyujtvczkcny\",\"type\":\"rxmunjdxvgln\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceListResult response = - manager.privateLinkResources().listByClusterWithResponse("ytqj", "w", Context.NONE).getValue(); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 2507ad8e7227..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkServiceConnectionStateTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkServiceConnectionStateTests { - @Test - public void testDeserialize() { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString( - "{\"status\":\"Pending\",\"description\":\"bpizcdrqjsdpydn\",\"actionsRequired\":\"hxdeoejz\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("bpizcdrqjsdpydn", model.description()); - Assertions.assertEquals("hxdeoejz", model.actionsRequired()); - } - - @Test - public void testSerialize() { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.PENDING) - .withDescription("bpizcdrqjsdpydn") - .withActionsRequired("hxdeoejz"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, model.status()); - Assertions.assertEquals("bpizcdrqjsdpydn", model.description()); - Assertions.assertEquals("hxdeoejz", model.actionsRequired()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaCapabilityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaCapabilityTests.java deleted file mode 100644 index fa22fcebfef3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaCapabilityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.QuotaCapability; -import com.azure.resourcemanager.hdinsight.models.RegionalQuotaCapability; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class QuotaCapabilityTests { - @Test - public void testDeserialize() { - QuotaCapability model = - BinaryData - .fromString( - "{\"coresUsed\":5771511896928290533,\"maxCoresAllowed\":7589435135200737860,\"regionalQuotas\":[{\"regionName\":\"fkzikfj\",\"coresUsed\":840452358512329690,\"coresAvailable\":2977949110627506617},{\"regionName\":\"wczelpci\",\"coresUsed\":8795668751139287194,\"coresAvailable\":2411008459227076557},{\"regionName\":\"nwabfatkldd\",\"coresUsed\":3710000815111343591,\"coresAvailable\":3730828856140203341}]}") - .toObject(QuotaCapability.class); - Assertions.assertEquals(5771511896928290533L, model.coresUsed()); - Assertions.assertEquals(7589435135200737860L, model.maxCoresAllowed()); - Assertions.assertEquals("fkzikfj", model.regionalQuotas().get(0).regionName()); - Assertions.assertEquals(840452358512329690L, model.regionalQuotas().get(0).coresUsed()); - Assertions.assertEquals(2977949110627506617L, model.regionalQuotas().get(0).coresAvailable()); - } - - @Test - public void testSerialize() { - QuotaCapability model = - new QuotaCapability() - .withCoresUsed(5771511896928290533L) - .withMaxCoresAllowed(7589435135200737860L) - .withRegionalQuotas( - Arrays - .asList( - new RegionalQuotaCapability() - .withRegionName("fkzikfj") - .withCoresUsed(840452358512329690L) - .withCoresAvailable(2977949110627506617L), - new RegionalQuotaCapability() - .withRegionName("wczelpci") - .withCoresUsed(8795668751139287194L) - .withCoresAvailable(2411008459227076557L), - new RegionalQuotaCapability() - .withRegionName("nwabfatkldd") - .withCoresUsed(3710000815111343591L) - .withCoresAvailable(3730828856140203341L))); - model = BinaryData.fromObject(model).toObject(QuotaCapability.class); - Assertions.assertEquals(5771511896928290533L, model.coresUsed()); - Assertions.assertEquals(7589435135200737860L, model.maxCoresAllowed()); - Assertions.assertEquals("fkzikfj", model.regionalQuotas().get(0).regionName()); - Assertions.assertEquals(840452358512329690L, model.regionalQuotas().get(0).coresUsed()); - Assertions.assertEquals(2977949110627506617L, model.regionalQuotas().get(0).coresAvailable()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaInfoTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaInfoTests.java deleted file mode 100644 index 9d80a8d41d38..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaInfoTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.QuotaInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class QuotaInfoTests { - @Test - public void testDeserialize() { - QuotaInfo model = BinaryData.fromString("{\"coresUsed\":1083545989}").toObject(QuotaInfo.class); - Assertions.assertEquals(1083545989, model.coresUsed()); - } - - @Test - public void testSerialize() { - QuotaInfo model = new QuotaInfo().withCoresUsed(1083545989); - model = BinaryData.fromObject(model).toObject(QuotaInfo.class); - Assertions.assertEquals(1083545989, model.coresUsed()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionalQuotaCapabilityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionalQuotaCapabilityTests.java deleted file mode 100644 index 6a13826cacc9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionalQuotaCapabilityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.RegionalQuotaCapability; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegionalQuotaCapabilityTests { - @Test - public void testDeserialize() { - RegionalQuotaCapability model = - BinaryData - .fromString( - "{\"regionName\":\"nozj\",\"coresUsed\":1906816553325698286,\"coresAvailable\":6944179335245488017}") - .toObject(RegionalQuotaCapability.class); - Assertions.assertEquals("nozj", model.regionName()); - Assertions.assertEquals(1906816553325698286L, model.coresUsed()); - Assertions.assertEquals(6944179335245488017L, model.coresAvailable()); - } - - @Test - public void testSerialize() { - RegionalQuotaCapability model = - new RegionalQuotaCapability() - .withRegionName("nozj") - .withCoresUsed(1906816553325698286L) - .withCoresAvailable(6944179335245488017L); - model = BinaryData.fromObject(model).toObject(RegionalQuotaCapability.class); - Assertions.assertEquals("nozj", model.regionName()); - Assertions.assertEquals(1906816553325698286L, model.coresUsed()); - Assertions.assertEquals(6944179335245488017L, model.coresAvailable()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionsCapabilityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionsCapabilityTests.java deleted file mode 100644 index 8646babd2835..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionsCapabilityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.RegionsCapability; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegionsCapabilityTests { - @Test - public void testDeserialize() { - RegionsCapability model = - BinaryData.fromString("{\"available\":[\"jhfjxwm\"]}").toObject(RegionsCapability.class); - Assertions.assertEquals("jhfjxwm", model.available().get(0)); - } - - @Test - public void testSerialize() { - RegionsCapability model = new RegionsCapability().withAvailable(Arrays.asList("jhfjxwm")); - model = BinaryData.fromObject(model).toObject(RegionsCapability.class); - Assertions.assertEquals("jhfjxwm", model.available().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ResourceIdTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ResourceIdTests.java deleted file mode 100644 index 7f52540c12b3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ResourceIdTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ResourceId; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceIdTests { - @Test - public void testDeserialize() { - ResourceId model = BinaryData.fromString("{\"id\":\"hm\"}").toObject(ResourceId.class); - Assertions.assertEquals("hm", model.id()); - } - - @Test - public void testSerialize() { - ResourceId model = new ResourceId().withId("hm"); - model = BinaryData.fromObject(model).toObject(ResourceId.class); - Assertions.assertEquals("hm", model.id()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionDetailInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionDetailInnerTests.java deleted file mode 100644 index d21dc61b936a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionDetailInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RuntimeScriptActionDetailInnerTests { - @Test - public void testDeserialize() { - RuntimeScriptActionDetailInner model = - BinaryData - .fromString( - "{\"scriptExecutionId\":6042347797530197687,\"startTime\":\"w\",\"endTime\":\"kpnb\",\"status\":\"zejjoqk\",\"operation\":\"fhsxttaugz\",\"executionSummary\":[{\"status\":\"azpxdtnkdmkqjjl\",\"instanceCount\":1899473333},{\"status\":\"vrkpyouaibreb\",\"instanceCount\":1719378885},{\"status\":\"sj\",\"instanceCount\":1330578772},{\"status\":\"tnqttezlwfffiak\",\"instanceCount\":1860291958}],\"debugInformation\":\"qmt\",\"name\":\"d\",\"uri\":\"tmmjihyeozph\",\"parameters\":\"auyqncygupkv\",\"roles\":[\"mdscwxqupev\"],\"applicationName\":\"f\"}") - .toObject(RuntimeScriptActionDetailInner.class); - Assertions.assertEquals("d", model.name()); - Assertions.assertEquals("tmmjihyeozph", model.uri()); - Assertions.assertEquals("auyqncygupkv", model.parameters()); - Assertions.assertEquals("mdscwxqupev", model.roles().get(0)); - } - - @Test - public void testSerialize() { - RuntimeScriptActionDetailInner model = - new RuntimeScriptActionDetailInner() - .withName("d") - .withUri("tmmjihyeozph") - .withParameters("auyqncygupkv") - .withRoles(Arrays.asList("mdscwxqupev")); - model = BinaryData.fromObject(model).toObject(RuntimeScriptActionDetailInner.class); - Assertions.assertEquals("d", model.name()); - Assertions.assertEquals("tmmjihyeozph", model.uri()); - Assertions.assertEquals("auyqncygupkv", model.parameters()); - Assertions.assertEquals("mdscwxqupev", model.roles().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionTests.java deleted file mode 100644 index 5b0f4f846ae1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RuntimeScriptActionTests { - @Test - public void testDeserialize() { - RuntimeScriptAction model = - BinaryData - .fromString( - "{\"name\":\"axmodfvuef\",\"uri\":\"wsbpfvm\",\"parameters\":\"hrfou\",\"roles\":[\"taakc\"],\"applicationName\":\"iyzvqtmnub\"}") - .toObject(RuntimeScriptAction.class); - Assertions.assertEquals("axmodfvuef", model.name()); - Assertions.assertEquals("wsbpfvm", model.uri()); - Assertions.assertEquals("hrfou", model.parameters()); - Assertions.assertEquals("taakc", model.roles().get(0)); - } - - @Test - public void testSerialize() { - RuntimeScriptAction model = - new RuntimeScriptAction() - .withName("axmodfvuef") - .withUri("wsbpfvm") - .withParameters("hrfou") - .withRoles(Arrays.asList("taakc")); - model = BinaryData.fromObject(model).toObject(RuntimeScriptAction.class); - Assertions.assertEquals("axmodfvuef", model.name()); - Assertions.assertEquals("wsbpfvm", model.uri()); - Assertions.assertEquals("hrfou", model.parameters()); - Assertions.assertEquals("taakc", model.roles().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionHistoryListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionHistoryListTests.java deleted file mode 100644 index c19506938670..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionHistoryListTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ScriptActionExecutionHistoryList; -import org.junit.jupiter.api.Test; - -public final class ScriptActionExecutionHistoryListTests { - @Test - public void testDeserialize() { - ScriptActionExecutionHistoryList model = - BinaryData - .fromString( - "{\"value\":[{\"scriptExecutionId\":8636395279237294027,\"startTime\":\"xbjxyfwnylrcools\",\"endTime\":\"p\",\"status\":\"w\",\"operation\":\"bnujrywvtylbf\",\"executionSummary\":[],\"debugInformation\":\"rd\",\"name\":\"iwii\",\"uri\":\"htywubxcbihwq\",\"parameters\":\"fdntwjchrdgoih\",\"roles\":[\"mwctondzjluudfd\",\"wggytsbwtovvt\",\"seinqfiuf\"],\"applicationName\":\"knpirgnepttwq\"}],\"nextLink\":\"niffcdmqnroj\"}") - .toObject(ScriptActionExecutionHistoryList.class); - } - - @Test - public void testSerialize() { - ScriptActionExecutionHistoryList model = new ScriptActionExecutionHistoryList(); - model = BinaryData.fromObject(model).toObject(ScriptActionExecutionHistoryList.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionSummaryTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionSummaryTests.java deleted file mode 100644 index 4e3c839f1d97..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionSummaryTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ScriptActionExecutionSummary; -import org.junit.jupiter.api.Test; - -public final class ScriptActionExecutionSummaryTests { - @Test - public void testDeserialize() { - ScriptActionExecutionSummary model = - BinaryData - .fromString("{\"status\":\"otxhojujby\",\"instanceCount\":159734052}") - .toObject(ScriptActionExecutionSummary.class); - } - - @Test - public void testSerialize() { - ScriptActionExecutionSummary model = new ScriptActionExecutionSummary(); - model = BinaryData.fromObject(model).toObject(ScriptActionExecutionSummary.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionTests.java deleted file mode 100644 index 793ba19af566..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ScriptAction; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScriptActionTests { - @Test - public void testDeserialize() { - ScriptAction model = - BinaryData - .fromString("{\"name\":\"mbmbexppbh\",\"uri\":\"q\",\"parameters\":\"rolfpfp\"}") - .toObject(ScriptAction.class); - Assertions.assertEquals("mbmbexppbh", model.name()); - Assertions.assertEquals("q", model.uri()); - Assertions.assertEquals("rolfpfp", model.parameters()); - } - - @Test - public void testSerialize() { - ScriptAction model = new ScriptAction().withName("mbmbexppbh").withUri("q").withParameters("rolfpfp"); - model = BinaryData.fromObject(model).toObject(ScriptAction.class); - Assertions.assertEquals("mbmbexppbh", model.name()); - Assertions.assertEquals("q", model.uri()); - Assertions.assertEquals("rolfpfp", model.parameters()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteWithResponseMockTests.java deleted file mode 100644 index b8c2146204d7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptActionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.scriptActions().deleteWithResponse("aglkafhon", "juj", "ickpz", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailWithResponseMockTests.java deleted file mode 100644 index 582cd609694c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.RuntimeScriptActionDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptActionsGetExecutionDetailWithResponseMockTests { - @Test - public void testGetExecutionDetailWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"scriptExecutionId\":6090285266807754763,\"startTime\":\"qxeiiqbimhtmwwi\",\"endTime\":\"ehfqpofvwbc\",\"status\":\"embnkbw\",\"operation\":\"vxkdivqihebwtswb\",\"executionSummary\":[{\"status\":\"m\",\"instanceCount\":1527664829},{\"status\":\"gegizvcjfel\",\"instanceCount\":953969053},{\"status\":\"ubggbqigkxkb\",\"instanceCount\":861534572}],\"debugInformation\":\"akgacyrcmjdm\",\"name\":\"pofap\",\"uri\":\"uhrylniofr\",\"parameters\":\"bzjedmstk\",\"roles\":[\"l\",\"xbcuiiznkt\",\"f\"],\"applicationName\":\"snvpdibmi\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RuntimeScriptActionDetail response = - manager.scriptActions().getExecutionDetailWithResponse("yqo", "mpqoxw", "o", Context.NONE).getValue(); - - Assertions.assertEquals("pofap", response.name()); - Assertions.assertEquals("uhrylniofr", response.uri()); - Assertions.assertEquals("bzjedmstk", response.parameters()); - Assertions.assertEquals("l", response.roles().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterMockTests.java deleted file mode 100644 index f081ebe510f4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.RuntimeScriptActionDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptActionsListByClusterMockTests { - @Test - public void testListByCluster() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"scriptExecutionId\":6984855935225199348,\"startTime\":\"mkqscaz\",\"endTime\":\"wxtzxpuamwab\",\"status\":\"rvxcush\",\"operation\":\"haivm\",\"executionSummary\":[{\"status\":\"flv\",\"instanceCount\":1752644697},{\"status\":\"wywa\",\"instanceCount\":79042241}],\"debugInformation\":\"knsmjblmljhlnymz\",\"name\":\"tqyryuzcbmqqv\",\"uri\":\"mv\",\"parameters\":\"gtayxonsupeujlz\",\"roles\":[\"hcvsqltnzoi\"],\"applicationName\":\"sxgnx\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptActions().listByCluster("cpopmxel", "wcltyjede", Context.NONE); - - Assertions.assertEquals("tqyryuzcbmqqv", response.iterator().next().name()); - Assertions.assertEquals("mv", response.iterator().next().uri()); - Assertions.assertEquals("gtayxonsupeujlz", response.iterator().next().parameters()); - Assertions.assertEquals("hcvsqltnzoi", response.iterator().next().roles().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListTests.java deleted file mode 100644 index a97791646e5c..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.RuntimeScriptActionDetailInner; -import com.azure.resourcemanager.hdinsight.models.ScriptActionsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScriptActionsListTests { - @Test - public void testDeserialize() { - ScriptActionsList model = - BinaryData - .fromString( - "{\"value\":[{\"scriptExecutionId\":2717141106438874007,\"startTime\":\"rvqqaatj\",\"endTime\":\"rv\",\"status\":\"upmfiibfg\",\"operation\":\"ioolvrwxkvtkkgll\",\"executionSummary\":[],\"debugInformation\":\"gvjayvblmh\",\"name\":\"k\",\"uri\":\"uhbxvvy\",\"parameters\":\"s\",\"roles\":[\"byrqufeg\",\"uvwzfbnh\",\"mctlpdngitv\"],\"applicationName\":\"mhrixkwmyijejve\"},{\"scriptExecutionId\":5137218899058687714,\"startTime\":\"nai\",\"endTime\":\"xccbdreaxhcex\",\"status\":\"rvqahqkghtpwi\",\"operation\":\"hyjsvfycx\",\"executionSummary\":[],\"debugInformation\":\"oowvrv\",\"name\":\"t\",\"uri\":\"jqppyostronzmy\",\"parameters\":\"fipns\",\"roles\":[\"mcwaekrrjr\",\"afxtsgum\",\"jglikkxwslolb\",\"pvuzlmv\"],\"applicationName\":\"lfktgplcrpwjxe\"}],\"nextLink\":\"oi\"}") - .toObject(ScriptActionsList.class); - Assertions.assertEquals("k", model.value().get(0).name()); - Assertions.assertEquals("uhbxvvy", model.value().get(0).uri()); - Assertions.assertEquals("s", model.value().get(0).parameters()); - Assertions.assertEquals("byrqufeg", model.value().get(0).roles().get(0)); - } - - @Test - public void testSerialize() { - ScriptActionsList model = - new ScriptActionsList() - .withValue( - Arrays - .asList( - new RuntimeScriptActionDetailInner() - .withName("k") - .withUri("uhbxvvy") - .withParameters("s") - .withRoles(Arrays.asList("byrqufeg", "uvwzfbnh", "mctlpdngitv")), - new RuntimeScriptActionDetailInner() - .withName("t") - .withUri("jqppyostronzmy") - .withParameters("fipns") - .withRoles(Arrays.asList("mcwaekrrjr", "afxtsgum", "jglikkxwslolb", "pvuzlmv")))); - model = BinaryData.fromObject(model).toObject(ScriptActionsList.class); - Assertions.assertEquals("k", model.value().get(0).name()); - Assertions.assertEquals("uhbxvvy", model.value().get(0).uri()); - Assertions.assertEquals("s", model.value().get(0).parameters()); - Assertions.assertEquals("byrqufeg", model.value().get(0).roles().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesListByClusterMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesListByClusterMockTests.java deleted file mode 100644 index dfe3ffeb6ac7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesListByClusterMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import com.azure.resourcemanager.hdinsight.models.RuntimeScriptActionDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionHistoriesListByClusterMockTests { - @Test - public void testListByCluster() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"scriptExecutionId\":7455956743778499737,\"startTime\":\"cxwaxfewz\",\"endTime\":\"jexfdeqvhp\",\"status\":\"lkkshkbffmbmx\",\"operation\":\"rgywwp\",\"executionSummary\":[{\"status\":\"nptfujgi\",\"instanceCount\":798074149}],\"debugInformation\":\"o\",\"name\":\"pttaqutd\",\"uri\":\"wemxswvruunzz\",\"parameters\":\"ehkfkimrtixok\",\"roles\":[\"qyinl\",\"qepqwhixmon\",\"tshi\"],\"applicationName\":\"gvelfc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.scriptExecutionHistories().listByCluster("sihclafzvaylp", "rsqqwztcm", Context.NONE); - - Assertions.assertEquals("pttaqutd", response.iterator().next().name()); - Assertions.assertEquals("wemxswvruunzz", response.iterator().next().uri()); - Assertions.assertEquals("ehkfkimrtixok", response.iterator().next().parameters()); - Assertions.assertEquals("qyinl", response.iterator().next().roles().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesPromoteWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesPromoteWithResponseMockTests.java deleted file mode 100644 index 36830c26c873..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesPromoteWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ScriptExecutionHistoriesPromoteWithResponseMockTests { - @Test - public void testPromoteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.scriptExecutionHistories().promoteWithResponse("du", "cb", "rds", Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ServiceSpecificationTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ServiceSpecificationTests.java deleted file mode 100644 index de718f97aa1b..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,102 +0,0 @@ -// 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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.MetricSpecifications; -import com.azure.resourcemanager.hdinsight.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ServiceSpecificationTests { - @Test - public void testDeserialize() { - ServiceSpecification model = - BinaryData - .fromString( - "{\"metricSpecifications\":[{\"name\":\"n\",\"displayName\":\"ypsxjvfoim\",\"displayDescription\":\"slirciz\",\"unit\":\"vydfceacvlhvygdy\",\"aggregationType\":\"umrtwnawjsl\",\"supportedAggregationTypes\":[\"kojgcyzts\",\"mznbaeqphch\",\"nrnrp\",\"ehuwrykqgaifmvik\"],\"supportedTimeGrainTypes\":[\"dvk\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"dznx\",\"sourceMdmNamespace\":\"dsrhnjiv\",\"metricFilterPattern\":\"v\",\"fillGapWithZero\":false,\"category\":\"qfzgemjdftul\",\"resourceIdDimensionNameOverride\":\"tduceamt\",\"isInternal\":false,\"delegateMetricNameOverride\":\"o\",\"dimensions\":[]},{\"name\":\"cwwqiokn\",\"displayName\":\"xmojmsvpkjp\",\"displayDescription\":\"kwcf\",\"unit\":\"ljyxgtczhe\",\"aggregationType\":\"bsdshmkxmaehvbbx\",\"supportedAggregationTypes\":[\"pltfnhtba\"],\"supportedTimeGrainTypes\":[\"xywr\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"kl\",\"sourceMdmNamespace\":\"pluodpv\",\"metricFilterPattern\":\"udlgzibthostgkts\",\"fillGapWithZero\":true,\"category\":\"eclze\",\"resourceIdDimensionNameOverride\":\"bcvhzlhpl\",\"isInternal\":false,\"delegateMetricNameOverride\":\"dlwwqfbumlkxt\",\"dimensions\":[]}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("n", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("ypsxjvfoim", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("slirciz", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("vydfceacvlhvygdy", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("umrtwnawjsl", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("kojgcyzts", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("dvk", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("dznx", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("dsrhnjiv", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("v", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("qfzgemjdftul", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("tduceamt", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("o", model.metricSpecifications().get(0).delegateMetricNameOverride()); - } - - @Test - public void testSerialize() { - ServiceSpecification model = - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications() - .withName("n") - .withDisplayName("ypsxjvfoim") - .withDisplayDescription("slirciz") - .withUnit("vydfceacvlhvygdy") - .withAggregationType("umrtwnawjsl") - .withSupportedAggregationTypes( - Arrays.asList("kojgcyzts", "mznbaeqphch", "nrnrp", "ehuwrykqgaifmvik")) - .withSupportedTimeGrainTypes(Arrays.asList("dvk")) - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("dznx") - .withSourceMdmNamespace("dsrhnjiv") - .withMetricFilterPattern("v") - .withFillGapWithZero(false) - .withCategory("qfzgemjdftul") - .withResourceIdDimensionNameOverride("tduceamt") - .withIsInternal(false) - .withDelegateMetricNameOverride("o") - .withDimensions(Arrays.asList()), - new MetricSpecifications() - .withName("cwwqiokn") - .withDisplayName("xmojmsvpkjp") - .withDisplayDescription("kwcf") - .withUnit("ljyxgtczhe") - .withAggregationType("bsdshmkxmaehvbbx") - .withSupportedAggregationTypes(Arrays.asList("pltfnhtba")) - .withSupportedTimeGrainTypes(Arrays.asList("xywr")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("kl") - .withSourceMdmNamespace("pluodpv") - .withMetricFilterPattern("udlgzibthostgkts") - .withFillGapWithZero(true) - .withCategory("eclze") - .withResourceIdDimensionNameOverride("bcvhzlhpl") - .withIsInternal(false) - .withDelegateMetricNameOverride("dlwwqfbumlkxt") - .withDimensions(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("n", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("ypsxjvfoim", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("slirciz", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("vydfceacvlhvygdy", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("umrtwnawjsl", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("kojgcyzts", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("dvk", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("dznx", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("dsrhnjiv", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("v", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("qfzgemjdftul", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("tduceamt", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("o", model.metricSpecifications().get(0).delegateMetricNameOverride()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/SshPublicKeyTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/SshPublicKeyTests.java deleted file mode 100644 index d87e6d544dbe..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/SshPublicKeyTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.SshPublicKey; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SshPublicKeyTests { - @Test - public void testDeserialize() { - SshPublicKey model = BinaryData.fromString("{\"certificateData\":\"kzsmodm\"}").toObject(SshPublicKey.class); - Assertions.assertEquals("kzsmodm", model.certificateData()); - } - - @Test - public void testSerialize() { - SshPublicKey model = new SshPublicKey().withCertificateData("kzsmodm"); - model = BinaryData.fromObject(model).toObject(SshPublicKey.class); - Assertions.assertEquals("kzsmodm", model.certificateData()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsageTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsageTests.java deleted file mode 100644 index 8c2d0d0820c0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsageTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Usage; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UsageTests { - @Test - public void testDeserialize() { - Usage model = - BinaryData - .fromString( - "{\"unit\":\"uvarmywdmjsjq\",\"currentValue\":7543119596845628167,\"limit\":1070182178135164646,\"name\":{\"value\":\"lyc\",\"localizedValue\":\"uhpkxkgymar\"}}") - .toObject(Usage.class); - Assertions.assertEquals("uvarmywdmjsjq", model.unit()); - Assertions.assertEquals(7543119596845628167L, model.currentValue()); - Assertions.assertEquals(1070182178135164646L, model.limit()); - } - - @Test - public void testSerialize() { - Usage model = - new Usage() - .withUnit("uvarmywdmjsjq") - .withCurrentValue(7543119596845628167L) - .withLimit(1070182178135164646L); - model = BinaryData.fromObject(model).toObject(Usage.class); - Assertions.assertEquals("uvarmywdmjsjq", model.unit()); - Assertions.assertEquals(7543119596845628167L, model.currentValue()); - Assertions.assertEquals(1070182178135164646L, model.limit()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsagesListResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsagesListResultInnerTests.java deleted file mode 100644 index 45164689eded..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsagesListResultInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.fluent.models.UsagesListResultInner; -import com.azure.resourcemanager.hdinsight.models.Usage; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UsagesListResultInnerTests { - @Test - public void testDeserialize() { - UsagesListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"unit\":\"rvxaglrvimjwosy\",\"currentValue\":2401602492746642940,\"limit\":3589572009865624969,\"name\":{\"value\":\"k\",\"localizedValue\":\"umiekkezzi\"}},{\"unit\":\"ly\",\"currentValue\":8347972535078571246,\"limit\":3480662233344581257,\"name\":{\"value\":\"bdunygaeqid\",\"localizedValue\":\"fatpxllrxcyjmoa\"}}]}") - .toObject(UsagesListResultInner.class); - Assertions.assertEquals("rvxaglrvimjwosy", model.value().get(0).unit()); - Assertions.assertEquals(2401602492746642940L, model.value().get(0).currentValue()); - Assertions.assertEquals(3589572009865624969L, model.value().get(0).limit()); - } - - @Test - public void testSerialize() { - UsagesListResultInner model = - new UsagesListResultInner() - .withValue( - Arrays - .asList( - new Usage() - .withUnit("rvxaglrvimjwosy") - .withCurrentValue(2401602492746642940L) - .withLimit(3589572009865624969L), - new Usage() - .withUnit("ly") - .withCurrentValue(8347972535078571246L) - .withLimit(3480662233344581257L))); - model = BinaryData.fromObject(model).toObject(UsagesListResultInner.class); - Assertions.assertEquals("rvxaglrvimjwosy", model.value().get(0).unit()); - Assertions.assertEquals(2401602492746642940L, model.value().get(0).currentValue()); - Assertions.assertEquals(3589572009865624969L, model.value().get(0).limit()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UserAssignedIdentityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 5df63d6c680d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UserAssignedIdentityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.UserAssignedIdentity; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UserAssignedIdentityTests { - @Test - public void testDeserialize() { - UserAssignedIdentity model = - BinaryData - .fromString("{\"principalId\":\"sxlzevgbmqj\",\"clientId\":\"bcypmi\",\"tenantId\":\"w\"}") - .toObject(UserAssignedIdentity.class); - Assertions.assertEquals("w", model.tenantId()); - } - - @Test - public void testSerialize() { - UserAssignedIdentity model = new UserAssignedIdentity().withTenantId("w"); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - Assertions.assertEquals("w", model.tenantId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionSpecTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionSpecTests.java deleted file mode 100644 index d55b567e8cb2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionSpecTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.VersionSpec; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VersionSpecTests { - @Test - public void testDeserialize() { - VersionSpec model = - BinaryData - .fromString( - "{\"friendlyName\":\"rdvstkwqqtch\",\"displayName\":\"lmfmtdaay\",\"isDefault\":false,\"componentVersions\":{\"xg\":\"gpiohgwxrtfudxe\",\"pkukghi\":\"qagvrvm\",\"wi\":\"dblx\"}}") - .toObject(VersionSpec.class); - Assertions.assertEquals("rdvstkwqqtch", model.friendlyName()); - Assertions.assertEquals("lmfmtdaay", model.displayName()); - Assertions.assertEquals(false, model.isDefault()); - Assertions.assertEquals("gpiohgwxrtfudxe", model.componentVersions().get("xg")); - } - - @Test - public void testSerialize() { - VersionSpec model = - new VersionSpec() - .withFriendlyName("rdvstkwqqtch") - .withDisplayName("lmfmtdaay") - .withIsDefault(false) - .withComponentVersions(mapOf("xg", "gpiohgwxrtfudxe", "pkukghi", "qagvrvm", "wi", "dblx")); - model = BinaryData.fromObject(model).toObject(VersionSpec.class); - Assertions.assertEquals("rdvstkwqqtch", model.friendlyName()); - Assertions.assertEquals("lmfmtdaay", model.displayName()); - Assertions.assertEquals(false, model.isDefault()); - Assertions.assertEquals("gpiohgwxrtfudxe", model.componentVersions().get("xg")); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionsCapabilityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionsCapabilityTests.java deleted file mode 100644 index 8756d7bb12c2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionsCapabilityTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.VersionSpec; -import com.azure.resourcemanager.hdinsight.models.VersionsCapability; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VersionsCapabilityTests { - @Test - public void testDeserialize() { - VersionsCapability model = - BinaryData - .fromString( - "{\"available\":[{\"friendlyName\":\"ntorzihleosjswsr\",\"displayName\":\"lyzrpzbchckqqzqi\",\"isDefault\":false,\"componentVersions\":{\"yatrwy\":\"uiizynke\",\"ibzyhwitsmyp\":\"q\",\"biknsorgjhxbld\":\"ynpcdpumnzgmwznm\",\"dmtnc\":\"lwwrl\"}},{\"friendlyName\":\"kotl\",\"displayName\":\"d\",\"isDefault\":false,\"componentVersions\":{\"tdtbnnhadooc\":\"ocogj\"}},{\"friendlyName\":\"vcikhnvpamqgx\",\"displayName\":\"u\",\"isDefault\":false,\"componentVersions\":{\"elwuipi\":\"wggxkallat\",\"rhyrnxxmueed\":\"cjzkzivgvvcna\"}}]}") - .toObject(VersionsCapability.class); - Assertions.assertEquals("ntorzihleosjswsr", model.available().get(0).friendlyName()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.available().get(0).displayName()); - Assertions.assertEquals(false, model.available().get(0).isDefault()); - Assertions.assertEquals("uiizynke", model.available().get(0).componentVersions().get("yatrwy")); - } - - @Test - public void testSerialize() { - VersionsCapability model = - new VersionsCapability() - .withAvailable( - Arrays - .asList( - new VersionSpec() - .withFriendlyName("ntorzihleosjswsr") - .withDisplayName("lyzrpzbchckqqzqi") - .withIsDefault(false) - .withComponentVersions( - mapOf( - "yatrwy", - "uiizynke", - "ibzyhwitsmyp", - "q", - "biknsorgjhxbld", - "ynpcdpumnzgmwznm", - "dmtnc", - "lwwrl")), - new VersionSpec() - .withFriendlyName("kotl") - .withDisplayName("d") - .withIsDefault(false) - .withComponentVersions(mapOf("tdtbnnhadooc", "ocogj")), - new VersionSpec() - .withFriendlyName("vcikhnvpamqgx") - .withDisplayName("u") - .withIsDefault(false) - .withComponentVersions( - mapOf("elwuipi", "wggxkallat", "rhyrnxxmueed", "cjzkzivgvvcna")))); - model = BinaryData.fromObject(model).toObject(VersionsCapability.class); - Assertions.assertEquals("ntorzihleosjswsr", model.available().get(0).friendlyName()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.available().get(0).displayName()); - Assertions.assertEquals(false, model.available().get(0).isDefault()); - Assertions.assertEquals("uiizynke", model.available().get(0).componentVersions().get("yatrwy")); - } - - @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/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsMockTests.java deleted file mode 100644 index 8f10aaad99ed..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.hdinsight.HDInsightManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VirtualMachinesRestartHostsMockTests { - @Test - public void testRestartHosts() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightManager manager = - HDInsightManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .virtualMachines() - .restartHosts( - "umwmxqhnd", "noamldsehaohdj", Arrays.asList("flzokxco", "pelnjetag", "tsxoatftgz"), Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualNetworkProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualNetworkProfileTests.java deleted file mode 100644 index 4b84c81c6457..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualNetworkProfileTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.VirtualNetworkProfile; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VirtualNetworkProfileTests { - @Test - public void testDeserialize() { - VirtualNetworkProfile model = - BinaryData - .fromString("{\"id\":\"ougpbkwt\",\"subnet\":\"tduqktapspwgcuer\"}") - .toObject(VirtualNetworkProfile.class); - Assertions.assertEquals("ougpbkwt", model.id()); - Assertions.assertEquals("tduqktapspwgcuer", model.subnet()); - } - - @Test - public void testSerialize() { - VirtualNetworkProfile model = new VirtualNetworkProfile().withId("ougpbkwt").withSubnet("tduqktapspwgcuer"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkProfile.class); - Assertions.assertEquals("ougpbkwt", model.id()); - Assertions.assertEquals("tduqktapspwgcuer", model.subnet()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizeCompatibilityFilterV2Tests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizeCompatibilityFilterV2Tests.java deleted file mode 100644 index 637d41785cea..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizeCompatibilityFilterV2Tests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.FilterMode; -import com.azure.resourcemanager.hdinsight.models.OSType; -import com.azure.resourcemanager.hdinsight.models.VmSizeCompatibilityFilterV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VmSizeCompatibilityFilterV2Tests { - @Test - public void testDeserialize() { - VmSizeCompatibilityFilterV2 model = - BinaryData - .fromString( - "{\"filterMode\":\"Exclude\",\"regions\":[\"jxdxrbuukz\"],\"clusterFlavors\":[\"wyhmlw\",\"aztz\"],\"nodeTypes\":[\"ncckw\"],\"clusterVersions\":[\"qwhxxbuyqaxzfeqz\",\"ppriol\",\"or\",\"altol\"],\"osType\":[\"Linux\",\"Windows\",\"Linux\"],\"vmSizes\":[\"wcsdbnwdcfhucq\",\"pfuvglsbjjca\",\"vxb\",\"t\"],\"espApplied\":\"dut\",\"computeIsolationSupported\":\"ormrlxqtvcofudfl\"}") - .toObject(VmSizeCompatibilityFilterV2.class); - Assertions.assertEquals(FilterMode.EXCLUDE, model.filterMode()); - Assertions.assertEquals("jxdxrbuukz", model.regions().get(0)); - Assertions.assertEquals("wyhmlw", model.clusterFlavors().get(0)); - Assertions.assertEquals("ncckw", model.nodeTypes().get(0)); - Assertions.assertEquals("qwhxxbuyqaxzfeqz", model.clusterVersions().get(0)); - Assertions.assertEquals(OSType.LINUX, model.osType().get(0)); - Assertions.assertEquals("wcsdbnwdcfhucq", model.vmSizes().get(0)); - Assertions.assertEquals("dut", model.espApplied()); - Assertions.assertEquals("ormrlxqtvcofudfl", model.computeIsolationSupported()); - } - - @Test - public void testSerialize() { - VmSizeCompatibilityFilterV2 model = - new VmSizeCompatibilityFilterV2() - .withFilterMode(FilterMode.EXCLUDE) - .withRegions(Arrays.asList("jxdxrbuukz")) - .withClusterFlavors(Arrays.asList("wyhmlw", "aztz")) - .withNodeTypes(Arrays.asList("ncckw")) - .withClusterVersions(Arrays.asList("qwhxxbuyqaxzfeqz", "ppriol", "or", "altol")) - .withOsType(Arrays.asList(OSType.LINUX, OSType.WINDOWS, OSType.LINUX)) - .withVmSizes(Arrays.asList("wcsdbnwdcfhucq", "pfuvglsbjjca", "vxb", "t")) - .withEspApplied("dut") - .withComputeIsolationSupported("ormrlxqtvcofudfl"); - model = BinaryData.fromObject(model).toObject(VmSizeCompatibilityFilterV2.class); - Assertions.assertEquals(FilterMode.EXCLUDE, model.filterMode()); - Assertions.assertEquals("jxdxrbuukz", model.regions().get(0)); - Assertions.assertEquals("wyhmlw", model.clusterFlavors().get(0)); - Assertions.assertEquals("ncckw", model.nodeTypes().get(0)); - Assertions.assertEquals("qwhxxbuyqaxzfeqz", model.clusterVersions().get(0)); - Assertions.assertEquals(OSType.LINUX, model.osType().get(0)); - Assertions.assertEquals("wcsdbnwdcfhucq", model.vmSizes().get(0)); - Assertions.assertEquals("dut", model.espApplied()); - Assertions.assertEquals("ormrlxqtvcofudfl", model.computeIsolationSupported()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizePropertyTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizePropertyTests.java deleted file mode 100644 index 6f24e7fe92d1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizePropertyTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.VmSizeProperty; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VmSizePropertyTests { - @Test - public void testDeserialize() { - VmSizeProperty model = - BinaryData - .fromString( - "{\"name\":\"gj\",\"cores\":1622767746,\"dataDiskStorageTier\":\"knnqvsaznq\",\"label\":\"orudsgsa\",\"maxDataDiskCount\":947177728054345704,\"memoryInMb\":6438368271325429857,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":6483951652276472612,\"webWorkerResourceDiskSizeInMb\":5024506491069436029}") - .toObject(VmSizeProperty.class); - Assertions.assertEquals("gj", model.name()); - Assertions.assertEquals(1622767746, model.cores()); - Assertions.assertEquals("knnqvsaznq", model.dataDiskStorageTier()); - Assertions.assertEquals("orudsgsa", model.label()); - Assertions.assertEquals(947177728054345704L, model.maxDataDiskCount()); - Assertions.assertEquals(6438368271325429857L, model.memoryInMb()); - Assertions.assertEquals(true, model.supportedByVirtualMachines()); - Assertions.assertEquals(true, model.supportedByWebWorkerRoles()); - Assertions.assertEquals(6483951652276472612L, model.virtualMachineResourceDiskSizeInMb()); - Assertions.assertEquals(5024506491069436029L, model.webWorkerResourceDiskSizeInMb()); - } - - @Test - public void testSerialize() { - VmSizeProperty model = - new VmSizeProperty() - .withName("gj") - .withCores(1622767746) - .withDataDiskStorageTier("knnqvsaznq") - .withLabel("orudsgsa") - .withMaxDataDiskCount(947177728054345704L) - .withMemoryInMb(6438368271325429857L) - .withSupportedByVirtualMachines(true) - .withSupportedByWebWorkerRoles(true) - .withVirtualMachineResourceDiskSizeInMb(6483951652276472612L) - .withWebWorkerResourceDiskSizeInMb(5024506491069436029L); - model = BinaryData.fromObject(model).toObject(VmSizeProperty.class); - Assertions.assertEquals("gj", model.name()); - Assertions.assertEquals(1622767746, model.cores()); - Assertions.assertEquals("knnqvsaznq", model.dataDiskStorageTier()); - Assertions.assertEquals("orudsgsa", model.label()); - Assertions.assertEquals(947177728054345704L, model.maxDataDiskCount()); - Assertions.assertEquals(6438368271325429857L, model.memoryInMb()); - Assertions.assertEquals(true, model.supportedByVirtualMachines()); - Assertions.assertEquals(true, model.supportedByWebWorkerRoles()); - Assertions.assertEquals(6483951652276472612L, model.virtualMachineResourceDiskSizeInMb()); - Assertions.assertEquals(5024506491069436029L, model.webWorkerResourceDiskSizeInMb()); - } -}