From 3648ad0a71a6fdb449c8fa5ba4634d0a03aa98dc Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 21 Aug 2023 07:41:18 +0000 Subject: [PATCH] CodeGen from PR 25135 in Azure/azure-rest-api-specs Merge b36f75338bb933cbf23cc1daedc222f0d50855ca into 7f70e351393addbc31d790a908c994c7c8644d9c --- .../CHANGELOG.md | 4 +- .../azure-resourcemanager-hdinsight/README.md | 4 +- .../azure-resourcemanager-hdinsight/SAMPLE.md | 146 +++++----- .../azure-resourcemanager-hdinsight/pom.xml | 2 +- .../hdinsight/HDInsightManager.java | 8 +- .../HDInsightManagementClientBuilder.java | 2 +- .../HDInsightManagementClientImpl.java | 2 +- .../hdinsight/models/NetworkProperties.java | 33 +++ .../OutboundDependenciesManagedType.java | 51 ++++ .../generated/ApplicationsCreateSamples.java | 2 +- .../generated/ApplicationsDeleteSamples.java | 2 +- ...nsGetAzureAsyncOperationStatusSamples.java | 2 +- .../generated/ApplicationsGetSamples.java | 4 +- .../ApplicationsListByClusterSamples.java | 2 +- .../generated/ClustersCreateSamples.java | 27 +- .../generated/ClustersDeleteSamples.java | 2 +- .../ClustersExecuteScriptActionsSamples.java | 2 +- ...rsGetAzureAsyncOperationStatusSamples.java | 2 +- .../ClustersGetByResourceGroupSamples.java | 4 +- .../ClustersGetGatewaySettingsSamples.java | 2 +- .../ClustersListByResourceGroupSamples.java | 2 +- .../generated/ClustersListSamples.java | 2 +- .../generated/ClustersResizeSamples.java | 2 +- ...lustersRotateDiskEncryptionKeySamples.java | 2 +- ...rsUpdateAutoScaleConfigurationSamples.java | 6 +- .../ClustersUpdateGatewaySettingsSamples.java | 2 +- ...stersUpdateIdentityCertificateSamples.java | 2 +- .../generated/ClustersUpdateSamples.java | 3 +- .../generated/ConfigurationsGetSamples.java | 2 +- .../generated/ConfigurationsListSamples.java | 2 +- .../ConfigurationsUpdateSamples.java | 5 +- .../generated/ExtensionsCreateSamples.java | 2 +- .../generated/ExtensionsDeleteSamples.java | 2 +- .../ExtensionsDisableAzureMonitorSamples.java | 2 +- .../ExtensionsDisableMonitoringSamples.java | 2 +- .../ExtensionsEnableAzureMonitorSamples.java | 2 +- .../ExtensionsEnableMonitoringSamples.java | 2 +- ...nsGetAzureAsyncOperationStatusSamples.java | 2 +- ...xtensionsGetAzureMonitorStatusSamples.java | 2 +- .../ExtensionsGetMonitoringStatusSamples.java | 2 +- .../generated/ExtensionsGetSamples.java | 2 +- ...LocationsCheckNameAvailabilitySamples.java | 2 +- ...nsGetAzureAsyncOperationStatusSamples.java | 2 +- .../LocationsGetCapabilitiesSamples.java | 2 +- .../LocationsListBillingSpecsSamples.java | 2 +- .../generated/LocationsListUsagesSamples.java | 2 +- ...nsValidateClusterCreateRequestSamples.java | 3 +- .../generated/OperationsListSamples.java | 2 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...dpointConnectionsListByClusterSamples.java | 2 +- .../PrivateLinkResourcesGetSamples.java | 2 +- ...vateLinkResourcesListByClusterSamples.java | 2 +- .../generated/ScriptActionsDeleteSamples.java | 2 +- ...tExecutionAsyncOperationStatusSamples.java | 2 +- ...criptActionsGetExecutionDetailSamples.java | 2 +- .../ScriptActionsListByClusterSamples.java | 2 +- ...tExecutionHistoryListByClusterSamples.java | 2 +- .../ScriptExecutionHistoryPromoteSamples.java | 2 +- ...achinesGetAsyncOperationStatusSamples.java | 2 +- .../VirtualMachinesListHostsSamples.java | 2 +- .../VirtualMachinesRestartHostsSamples.java | 2 +- .../generated/AaddsResourceDetailsTests.java | 48 ---- .../ApplicationGetEndpointTests.java | 39 --- .../ApplicationGetHttpsEndpointTests.java | 43 --- .../ApplicationsDeleteMockTests.java | 61 ---- .../generated/AutoscaleCapacityTests.java | 30 -- ...caleConfigurationUpdateParameterTests.java | 83 ------ .../generated/AutoscaleRecurrenceTests.java | 66 ----- .../generated/AutoscaleScheduleTests.java | 44 --- .../hdinsight/generated/AutoscaleTests.java | 88 ------ .../AutoscaleTimeAndCapacityTests.java | 36 --- .../AzureMonitorResponseInnerTests.java | 67 ----- ...ureMonitorSelectedConfigurationsTests.java | 55 ---- .../AzureMonitorTableConfigurationTests.java | 25 -- .../generated/BillingMetersTests.java | 32 --- .../generated/BillingResourcesTests.java | 74 ----- .../BillingResponseListResultInnerTests.java | 236 ---------------- .../CapabilitiesResultInnerTests.java | 137 --------- .../generated/ClientGroupInfoTests.java | 29 -- .../ClusterConfigurationsInnerTests.java | 50 ---- .../generated/ClusterDefinitionTests.java | 50 ---- .../generated/ClusterIdentityTests.java | 48 ---- .../ClusterMonitoringResponseInnerTests.java | 30 -- .../ClusterPatchParametersTests.java | 41 --- .../ClusterResizeParametersTests.java | 25 -- .../generated/ClustersDeleteMockTests.java | 61 ---- ...ClustersExecuteScriptActionsMockTests.java | 89 ------ .../generated/ClustersResizeMockTests.java | 70 ----- ...UpdateAutoScaleConfigurationMockTests.java | 106 ------- .../ComputeIsolationPropertiesTests.java | 30 -- ...onfigurationsGetWithResponseMockTests.java | 69 ----- ...nfigurationsListWithResponseMockTests.java | 70 ----- .../ConfigurationsUpdateMockTests.java | 81 ------ .../generated/ConnectivityEndpointTests.java | 42 --- .../generated/DataDisksGroupsTests.java | 27 -- .../hdinsight/generated/DimensionTests.java | 39 --- .../generated/DiskBillingMetersTests.java | 33 --- .../EncryptionInTransitPropertiesTests.java | 28 -- .../ExcludedServicesConfigTests.java | 30 -- .../ExecuteScriptActionParametersTests.java | 53 ---- .../generated/ExtensionsDeleteMockTests.java | 61 ---- ...xtensionsDisableAzureMonitorMockTests.java | 61 ---- .../ExtensionsDisableMonitoringMockTests.java | 61 ---- ...ureMonitorStatusWithResponseMockTests.java | 74 ----- ...MonitoringStatusWithResponseMockTests.java | 70 ----- .../ExtensionsGetWithResponseMockTests.java | 70 ----- .../generated/HardwareProfileTests.java | 24 -- .../IpConfigurationPropertiesTests.java | 41 --- .../generated/IpConfigurationTests.java | 44 --- .../generated/KafkaRestPropertiesTests.java | 58 ---- .../generated/LocalizedNameTests.java | 29 -- ...NameAvailabilityWithResponseMockTests.java | 73 ----- ...sGetCapabilitiesWithResponseMockTests.java | 75 ----- ...ListBillingSpecsWithResponseMockTests.java | 93 ------- ...ationsListUsagesWithResponseMockTests.java | 69 ----- .../generated/MetricSpecificationsTests.java | 98 ------- ...ailabilityCheckRequestParametersTests.java | 30 -- ...NameAvailabilityCheckResultInnerTests.java | 27 -- .../generated/NetworkPropertiesTests.java | 34 --- .../generated/OperationDisplayTests.java | 39 --- .../generated/OperationInnerTests.java | 215 -------------- .../generated/OperationListResultTests.java | 118 -------- .../generated/OperationPropertiesTests.java | 262 ------------------ .../generated/OperationsListMockTests.java | 235 ---------------- .../PrivateEndpointConnectionInnerTests.java | 44 --- ...vateEndpointConnectionListResultTests.java | 66 ----- ...vateEndpointConnectionPropertiesTests.java | 44 --- ...intConnectionsCreateOrUpdateMockTests.java | 82 ------ ...ateEndpointConnectionsDeleteMockTests.java | 63 ----- ...ntConnectionsGetWithResponseMockTests.java | 75 ----- ...ointConnectionsListByClusterMockTests.java | 75 ----- .../generated/PrivateEndpointTests.java | 24 -- ...ivateLinkConfigurationPropertiesTests.java | 69 ----- .../PrivateLinkConfigurationTests.java | 60 ---- .../PrivateLinkResourceInnerTests.java | 30 -- ...ivateLinkResourceListResultInnerTests.java | 38 --- .../PrivateLinkResourcePropertiesTests.java | 30 -- ...LinkResourcesGetWithResponseMockTests.java | 70 ----- ...cesListByClusterWithResponseMockTests.java | 70 ----- ...rivateLinkServiceConnectionStateTests.java | 36 --- .../generated/QuotaCapabilityTests.java | 48 ---- .../hdinsight/generated/QuotaInfoTests.java | 24 -- .../RegionalQuotaCapabilityTests.java | 36 --- .../generated/RegionsCapabilityTests.java | 26 -- .../hdinsight/generated/ResourceIdTests.java | 24 -- .../RuntimeScriptActionDetailInnerTests.java | 40 --- .../generated/RuntimeScriptActionTests.java | 40 --- ...ScriptActionExecutionHistoryListTests.java | 25 -- .../ScriptActionExecutionSummaryTests.java | 24 -- .../generated/ScriptActionTests.java | 31 --- ...iptActionsDeleteWithResponseMockTests.java | 61 ---- ...tExecutionDetailWithResponseMockTests.java | 74 ----- .../ScriptActionsListByClusterMockTests.java | 71 ----- .../generated/ScriptActionsListTests.java | 60 ---- ...cutionHistoriesListByClusterMockTests.java | 73 ----- ...HistoriesPromoteWithResponseMockTests.java | 63 ----- .../generated/ServiceSpecificationTests.java | 117 -------- .../generated/SshPublicKeyTests.java | 25 -- .../hdinsight/generated/UsageTests.java | 36 --- .../generated/UsagesListResultInnerTests.java | 46 --- .../generated/UserAssignedIdentityTests.java | 27 -- .../hdinsight/generated/VersionSpecTests.java | 52 ---- .../generated/VersionsCapabilityTests.java | 78 ------ .../VirtualMachinesRestartHostsMockTests.java | 65 ----- .../generated/VirtualNetworkProfileTests.java | 27 -- .../VmSizeCompatibilityFilterV2Tests.java | 57 ---- .../generated/VmSizePropertyTests.java | 57 ---- 169 files changed, 247 insertions(+), 6560 deletions(-) create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OutboundDependenciesManagedType.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AaddsResourceDetailsTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetEndpointTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetHttpsEndpointTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleCapacityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleConfigurationUpdateParameterTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleRecurrenceTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleScheduleTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTimeAndCapacityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorResponseInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorSelectedConfigurationsTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorTableConfigurationTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingMetersTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResourcesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResponseListResultInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/CapabilitiesResultInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClientGroupInfoTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterConfigurationsInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterDefinitionTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterIdentityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterMonitoringResponseInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterPatchParametersTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterResizeParametersTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeIsolationPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConnectivityEndpointTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DataDisksGroupsTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DimensionTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DiskBillingMetersTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/EncryptionInTransitPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExcludedServicesConfigTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExecuteScriptActionParametersTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/HardwareProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/KafkaRestPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocalizedNameTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListUsagesWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/MetricSpecificationsTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckRequestParametersTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckResultInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NetworkPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationDisplayTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationListResultTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationsListMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionListResultTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsCreateOrUpdateMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceListResultInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaCapabilityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaInfoTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionalQuotaCapabilityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionsCapabilityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ResourceIdTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionDetailInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionHistoryListTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionSummaryTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesListByClusterMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesPromoteWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ServiceSpecificationTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/SshPublicKeyTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsageTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsagesListResultInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionSpecTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionsCapabilityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualNetworkProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizeCompatibilityFilterV2Tests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizePropertyTests.java diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/CHANGELOG.md index 23276bf6445e..dde54298f340 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.2 (Unreleased) +## 1.0.0-beta.1 (2023-08-21) + +- Azure Resource Manager HDInsight client library for Java. This package contains Microsoft Azure SDK for HDInsight Management SDK. HDInsight Management Client. Package tag package-2023-08-preview. 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 71dda3c18aa0..ac3610ca0934 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-2023-04-preview. 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-2023-08-preview. 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.1.0-beta.1 + 1.1.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md b/sdk/hdinsight/azure-resourcemanager-hdinsight/SAMPLE.md index e9a9307ec69a..84fe327db120 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/preview/2023-04-15-preview/examples/CreateApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateApplication.json */ /** * Sample code: Create Application. @@ -153,7 +153,7 @@ public final class ApplicationsCreateSamples { /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteApplication.json */ /** * Sample code: Delete Application from HDInsight cluster. @@ -173,7 +173,7 @@ public final class ApplicationsDeleteSamples { /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationInProgress.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetApplicationInProgress.json */ /** * Sample code: Get application on HDInsight cluster creation in progress. @@ -186,7 +186,7 @@ public final class ApplicationsGetSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreated.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetApplicationCreated.json */ /** * Sample code: Get application on HDInsight cluster successfully created. @@ -206,7 +206,7 @@ public final class ApplicationsGetSamples { /** Samples for Applications GetAzureAsyncOperationStatus. */ public final class ApplicationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json */ /** * Sample code: Get the azure async operation status. @@ -228,7 +228,7 @@ public final class ApplicationsGetAzureAsyncOperationStatusSamples { /** Samples for Applications ListByCluster. */ public final class ApplicationsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllApplications.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetAllApplications.json */ /** * Sample code: Get All Applications for an HDInsight cluster. @@ -285,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/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopSshPassword.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH password. @@ -367,7 +367,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json */ /** * Sample code: Create Kafka cluster with Kafka Rest Proxy. @@ -464,7 +464,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json */ /** * Sample code: Create HDInsight cluster with Autoscale configuration. @@ -582,7 +582,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPublicKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopSshPublicKey.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH public key. @@ -671,7 +671,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json */ /** * Sample code: Create cluster with availability zones. @@ -785,7 +785,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopAdlsGen2.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopAdlsGen2.json */ /** * Sample code: Create Hadoop cluster with Azure Data Lake Storage Gen 2. @@ -867,7 +867,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSecureHadoop.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopSecureHadoop.json */ /** * Sample code: Create Secure Hadoop cluster. @@ -1003,7 +1003,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxSparkSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxSparkSshPassword.json */ /** * Sample code: Create Spark on Linux Cluster with SSH password. @@ -1075,7 +1075,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json */ /** * Sample code: Create cluster with network properties. @@ -1174,7 +1174,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithTLS12.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithTLS12.json */ /** * Sample code: Create cluster with TLS 1.2. @@ -1253,7 +1253,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json */ /** * Sample code: Create cluster with encryption at host. @@ -1332,7 +1332,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json */ /** * Sample code: Create cluster with encryption in transit. @@ -1412,7 +1412,7 @@ public final class ClustersCreateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json */ /** * Sample code: Create cluster with compute isolation properties. @@ -1495,6 +1495,7 @@ public final class ClustersCreateSamples { .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1514,7 +1515,7 @@ public final class ClustersCreateSamples { /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteLinuxHadoopCluster.json */ /** * Sample code: Delete Hadoop on Linux cluster. @@ -1537,7 +1538,7 @@ import java.util.Arrays; /** Samples for Clusters ExecuteScriptActions. */ public final class ClustersExecuteScriptActionsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PostExecuteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/PostExecuteScriptAction.json */ /** * Sample code: Execute script action on HDInsight cluster. @@ -1572,7 +1573,7 @@ public final class ClustersExecuteScriptActionsSamples { /** Samples for Clusters GetAzureAsyncOperationStatus. */ public final class ClustersGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json */ /** * Sample code: Get Async Operation Status of Creating Cluster. @@ -1595,7 +1596,7 @@ public final class ClustersGetAzureAsyncOperationStatusSamples { /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopCluster.json */ /** * Sample code: Get Hadoop on Linux cluster. @@ -1607,7 +1608,7 @@ public final class ClustersGetByResourceGroupSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxSparkCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxSparkCluster.json */ /** * Sample code: Get Spark on Linux cluster. @@ -1626,7 +1627,7 @@ public final class ClustersGetByResourceGroupSamples { /** Samples for Clusters GetGatewaySettings. */ public final class ClustersGetGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_GetGatewaySettings.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Clusters_GetGatewaySettings.json */ /** * Sample code: Get HTTP settings. @@ -1645,7 +1646,7 @@ public final class ClustersGetGatewaySettingsSamples { /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClusters.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopAllClusters.json */ /** * Sample code: Get All Hadoop on Linux clusters. @@ -1664,7 +1665,7 @@ public final class ClustersListSamples { /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json */ /** * Sample code: Get All Hadoop on Linux clusters in a resource group. @@ -1687,7 +1688,7 @@ 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/preview/2023-04-15-preview/examples/ResizeLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ResizeLinuxHadoopCluster.json */ /** * Sample code: Resize the worker nodes for a Hadoop on Linux cluster. @@ -1716,7 +1717,7 @@ import com.azure.resourcemanager.hdinsight.models.ClusterDiskEncryptionParameter /** Samples for Clusters RotateDiskEncryptionKey. */ public final class ClustersRotateDiskEncryptionKeySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json */ /** * Sample code: Rotate disk encryption key of the specified HDInsight cluster. @@ -1749,7 +1750,7 @@ import java.util.Map; /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PatchLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/PatchLinuxHadoopCluster.json */ /** * Sample code: Patch HDInsight Linux clusters. @@ -1765,6 +1766,7 @@ public final class ClustersUpdateSamples { resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -1794,7 +1796,7 @@ import java.util.Arrays; /** Samples for Clusters UpdateAutoScaleConfiguration. */ public final class ClustersUpdateAutoScaleConfigurationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the load based configuration for HDInsight cluster. @@ -1817,7 +1819,7 @@ public final class ClustersUpdateAutoScaleConfigurationSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableClusterAutoScale.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DisableClusterAutoScale.json */ /** * Sample code: Disable Autoscale for the HDInsight cluster. @@ -1837,7 +1839,7 @@ public final class ClustersUpdateAutoScaleConfigurationSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the schedule based configuration for HDInsight cluster. @@ -1881,7 +1883,7 @@ import com.azure.resourcemanager.hdinsight.models.UpdateGatewaySettingsParameter /** Samples for Clusters UpdateGatewaySettings. */ public final class ClustersUpdateGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json */ /** * Sample code: Enable HTTP connectivity. @@ -1905,7 +1907,7 @@ import com.azure.resourcemanager.hdinsight.models.UpdateClusterIdentityCertifica /** Samples for Clusters UpdateIdentityCertificate. */ public final class ClustersUpdateIdentityCertificateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json */ /** * Sample code: Update cluster identity certificate. @@ -1933,7 +1935,7 @@ public final class ClustersUpdateIdentityCertificateSamples { /** Samples for Configurations Get. */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_Get.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Configurations_Get.json */ /** * Sample code: Get Core site settings. @@ -1952,7 +1954,7 @@ public final class ConfigurationsGetSamples { /** Samples for Configurations List. */ public final class ConfigurationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_List.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Configurations_List.json */ /** * Sample code: Get all configuration information. @@ -1974,7 +1976,7 @@ import java.util.Map; /** Samples for Configurations Update. */ public final class ConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityEnable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ChangeHttpConnectivityEnable.json */ /** * Sample code: Enable HTTP connectivity. @@ -1999,7 +2001,7 @@ public final class ConfigurationsUpdateSamples { } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityDisable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ChangeHttpConnectivityDisable.json */ /** * Sample code: Disable HTTP connectivity. @@ -2017,6 +2019,7 @@ public final class ConfigurationsUpdateSamples { com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2038,7 +2041,7 @@ 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/preview/2023-04-15-preview/examples/CreateExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateExtension.json */ /** * Sample code: Create a monitoring extension on Hadoop Linux cluster. @@ -2067,7 +2070,7 @@ public final class ExtensionsCreateSamples { /** Samples for Extensions Delete. */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteExtension.json */ /** * Sample code: Delete an extension. @@ -2086,7 +2089,7 @@ public final class ExtensionsDeleteSamples { /** Samples for Extensions DisableAzureMonitor. */ public final class ExtensionsDisableAzureMonitorSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DisableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. @@ -2105,7 +2108,7 @@ public final class ExtensionsDisableAzureMonitorSamples { /** Samples for Extensions DisableMonitoring. */ public final class ExtensionsDisableMonitoringSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DisableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. @@ -2126,7 +2129,7 @@ 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/preview/2023-04-15-preview/examples/EnableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. @@ -2155,7 +2158,7 @@ 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/preview/2023-04-15-preview/examples/EnableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. @@ -2182,7 +2185,7 @@ public final class ExtensionsEnableMonitoringSamples { /** Samples for Extensions Get. */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetExtension.json */ /** * Sample code: Get an extension. @@ -2201,7 +2204,7 @@ public final class ExtensionsGetSamples { /** Samples for Extensions GetAzureAsyncOperationStatus. */ public final class ExtensionsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. @@ -2227,7 +2230,7 @@ public final class ExtensionsGetAzureAsyncOperationStatusSamples { /** Samples for Extensions GetAzureMonitorStatus. */ public final class ExtensionsGetAzureMonitorStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json */ /** * Sample code: Enable cluster monitoring. @@ -2246,7 +2249,7 @@ public final class ExtensionsGetAzureMonitorStatusSamples { /** Samples for Extensions GetMonitoringStatus. */ public final class ExtensionsGetMonitoringStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterMonitoringStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxClusterMonitoringStatus.json */ /** * Sample code: Enable cluster monitoring. @@ -2267,7 +2270,7 @@ import com.azure.resourcemanager.hdinsight.models.NameAvailabilityCheckRequestPa /** Samples for Locations CheckNameAvailability. */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json */ /** * Sample code: Get the subscription usages for specific location. @@ -2292,7 +2295,7 @@ public final class LocationsCheckNameAvailabilitySamples { /** Samples for Locations GetAzureAsyncOperationStatus. */ public final class LocationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. @@ -2314,7 +2317,7 @@ public final class LocationsGetAzureAsyncOperationStatusSamples { /** Samples for Locations GetCapabilities. */ public final class LocationsGetCapabilitiesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightCapabilities.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetHDInsightCapabilities.json */ /** * Sample code: Get the subscription capabilities for specific location. @@ -2334,7 +2337,7 @@ public final class LocationsGetCapabilitiesSamples { /** Samples for Locations ListBillingSpecs. */ public final class LocationsListBillingSpecsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ListBillingSpecs.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_ListBillingSpecs.json */ /** * Sample code: Get the subscription billingSpecs for the specified location. @@ -2354,7 +2357,7 @@ public final class LocationsListBillingSpecsSamples { /** Samples for Locations ListUsages. */ public final class LocationsListUsagesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightUsages.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetHDInsightUsages.json */ /** * Sample code: Get the subscription usages for specific location. @@ -2393,7 +2396,7 @@ import java.util.Map; /** Samples for Locations ValidateClusterCreateRequest. */ public final class LocationsValidateClusterCreateRequestSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json */ /** * Sample code: Get the subscription usages for specific location. @@ -2489,6 +2492,7 @@ public final class LocationsValidateClusterCreateRequestSamples { com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); @@ -2508,7 +2512,7 @@ public final class LocationsValidateClusterCreateRequestSamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ListHDInsightOperations.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ListHDInsightOperations.json */ /** * Sample code: Lists all of the available operations. @@ -2530,7 +2534,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/preview/2023-04-15-preview/examples/ApprovePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ApprovePrivateEndpointConnection.json */ /** * Sample code: Approve a private endpoint connection manually. @@ -2559,7 +2563,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeletePrivateEndpointConnection.json */ /** * Sample code: Delete specific private endpoint connection for a specific HDInsight cluster. @@ -2585,7 +2589,7 @@ public final class PrivateEndpointConnectionsDeleteSamples { /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetPrivateEndpointConnection.json */ /** * Sample code: Get specific private endpoint connection for a specific HDInsight cluster. @@ -2611,7 +2615,7 @@ public final class PrivateEndpointConnectionsGetSamples { /** Samples for PrivateEndpointConnections ListByCluster. */ public final class PrivateEndpointConnectionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json */ /** * Sample code: Get all private endpoint connections for a specific HDInsight cluster. @@ -2631,7 +2635,7 @@ public final class PrivateEndpointConnectionsListByClusterSamples { /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateLinkResource.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetPrivateLinkResource.json */ /** * Sample code: Get specific private link resource in a specific HDInsight cluster. @@ -2651,7 +2655,7 @@ public final class PrivateLinkResourcesGetSamples { /** Samples for PrivateLinkResources ListByCluster. */ public final class PrivateLinkResourcesListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json */ /** * Sample code: Get all private link resources in a specific HDInsight cluster. @@ -2671,7 +2675,7 @@ public final class PrivateLinkResourcesListByClusterSamples { /** Samples for ScriptActions Delete. */ public final class ScriptActionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteScriptAction.json */ /** * Sample code: Delete a script action on HDInsight cluster. @@ -2691,7 +2695,7 @@ public final class ScriptActionsDeleteSamples { /** Samples for ScriptActions GetExecutionAsyncOperationStatus. */ public final class ScriptActionsGetExecutionAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json */ /** * Sample code: Gets the async execution operation status. @@ -2714,7 +2718,7 @@ public final class ScriptActionsGetExecutionAsyncOperationStatusSamples { /** Samples for ScriptActions GetExecutionDetail. */ public final class ScriptActionsGetExecutionDetailSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptActionById.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetScriptActionById.json */ /** * Sample code: Get script execution history by script id. @@ -2736,7 +2740,7 @@ public final class ScriptActionsGetExecutionDetailSamples { /** Samples for ScriptActions ListByCluster. */ public final class ScriptActionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopScriptAction.json */ /** * Sample code: List all persisted script actions for the given cluster. @@ -2756,7 +2760,7 @@ public final class ScriptActionsListByClusterSamples { /** Samples for ScriptExecutionHistory ListByCluster. */ public final class ScriptExecutionHistoryListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionHistory.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetScriptExecutionHistory.json */ /** * Sample code: Get Script Execution History List. @@ -2775,7 +2779,7 @@ public final class ScriptExecutionHistoryListByClusterSamples { /** Samples for ScriptExecutionHistory Promote. */ public final class ScriptExecutionHistoryPromoteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PromoteLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/PromoteLinuxHadoopScriptAction.json */ /** * Sample code: Promote a script action on HDInsight cluster. @@ -2797,7 +2801,7 @@ public final class ScriptExecutionHistoryPromoteSamples { /** Samples for VirtualMachines GetAsyncOperationStatus. */ public final class VirtualMachinesGetAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetRestartHostsAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetRestartHostsAsyncOperationStatus.json */ /** * Sample code: Gets the async operation status of restarting host. @@ -2820,7 +2824,7 @@ public final class VirtualMachinesGetAsyncOperationStatusSamples { /** Samples for VirtualMachines ListHosts. */ public final class VirtualMachinesListHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterVirtualMachines.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetClusterVirtualMachines.json */ /** * Sample code: Get All hosts in the cluster. @@ -2841,7 +2845,7 @@ import java.util.Arrays; /** Samples for VirtualMachines RestartHosts. */ public final class VirtualMachinesRestartHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RestartVirtualMachinesOperation.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/RestartVirtualMachinesOperation.json */ /** * Sample code: Restarts the specified HDInsight cluster hosts. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml index a0e85a2132a4..2cc09df37443 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/pom.xml @@ -18,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-2023-04-preview. + 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-2023-08-preview. https://github.com/Azure/azure-sdk-for-java 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 cfcb68835b2b..4f344df558e7 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 @@ -243,7 +243,7 @@ public HDInsightManager authenticate(TokenCredential credential, AzureProfile pr .append("-") .append("com.azure.resourcemanager.hdinsight") .append("/") - .append("1.1.0-beta.1"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -435,8 +435,10 @@ public VirtualMachines virtualMachines() { } /** - * @return Wrapped service client HDInsightManagementClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. + * Gets wrapped service client HDInsightManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + * + * @return Wrapped service client HDInsightManagementClient. */ public HDInsightManagementClient serviceClient() { return this.clientObject; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.java index 968f5fa92051..74557f88a19e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/implementation/HDInsightManagementClientBuilder.java @@ -139,7 +139,7 @@ public HDInsightManagementClientImpl buildClient() { localSerializerAdapter, localDefaultPollInterval, localEnvironment, - subscriptionId, + this.subscriptionId, localEndpoint); return client; } 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 b57d509162a6..141903ee8584 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 @@ -277,7 +277,7 @@ public VirtualMachinesClient getVirtualMachines() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-04-15-preview"; + this.apiVersion = "2023-08-15-preview"; this.applications = new ApplicationsClientImpl(this); this.clusters = new ClustersClientImpl(this); this.configurations = new ConfigurationsClientImpl(this); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java index 98e40cdd17c3..ee72069c6b90 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/NetworkProperties.java @@ -10,6 +10,14 @@ /** The network properties. */ @Fluent public final class NetworkProperties { + /* + * A value to describe how the outbound dependencies of a HDInsight cluster are managed. 'Managed' means that the + * outbound dependencies are managed by the HDInsight service. 'External' means that the outbound dependencies are + * managed by a customer specific solution. + */ + @JsonProperty(value = "outboundDependenciesManagedType") + private OutboundDependenciesManagedType outboundDependenciesManagedType; + /* * The direction for the resource provider connection. */ @@ -26,6 +34,31 @@ public final class NetworkProperties { public NetworkProperties() { } + /** + * Get the outboundDependenciesManagedType property: A value to describe how the outbound dependencies of a + * HDInsight cluster are managed. 'Managed' means that the outbound dependencies are managed by the HDInsight + * service. 'External' means that the outbound dependencies are managed by a customer specific solution. + * + * @return the outboundDependenciesManagedType value. + */ + public OutboundDependenciesManagedType outboundDependenciesManagedType() { + return this.outboundDependenciesManagedType; + } + + /** + * Set the outboundDependenciesManagedType property: A value to describe how the outbound dependencies of a + * HDInsight cluster are managed. 'Managed' means that the outbound dependencies are managed by the HDInsight + * service. 'External' means that the outbound dependencies are managed by a customer specific solution. + * + * @param outboundDependenciesManagedType the outboundDependenciesManagedType value to set. + * @return the NetworkProperties object itself. + */ + public NetworkProperties withOutboundDependenciesManagedType( + OutboundDependenciesManagedType outboundDependenciesManagedType) { + this.outboundDependenciesManagedType = outboundDependenciesManagedType; + return this; + } + /** * Get the resourceProviderConnection property: The direction for the resource provider connection. * diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OutboundDependenciesManagedType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OutboundDependenciesManagedType.java new file mode 100644 index 000000000000..839bd695d1a4 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/OutboundDependenciesManagedType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * A value to describe how the outbound dependencies of a HDInsight cluster are managed. 'Managed' means that the + * outbound dependencies are managed by the HDInsight service. 'External' means that the outbound dependencies are + * managed by a customer specific solution. + */ +public final class OutboundDependenciesManagedType extends ExpandableStringEnum { + /** Static value Managed for OutboundDependenciesManagedType. */ + public static final OutboundDependenciesManagedType MANAGED = fromString("Managed"); + + /** Static value External for OutboundDependenciesManagedType. */ + public static final OutboundDependenciesManagedType EXTERNAL = fromString("External"); + + /** + * Creates a new instance of OutboundDependenciesManagedType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OutboundDependenciesManagedType() { + } + + /** + * Creates or finds a OutboundDependenciesManagedType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OutboundDependenciesManagedType. + */ + @JsonCreator + public static OutboundDependenciesManagedType fromString(String name) { + return fromString(name, OutboundDependenciesManagedType.class); + } + + /** + * Gets known OutboundDependenciesManagedType values. + * + * @return known OutboundDependenciesManagedType values. + */ + public static Collection values() { + return values(OutboundDependenciesManagedType.class); + } +} 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 e37e056fe906..50f6816522f2 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/preview/2023-04-15-preview/examples/CreateApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-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 59cb7a493b1f..bb03b0b30ebd 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 @@ -7,7 +7,7 @@ /** Samples for Applications Delete. */ public final class ApplicationsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteApplication.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteApplication.json */ /** * Sample code: Delete Application from HDInsight cluster. 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 e8ddf0a2a21b..11d443074ffa 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 @@ -7,7 +7,7 @@ /** Samples for Applications GetAzureAsyncOperationStatus. */ public final class ApplicationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetApplicationCreationAsyncOperationStatus.json */ /** * Sample code: Get the azure async operation status. 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 ca82448cf0ee..39fd9135e15c 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 @@ -7,7 +7,7 @@ /** Samples for Applications Get. */ public final class ApplicationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationInProgress.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetApplicationInProgress.json */ /** * Sample code: Get application on HDInsight cluster creation in progress. @@ -20,7 +20,7 @@ public static void getApplicationOnHDInsightClusterCreationInProgress( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetApplicationCreated.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetApplicationCreated.json */ /** * Sample code: Get application on HDInsight cluster successfully created. 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 db1db4d5fe78..0dff0b4e4bfe 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 @@ -7,7 +7,7 @@ /** Samples for Applications ListByCluster. */ public final class ApplicationsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllApplications.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetAllApplications.json */ /** * Sample code: Get All Applications for an HDInsight cluster. 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 76ea95d75a65..2433ce6c143f 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/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopSshPassword.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH password. @@ -126,7 +126,7 @@ public static void createHadoopOnLinuxClusterWithSSHPassword( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateKafkaClusterWithKafkaRestProxy.json */ /** * Sample code: Create Kafka cluster with Kafka Rest Proxy. @@ -223,7 +223,7 @@ public static void createKafkaClusterWithKafkaRestProxy( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithAutoscaleConfig.json */ /** * Sample code: Create HDInsight cluster with Autoscale configuration. @@ -341,7 +341,7 @@ public static void createHDInsightClusterWithAutoscaleConfiguration( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSshPublicKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopSshPublicKey.json */ /** * Sample code: Create Hadoop on Linux cluster with SSH public key. @@ -430,7 +430,7 @@ public static void createHadoopOnLinuxClusterWithSSHPublicKey( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithAvailabilityZones.json */ /** * Sample code: Create cluster with availability zones. @@ -544,7 +544,7 @@ public static void createClusterWithAvailabilityZones(com.azure.resourcemanager. } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopAdlsGen2.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopAdlsGen2.json */ /** * Sample code: Create Hadoop cluster with Azure Data Lake Storage Gen 2. @@ -626,7 +626,7 @@ public static void createHadoopClusterWithAzureDataLakeStorageGen2( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxHadoopSecureHadoop.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxHadoopSecureHadoop.json */ /** * Sample code: Create Secure Hadoop cluster. @@ -762,7 +762,7 @@ public static void createSecureHadoopCluster(com.azure.resourcemanager.hdinsight } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateLinuxSparkSshPassword.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateLinuxSparkSshPassword.json */ /** * Sample code: Create Spark on Linux Cluster with SSH password. @@ -834,7 +834,7 @@ public static void createSparkOnLinuxClusterWithSSHPassword( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithCustomNetworkProperties.json */ /** * Sample code: Create cluster with network properties. @@ -933,7 +933,7 @@ public static void createClusterWithNetworkProperties(com.azure.resourcemanager. } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithTLS12.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithTLS12.json */ /** * Sample code: Create cluster with TLS 1.2. @@ -1012,7 +1012,7 @@ public static void createClusterWithTLS12(com.azure.resourcemanager.hdinsight.HD } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithEncryptionAtHost.json */ /** * Sample code: Create cluster with encryption at host. @@ -1091,7 +1091,7 @@ public static void createClusterWithEncryptionAtHost(com.azure.resourcemanager.h } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithEncryptionInTransit.json */ /** * Sample code: Create cluster with encryption in transit. @@ -1171,7 +1171,7 @@ public static void createClusterWithEncryptionInTransit( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateHDInsightClusterWithComputeIsolationProperties.json */ /** * Sample code: Create cluster with compute isolation properties. @@ -1254,6 +1254,7 @@ public static void createClusterWithComputeIsolationProperties( .create(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 5161b14227b5..cffa57a8a331 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 @@ -7,7 +7,7 @@ /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteLinuxHadoopCluster.json */ /** * Sample code: Delete Hadoop on Linux cluster. 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 53f1fe6c3da3..d9989b94576c 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 @@ -11,7 +11,7 @@ /** Samples for Clusters ExecuteScriptActions. */ public final class ClustersExecuteScriptActionsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PostExecuteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/PostExecuteScriptAction.json */ /** * Sample code: Execute script action on HDInsight cluster. 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 b367eeb1a65b..d0fd9fa0577f 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 @@ -7,7 +7,7 @@ /** Samples for Clusters GetAzureAsyncOperationStatus. */ public final class ClustersGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetClusterCreatingAsyncOperationStatus.json */ /** * Sample code: Get Async Operation Status of Creating Cluster. 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 475a85acf595..902eff0f81f1 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 @@ -7,7 +7,7 @@ /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopCluster.json */ /** * Sample code: Get Hadoop on Linux cluster. @@ -19,7 +19,7 @@ public static void getHadoopOnLinuxCluster(com.azure.resourcemanager.hdinsight.H } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxSparkCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxSparkCluster.json */ /** * Sample code: Get Spark on Linux cluster. 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 fc4336f72fd1..20364476bf39 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 @@ -7,7 +7,7 @@ /** Samples for Clusters GetGatewaySettings. */ public final class ClustersGetGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_GetGatewaySettings.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Clusters_GetGatewaySettings.json */ /** * Sample code: Get HTTP settings. 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 6b08696727b8..67b55538d129 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 @@ -7,7 +7,7 @@ /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopAllClustersInResourceGroup.json */ /** * Sample code: Get All Hadoop on Linux clusters in a resource group. 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 f7fa0e7e82b3..60d3b8cf52e8 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 @@ -7,7 +7,7 @@ /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopAllClusters.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopAllClusters.json */ /** * Sample code: Get All Hadoop on Linux clusters. 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 765d15b0e572..6da8176bed83 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 @@ -10,7 +10,7 @@ /** Samples for Clusters Resize. */ public final class ClustersResizeSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ResizeLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ResizeLinuxHadoopCluster.json */ /** * Sample code: Resize the worker nodes for a Hadoop on Linux cluster. 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 1e555a4d4be8..db0e060dbe77 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 @@ -9,7 +9,7 @@ /** Samples for Clusters RotateDiskEncryptionKey. */ public final class ClustersRotateDiskEncryptionKeySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/RotateLinuxHadoopClusterDiskEncryptionKey.json */ /** * Sample code: Rotate disk encryption key of the specified HDInsight cluster. 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 02b43279658f..86726ebd0f3e 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 @@ -17,7 +17,7 @@ /** Samples for Clusters UpdateAutoScaleConfiguration. */ public final class ClustersUpdateAutoScaleConfigurationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableOrUpdateAutoScaleWithLoadBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the load based configuration for HDInsight cluster. @@ -40,7 +40,7 @@ public static void enableOrUpdateAutoscaleWithTheLoadBasedConfigurationForHDInsi } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableClusterAutoScale.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DisableClusterAutoScale.json */ /** * Sample code: Disable Autoscale for the HDInsight cluster. @@ -60,7 +60,7 @@ public static void disableAutoscaleForTheHDInsightCluster( } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableOrUpdateAutoScaleWithScheduleBasedConfiguration.json */ /** * Sample code: Enable or Update Autoscale with the schedule based configuration for HDInsight cluster. 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 d15553aca699..6eaa5a1c2395 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 @@ -9,7 +9,7 @@ /** Samples for Clusters UpdateGatewaySettings. */ public final class ClustersUpdateGatewaySettingsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Clusters_UpdateGatewaySettings_Enable.json */ /** * Sample code: Enable HTTP connectivity. 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 fd96ad2a75ac..74f16660823c 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 @@ -9,7 +9,7 @@ /** Samples for Clusters UpdateIdentityCertificate. */ public final class ClustersUpdateIdentityCertificateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Clusters_UpdateClusterIdentityCertificate.json */ /** * Sample code: Update cluster identity certificate. 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 d46a3f7c5284..69a9166d4057 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 @@ -11,7 +11,7 @@ /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PatchLinuxHadoopCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/PatchLinuxHadoopCluster.json */ /** * Sample code: Patch HDInsight Linux clusters. @@ -27,6 +27,7 @@ public static void patchHDInsightLinuxClusters(com.azure.resourcemanager.hdinsig resource.update().withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 1eb73e7b7f66..44814f263803 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 @@ -7,7 +7,7 @@ /** Samples for Configurations Get. */ public final class ConfigurationsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_Get.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Configurations_Get.json */ /** * Sample code: Get Core site settings. 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 c5f1c072971d..fee068e86fbe 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 @@ -7,7 +7,7 @@ /** Samples for Configurations List. */ public final class ConfigurationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Configurations_List.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Configurations_List.json */ /** * Sample code: Get all configuration information. 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 209dbcc949bb..eb879970bbf5 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 @@ -10,7 +10,7 @@ /** Samples for Configurations Update. */ public final class ConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityEnable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ChangeHttpConnectivityEnable.json */ /** * Sample code: Enable HTTP connectivity. @@ -35,7 +35,7 @@ public static void enableHTTPConnectivity(com.azure.resourcemanager.hdinsight.HD } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ChangeHttpConnectivityDisable.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ChangeHttpConnectivityDisable.json */ /** * Sample code: Disable HTTP connectivity. @@ -53,6 +53,7 @@ public static void disableHTTPConnectivity(com.azure.resourcemanager.hdinsight.H com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 a2e3c3da14d7..c975fbe6079e 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 @@ -9,7 +9,7 @@ /** Samples for Extensions Create. */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/CreateExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/CreateExtension.json */ /** * Sample code: Create a monitoring extension on Hadoop Linux cluster. 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 2b4a03ae6413..0b67bbd31aee 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 @@ -7,7 +7,7 @@ /** Samples for Extensions Delete. */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteExtension.json */ /** * Sample code: Delete an extension. 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 c3c3904ab9b3..8c75a88103e4 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 @@ -7,7 +7,7 @@ /** Samples for Extensions DisableAzureMonitor. */ public final class ExtensionsDisableAzureMonitorSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DisableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. 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 f859ba3bbd94..7a90a185bee6 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 @@ -7,7 +7,7 @@ /** Samples for Extensions DisableMonitoring. */ public final class ExtensionsDisableMonitoringSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DisableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DisableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. 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 1fdb434e31bd..424f44f079c7 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 @@ -9,7 +9,7 @@ /** Samples for Extensions EnableAzureMonitor. */ public final class ExtensionsEnableAzureMonitorSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterAzureMonitor.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableLinuxClusterAzureMonitor.json */ /** * Sample code: Enable cluster monitoring. 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 67a8fec568dc..0b3ae5a490ce 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 @@ -9,7 +9,7 @@ /** Samples for Extensions EnableMonitoring. */ public final class ExtensionsEnableMonitoringSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/EnableLinuxClusterMonitoring.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/EnableLinuxClusterMonitoring.json */ /** * Sample code: Enable cluster monitoring. 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 01a89c737218..05801dbbc6c6 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 @@ -7,7 +7,7 @@ /** Samples for Extensions GetAzureAsyncOperationStatus. */ public final class ExtensionsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetExtensionCreationAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. 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 ba9b3b90585e..0a98bafa8310 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 @@ -7,7 +7,7 @@ /** Samples for Extensions GetAzureMonitorStatus. */ public final class ExtensionsGetAzureMonitorStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxClusterAzureMonitorStatus.json */ /** * Sample code: Enable cluster monitoring. 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 1c744d62a88a..a34831fa0b06 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 @@ -7,7 +7,7 @@ /** Samples for Extensions GetMonitoringStatus. */ public final class ExtensionsGetMonitoringStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxClusterMonitoringStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxClusterMonitoringStatus.json */ /** * Sample code: Enable cluster monitoring. 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 e3f553cf237a..2bca5f498987 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 @@ -7,7 +7,7 @@ /** Samples for Extensions Get. */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetExtension.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetExtension.json */ /** * Sample code: Get an extension. 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 120ba5044c1b..729d6020f8c7 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 @@ -9,7 +9,7 @@ /** Samples for Locations CheckNameAvailability. */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_CheckClusterNameAvailability.json */ /** * Sample code: Get the subscription usages for specific location. 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 36ae85a81a2d..4abdeebc10a0 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 @@ -7,7 +7,7 @@ /** Samples for Locations GetAzureAsyncOperationStatus. */ public final class LocationsGetAzureAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_GetAsyncOperationStatus.json */ /** * Sample code: Gets the azure async operation status. 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 17eb2e6aa5a6..676e2b3f10f8 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 @@ -7,7 +7,7 @@ /** Samples for Locations GetCapabilities. */ public final class LocationsGetCapabilitiesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightCapabilities.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetHDInsightCapabilities.json */ /** * Sample code: Get the subscription capabilities for specific location. 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 6a1b411bd9ff..05fdfe0a266b 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 @@ -7,7 +7,7 @@ /** Samples for Locations ListBillingSpecs. */ public final class LocationsListBillingSpecsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ListBillingSpecs.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_ListBillingSpecs.json */ /** * Sample code: Get the subscription billingSpecs for the specified location. 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 055d17f9918e..3b28c0cb74e5 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 @@ -7,7 +7,7 @@ /** Samples for Locations ListUsages. */ public final class LocationsListUsagesSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetHDInsightUsages.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetHDInsightUsages.json */ /** * Sample code: Get the subscription usages for specific location. 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 658fad0e04c6..62484a2306f1 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 @@ -26,7 +26,7 @@ /** Samples for Locations ValidateClusterCreateRequest. */ public final class LocationsValidateClusterCreateRequestSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/HDI_Locations_ValidateClusterCreateRequest.json */ /** * Sample code: Get the subscription usages for specific location. @@ -122,6 +122,7 @@ public static void getTheSubscriptionUsagesForSpecificLocation( com.azure.core.util.Context.NONE); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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 ba2c10cdc474..26614702bb2b 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 @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/ListHDInsightOperations.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/ListHDInsightOperations.json */ /** * Sample code: Lists all of the available operations. 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 7b9f9718161c..011cf62d8637 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/preview/2023-04-15-preview/examples/ApprovePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-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 3665e0dc1e8a..251761efc9fe 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 @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeletePrivateEndpointConnection.json */ /** * Sample code: Delete specific private endpoint connection for a specific HDInsight cluster. 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 98b9d13fc468..a874ad0b6b72 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 @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetPrivateEndpointConnection.json */ /** * Sample code: Get specific private endpoint connection for a specific HDInsight cluster. 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 d4f27c9b1da7..652436669023 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 @@ -7,7 +7,7 @@ /** Samples for PrivateEndpointConnections ListByCluster. */ public final class PrivateEndpointConnectionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetAllPrivateEndpointConnectionsInCluster.json */ /** * Sample code: Get all private endpoint connections for a specific HDInsight cluster. 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 e2217de1979e..3fd1ba38b468 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 @@ -7,7 +7,7 @@ /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetPrivateLinkResource.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetPrivateLinkResource.json */ /** * Sample code: Get specific private link resource in a specific HDInsight cluster. 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 5d8f407f906f..3dccc1090860 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 @@ -7,7 +7,7 @@ /** Samples for PrivateLinkResources ListByCluster. */ public final class PrivateLinkResourcesListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetAllPrivateLinkResourcesInCluster.json */ /** * Sample code: Get all private link resources in a specific HDInsight cluster. 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 8d2206a09e5f..9d0204d126be 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 @@ -7,7 +7,7 @@ /** Samples for ScriptActions Delete. */ public final class ScriptActionsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/DeleteScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/DeleteScriptAction.json */ /** * Sample code: Delete a script action on HDInsight cluster. 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 0ff7e9e0accf..7bc1657582ac 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 @@ -7,7 +7,7 @@ /** Samples for ScriptActions GetExecutionAsyncOperationStatus. */ public final class ScriptActionsGetExecutionAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetScriptExecutionAsyncOperationStatus.json */ /** * Sample code: Gets the async execution operation status. 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 2ad074543307..2f4ccf1eaf15 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 @@ -7,7 +7,7 @@ /** Samples for ScriptActions GetExecutionDetail. */ public final class ScriptActionsGetExecutionDetailSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptActionById.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetScriptActionById.json */ /** * Sample code: Get script execution history by script id. 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 532ddce8003c..a1d8f2374750 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 @@ -7,7 +7,7 @@ /** Samples for ScriptActions ListByCluster. */ public final class ScriptActionsListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetLinuxHadoopScriptAction.json */ /** * Sample code: List all persisted script actions for the given cluster. 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 9405ef778fb1..0965c9f662a2 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 @@ -7,7 +7,7 @@ /** Samples for ScriptExecutionHistory ListByCluster. */ public final class ScriptExecutionHistoryListByClusterSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetScriptExecutionHistory.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetScriptExecutionHistory.json */ /** * Sample code: Get Script Execution History List. 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 3179809dc171..16157e17b380 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 @@ -7,7 +7,7 @@ /** Samples for ScriptExecutionHistory Promote. */ public final class ScriptExecutionHistoryPromoteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/PromoteLinuxHadoopScriptAction.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/PromoteLinuxHadoopScriptAction.json */ /** * Sample code: Promote a script action on HDInsight cluster. 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 82a7124da988..43bcfb9b13d3 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 @@ -7,7 +7,7 @@ /** Samples for VirtualMachines GetAsyncOperationStatus. */ public final class VirtualMachinesGetAsyncOperationStatusSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetRestartHostsAsyncOperationStatus.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetRestartHostsAsyncOperationStatus.json */ /** * Sample code: Gets the async operation status of restarting host. 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 2ff0d351a9bf..65354a453a04 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 @@ -7,7 +7,7 @@ /** Samples for VirtualMachines ListHosts. */ public final class VirtualMachinesListHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/GetClusterVirtualMachines.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/GetClusterVirtualMachines.json */ /** * Sample code: Get All hosts in the cluster. 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 4f9e1e38e0c4..c37ee047e1f1 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 @@ -9,7 +9,7 @@ /** Samples for VirtualMachines RestartHosts. */ public final class VirtualMachinesRestartHostsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-04-15-preview/examples/RestartVirtualMachinesOperation.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/preview/2023-08-15-preview/examples/RestartVirtualMachinesOperation.json */ /** * Sample code: Restarts the specified HDInsight cluster hosts. 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 3d0777e4b243..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AaddsResourceDetailsTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.AaddsResourceDetails; -import org.junit.jupiter.api.Assertions; - -public final class AaddsResourceDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AaddsResourceDetails model = - BinaryData - .fromString( - "{\"domainName\":\"gzslesjcbhernnti\",\"initialSyncComplete\":false,\"ldapsEnabled\":false,\"ldapsPublicCertificateInBase64\":\"bquwrbehw\",\"resourceId\":\"o\",\"subnetId\":\"uffkmrqemvvh\",\"tenantId\":\"tdrjfutacoebj\"}") - .toObject(AaddsResourceDetails.class); - Assertions.assertEquals("gzslesjcbhernnti", model.domainName()); - Assertions.assertEquals(false, model.initialSyncComplete()); - Assertions.assertEquals(false, model.ldapsEnabled()); - Assertions.assertEquals("bquwrbehw", model.ldapsPublicCertificateInBase64()); - Assertions.assertEquals("o", model.resourceId()); - Assertions.assertEquals("uffkmrqemvvh", model.subnetId()); - Assertions.assertEquals("tdrjfutacoebj", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AaddsResourceDetails model = - new AaddsResourceDetails() - .withDomainName("gzslesjcbhernnti") - .withInitialSyncComplete(false) - .withLdapsEnabled(false) - .withLdapsPublicCertificateInBase64("bquwrbehw") - .withResourceId("o") - .withSubnetId("uffkmrqemvvh") - .withTenantId("tdrjfutacoebj"); - model = BinaryData.fromObject(model).toObject(AaddsResourceDetails.class); - Assertions.assertEquals("gzslesjcbhernnti", model.domainName()); - Assertions.assertEquals(false, model.initialSyncComplete()); - Assertions.assertEquals(false, model.ldapsEnabled()); - Assertions.assertEquals("bquwrbehw", model.ldapsPublicCertificateInBase64()); - Assertions.assertEquals("o", model.resourceId()); - Assertions.assertEquals("uffkmrqemvvh", model.subnetId()); - Assertions.assertEquals("tdrjfutacoebj", 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 58e993be95cc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetEndpointTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ApplicationGetEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGetEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationGetEndpoint model = - BinaryData - .fromString( - "{\"location\":\"iith\",\"destinationPort\":63986979,\"publicPort\":511745945,\"privateIPAddress\":\"v\"}") - .toObject(ApplicationGetEndpoint.class); - Assertions.assertEquals("iith", model.location()); - Assertions.assertEquals(63986979, model.destinationPort()); - Assertions.assertEquals(511745945, model.publicPort()); - Assertions.assertEquals("v", model.privateIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationGetEndpoint model = - new ApplicationGetEndpoint() - .withLocation("iith") - .withDestinationPort(63986979) - .withPublicPort(511745945) - .withPrivateIpAddress("v"); - model = BinaryData.fromObject(model).toObject(ApplicationGetEndpoint.class); - Assertions.assertEquals("iith", model.location()); - Assertions.assertEquals(63986979, model.destinationPort()); - Assertions.assertEquals(511745945, model.publicPort()); - Assertions.assertEquals("v", 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 39730ce641fc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationGetHttpsEndpointTests.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.ApplicationGetHttpsEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ApplicationGetHttpsEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ApplicationGetHttpsEndpoint model = - BinaryData - .fromString( - "{\"accessModes\":[\"iwkuofos\",\"ghsauuimjmvxied\",\"ugidyjrr\",\"byao\"],\"location\":\"e\",\"destinationPort\":981492544,\"publicPort\":635298433,\"privateIPAddress\":\"clhocohsl\",\"subDomainSuffix\":\"vleggzfbuhfmvfax\",\"disableGatewayAuth\":true}") - .toObject(ApplicationGetHttpsEndpoint.class); - Assertions.assertEquals("iwkuofos", model.accessModes().get(0)); - Assertions.assertEquals(981492544, model.destinationPort()); - Assertions.assertEquals("clhocohsl", model.privateIpAddress()); - Assertions.assertEquals("vleggzfbuhfmvfax", model.subDomainSuffix()); - Assertions.assertEquals(true, model.disableGatewayAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplicationGetHttpsEndpoint model = - new ApplicationGetHttpsEndpoint() - .withAccessModes(Arrays.asList("iwkuofos", "ghsauuimjmvxied", "ugidyjrr", "byao")) - .withDestinationPort(981492544) - .withPrivateIpAddress("clhocohsl") - .withSubDomainSuffix("vleggzfbuhfmvfax") - .withDisableGatewayAuth(true); - model = BinaryData.fromObject(model).toObject(ApplicationGetHttpsEndpoint.class); - Assertions.assertEquals("iwkuofos", model.accessModes().get(0)); - Assertions.assertEquals(981492544, model.destinationPort()); - Assertions.assertEquals("clhocohsl", model.privateIpAddress()); - Assertions.assertEquals("vleggzfbuhfmvfax", model.subDomainSuffix()); - Assertions.assertEquals(true, model.disableGatewayAuth()); - } -} 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 65ef265b63da..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ApplicationsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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("baxk", "eytu", "lbfjkwr", com.azure.core.util.Context.NONE); - } -} 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 8049919ba95a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleCapacityTests.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.AutoscaleCapacity; -import org.junit.jupiter.api.Assertions; - -public final class AutoscaleCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleCapacity model = - BinaryData - .fromString("{\"minInstanceCount\":358956997,\"maxInstanceCount\":1965159297}") - .toObject(AutoscaleCapacity.class); - Assertions.assertEquals(358956997, model.minInstanceCount()); - Assertions.assertEquals(1965159297, model.maxInstanceCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleCapacity model = - new AutoscaleCapacity().withMinInstanceCount(358956997).withMaxInstanceCount(1965159297); - model = BinaryData.fromObject(model).toObject(AutoscaleCapacity.class); - Assertions.assertEquals(358956997, model.minInstanceCount()); - Assertions.assertEquals(1965159297, 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 0e865fddf863..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleConfigurationUpdateParameterTests.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.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.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; - -public final class AutoscaleConfigurationUpdateParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleConfigurationUpdateParameter model = - BinaryData - .fromString( - "{\"autoscale\":{\"capacity\":{\"minInstanceCount\":745673634,\"maxInstanceCount\":1373872192},\"recurrence\":{\"timeZone\":\"wdsjnkalju\",\"schedule\":[{\"days\":[\"Sunday\"],\"timeAndCapacity\":{\"time\":\"fgdkzzew\",\"minInstanceCount\":2137392775,\"maxInstanceCount\":1769895546}},{\"days\":[\"Saturday\",\"Monday\",\"Tuesday\"],\"timeAndCapacity\":{\"time\":\"n\",\"minInstanceCount\":831905679,\"maxInstanceCount\":1159921712}}]}}}") - .toObject(AutoscaleConfigurationUpdateParameter.class); - Assertions.assertEquals(745673634, model.autoscale().capacity().minInstanceCount()); - Assertions.assertEquals(1373872192, model.autoscale().capacity().maxInstanceCount()); - Assertions.assertEquals("wdsjnkalju", model.autoscale().recurrence().timeZone()); - Assertions.assertEquals(DaysOfWeek.SUNDAY, model.autoscale().recurrence().schedule().get(0).days().get(0)); - Assertions.assertEquals("fgdkzzew", model.autoscale().recurrence().schedule().get(0).timeAndCapacity().time()); - Assertions - .assertEquals( - 2137392775, model.autoscale().recurrence().schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions - .assertEquals( - 1769895546, model.autoscale().recurrence().schedule().get(0).timeAndCapacity().maxInstanceCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleConfigurationUpdateParameter model = - new AutoscaleConfigurationUpdateParameter() - .withAutoscale( - new Autoscale() - .withCapacity( - new AutoscaleCapacity().withMinInstanceCount(745673634).withMaxInstanceCount(1373872192)) - .withRecurrence( - new AutoscaleRecurrence() - .withTimeZone("wdsjnkalju") - .withSchedule( - Arrays - .asList( - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.SUNDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("fgdkzzew") - .withMinInstanceCount(2137392775) - .withMaxInstanceCount(1769895546)), - new AutoscaleSchedule() - .withDays( - Arrays - .asList( - DaysOfWeek.SATURDAY, DaysOfWeek.MONDAY, DaysOfWeek.TUESDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("n") - .withMinInstanceCount(831905679) - .withMaxInstanceCount(1159921712)))))); - model = BinaryData.fromObject(model).toObject(AutoscaleConfigurationUpdateParameter.class); - Assertions.assertEquals(745673634, model.autoscale().capacity().minInstanceCount()); - Assertions.assertEquals(1373872192, model.autoscale().capacity().maxInstanceCount()); - Assertions.assertEquals("wdsjnkalju", model.autoscale().recurrence().timeZone()); - Assertions.assertEquals(DaysOfWeek.SUNDAY, model.autoscale().recurrence().schedule().get(0).days().get(0)); - Assertions.assertEquals("fgdkzzew", model.autoscale().recurrence().schedule().get(0).timeAndCapacity().time()); - Assertions - .assertEquals( - 2137392775, model.autoscale().recurrence().schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions - .assertEquals( - 1769895546, model.autoscale().recurrence().schedule().get(0).timeAndCapacity().maxInstanceCount()); - } -} 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 fd491bbf3226..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleRecurrenceTests.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.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; - -public final class AutoscaleRecurrenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleRecurrence model = - BinaryData - .fromString( - "{\"timeZone\":\"enevfyexfwhybci\",\"schedule\":[{\"days\":[\"Saturday\"],\"timeAndCapacity\":{\"time\":\"tynnaamdectehfi\",\"minInstanceCount\":494775669,\"maxInstanceCount\":478088047}},{\"days\":[\"Tuesday\",\"Thursday\"],\"timeAndCapacity\":{\"time\":\"rkgqhcjrefo\",\"minInstanceCount\":34828913,\"maxInstanceCount\":668805249}},{\"days\":[\"Friday\",\"Wednesday\"],\"timeAndCapacity\":{\"time\":\"xyqj\",\"minInstanceCount\":1744021341,\"maxInstanceCount\":203599917}}]}") - .toObject(AutoscaleRecurrence.class); - Assertions.assertEquals("enevfyexfwhybci", model.timeZone()); - Assertions.assertEquals(DaysOfWeek.SATURDAY, model.schedule().get(0).days().get(0)); - Assertions.assertEquals("tynnaamdectehfi", model.schedule().get(0).timeAndCapacity().time()); - Assertions.assertEquals(494775669, model.schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(478088047, model.schedule().get(0).timeAndCapacity().maxInstanceCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleRecurrence model = - new AutoscaleRecurrence() - .withTimeZone("enevfyexfwhybci") - .withSchedule( - Arrays - .asList( - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.SATURDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("tynnaamdectehfi") - .withMinInstanceCount(494775669) - .withMaxInstanceCount(478088047)), - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.TUESDAY, DaysOfWeek.THURSDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("rkgqhcjrefo") - .withMinInstanceCount(34828913) - .withMaxInstanceCount(668805249)), - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.FRIDAY, DaysOfWeek.WEDNESDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("xyqj") - .withMinInstanceCount(1744021341) - .withMaxInstanceCount(203599917)))); - model = BinaryData.fromObject(model).toObject(AutoscaleRecurrence.class); - Assertions.assertEquals("enevfyexfwhybci", model.timeZone()); - Assertions.assertEquals(DaysOfWeek.SATURDAY, model.schedule().get(0).days().get(0)); - Assertions.assertEquals("tynnaamdectehfi", model.schedule().get(0).timeAndCapacity().time()); - Assertions.assertEquals(494775669, model.schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(478088047, 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 ae873852c1ea..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleScheduleTests.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.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; - -public final class AutoscaleScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleSchedule model = - BinaryData - .fromString( - "{\"days\":[\"Monday\",\"Thursday\",\"Tuesday\",\"Sunday\"],\"timeAndCapacity\":{\"time\":\"czsqpjhvm\",\"minInstanceCount\":330627677,\"maxInstanceCount\":1964386727}}") - .toObject(AutoscaleSchedule.class); - Assertions.assertEquals(DaysOfWeek.MONDAY, model.days().get(0)); - Assertions.assertEquals("czsqpjhvm", model.timeAndCapacity().time()); - Assertions.assertEquals(330627677, model.timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(1964386727, model.timeAndCapacity().maxInstanceCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleSchedule model = - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.MONDAY, DaysOfWeek.THURSDAY, DaysOfWeek.TUESDAY, DaysOfWeek.SUNDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("czsqpjhvm") - .withMinInstanceCount(330627677) - .withMaxInstanceCount(1964386727)); - model = BinaryData.fromObject(model).toObject(AutoscaleSchedule.class); - Assertions.assertEquals(DaysOfWeek.MONDAY, model.days().get(0)); - Assertions.assertEquals("czsqpjhvm", model.timeAndCapacity().time()); - Assertions.assertEquals(330627677, model.timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(1964386727, 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 951b71ddbe83..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AutoscaleTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 com.azure.resourcemanager.hdinsight.models.AutoscaleTimeAndCapacity; -import com.azure.resourcemanager.hdinsight.models.DaysOfWeek; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AutoscaleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Autoscale model = - BinaryData - .fromString( - "{\"capacity\":{\"minInstanceCount\":1771103105,\"maxInstanceCount\":1913635803},\"recurrence\":{\"timeZone\":\"bjnpg\",\"schedule\":[{\"days\":[\"Wednesday\",\"Thursday\",\"Tuesday\",\"Monday\"],\"timeAndCapacity\":{\"time\":\"tyfsoppusuesn\",\"minInstanceCount\":1828932864,\"maxInstanceCount\":317621756}},{\"days\":[\"Thursday\"],\"timeAndCapacity\":{\"time\":\"xzdmohctb\",\"minInstanceCount\":1529084406,\"maxInstanceCount\":1727666858}},{\"days\":[\"Wednesday\",\"Monday\"],\"timeAndCapacity\":{\"time\":\"owgujjugwdkcglhs\",\"minInstanceCount\":525193865,\"maxInstanceCount\":1319267139}},{\"days\":[\"Saturday\"],\"timeAndCapacity\":{\"time\":\"jixhbk\",\"minInstanceCount\":696008357,\"maxInstanceCount\":662259969}}]}}") - .toObject(Autoscale.class); - Assertions.assertEquals(1771103105, model.capacity().minInstanceCount()); - Assertions.assertEquals(1913635803, model.capacity().maxInstanceCount()); - Assertions.assertEquals("bjnpg", model.recurrence().timeZone()); - Assertions.assertEquals(DaysOfWeek.WEDNESDAY, model.recurrence().schedule().get(0).days().get(0)); - Assertions.assertEquals("tyfsoppusuesn", model.recurrence().schedule().get(0).timeAndCapacity().time()); - Assertions.assertEquals(1828932864, model.recurrence().schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(317621756, model.recurrence().schedule().get(0).timeAndCapacity().maxInstanceCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Autoscale model = - new Autoscale() - .withCapacity(new AutoscaleCapacity().withMinInstanceCount(1771103105).withMaxInstanceCount(1913635803)) - .withRecurrence( - new AutoscaleRecurrence() - .withTimeZone("bjnpg") - .withSchedule( - Arrays - .asList( - new AutoscaleSchedule() - .withDays( - Arrays - .asList( - DaysOfWeek.WEDNESDAY, - DaysOfWeek.THURSDAY, - DaysOfWeek.TUESDAY, - DaysOfWeek.MONDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("tyfsoppusuesn") - .withMinInstanceCount(1828932864) - .withMaxInstanceCount(317621756)), - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.THURSDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("xzdmohctb") - .withMinInstanceCount(1529084406) - .withMaxInstanceCount(1727666858)), - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.WEDNESDAY, DaysOfWeek.MONDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("owgujjugwdkcglhs") - .withMinInstanceCount(525193865) - .withMaxInstanceCount(1319267139)), - new AutoscaleSchedule() - .withDays(Arrays.asList(DaysOfWeek.SATURDAY)) - .withTimeAndCapacity( - new AutoscaleTimeAndCapacity() - .withTime("jixhbk") - .withMinInstanceCount(696008357) - .withMaxInstanceCount(662259969))))); - model = BinaryData.fromObject(model).toObject(Autoscale.class); - Assertions.assertEquals(1771103105, model.capacity().minInstanceCount()); - Assertions.assertEquals(1913635803, model.capacity().maxInstanceCount()); - Assertions.assertEquals("bjnpg", model.recurrence().timeZone()); - Assertions.assertEquals(DaysOfWeek.WEDNESDAY, model.recurrence().schedule().get(0).days().get(0)); - Assertions.assertEquals("tyfsoppusuesn", model.recurrence().schedule().get(0).timeAndCapacity().time()); - Assertions.assertEquals(1828932864, model.recurrence().schedule().get(0).timeAndCapacity().minInstanceCount()); - Assertions.assertEquals(317621756, model.recurrence().schedule().get(0).timeAndCapacity().maxInstanceCount()); - } -} 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 c44e96390aba..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; - -public final class AutoscaleTimeAndCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleTimeAndCapacity model = - BinaryData - .fromString( - "{\"time\":\"sounqecanoaeu\",\"minInstanceCount\":453736827,\"maxInstanceCount\":2029190304}") - .toObject(AutoscaleTimeAndCapacity.class); - Assertions.assertEquals("sounqecanoaeu", model.time()); - Assertions.assertEquals(453736827, model.minInstanceCount()); - Assertions.assertEquals(2029190304, model.maxInstanceCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleTimeAndCapacity model = - new AutoscaleTimeAndCapacity() - .withTime("sounqecanoaeu") - .withMinInstanceCount(453736827) - .withMaxInstanceCount(2029190304); - model = BinaryData.fromObject(model).toObject(AutoscaleTimeAndCapacity.class); - Assertions.assertEquals("sounqecanoaeu", model.time()); - Assertions.assertEquals(453736827, model.minInstanceCount()); - Assertions.assertEquals(2029190304, 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 2c309bffbff5..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; - -public final class AzureMonitorResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureMonitorResponseInner model = - BinaryData - .fromString( - "{\"clusterMonitoringEnabled\":false,\"workspaceId\":\"mkcdyhbpkkpwdre\",\"selectedConfigurations\":{\"configurationVersion\":\"vvqfovljxyws\",\"globalConfigurations\":{\"dsytgadgvr\":\"yrs\",\"neqn\":\"ea\",\"jfqka\":\"arrwlquu\",\"iipfpubj\":\"e\"},\"tableList\":[{\"name\":\"iftohqkvpu\"},{\"name\":\"sgplsakn\"},{\"name\":\"fsynljphuop\"},{\"name\":\"dlqiyntorzih\"}]}}") - .toObject(AzureMonitorResponseInner.class); - Assertions.assertEquals(false, model.clusterMonitoringEnabled()); - Assertions.assertEquals("mkcdyhbpkkpwdre", model.workspaceId()); - Assertions.assertEquals("vvqfovljxyws", model.selectedConfigurations().configurationVersion()); - Assertions.assertEquals("yrs", model.selectedConfigurations().globalConfigurations().get("dsytgadgvr")); - Assertions.assertEquals("iftohqkvpu", model.selectedConfigurations().tableList().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureMonitorResponseInner model = - new AzureMonitorResponseInner() - .withClusterMonitoringEnabled(false) - .withWorkspaceId("mkcdyhbpkkpwdre") - .withSelectedConfigurations( - new AzureMonitorSelectedConfigurations() - .withConfigurationVersion("vvqfovljxyws") - .withGlobalConfigurations( - mapOf("dsytgadgvr", "yrs", "neqn", "ea", "jfqka", "arrwlquu", "iipfpubj", "e")) - .withTableList( - Arrays - .asList( - new AzureMonitorTableConfiguration().withName("iftohqkvpu"), - new AzureMonitorTableConfiguration().withName("sgplsakn"), - new AzureMonitorTableConfiguration().withName("fsynljphuop"), - new AzureMonitorTableConfiguration().withName("dlqiyntorzih")))); - model = BinaryData.fromObject(model).toObject(AzureMonitorResponseInner.class); - Assertions.assertEquals(false, model.clusterMonitoringEnabled()); - Assertions.assertEquals("mkcdyhbpkkpwdre", model.workspaceId()); - Assertions.assertEquals("vvqfovljxyws", model.selectedConfigurations().configurationVersion()); - Assertions.assertEquals("yrs", model.selectedConfigurations().globalConfigurations().get("dsytgadgvr")); - Assertions.assertEquals("iftohqkvpu", 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 d99000607d0f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorSelectedConfigurationsTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (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; - -public final class AzureMonitorSelectedConfigurationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureMonitorSelectedConfigurations model = - BinaryData - .fromString( - "{\"configurationVersion\":\"kwofyyvoq\",\"globalConfigurations\":{\"nwashrtd\":\"iexpbtgiwbwo\",\"ulpiuj\":\"kcnqxwbpo\",\"obyu\":\"aasipqi\"},\"tableList\":[{\"name\":\"qlpqwcciuq\"},{\"name\":\"dbutauvfbtkuwhh\"}]}") - .toObject(AzureMonitorSelectedConfigurations.class); - Assertions.assertEquals("kwofyyvoq", model.configurationVersion()); - Assertions.assertEquals("iexpbtgiwbwo", model.globalConfigurations().get("nwashrtd")); - Assertions.assertEquals("qlpqwcciuq", model.tableList().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureMonitorSelectedConfigurations model = - new AzureMonitorSelectedConfigurations() - .withConfigurationVersion("kwofyyvoq") - .withGlobalConfigurations(mapOf("nwashrtd", "iexpbtgiwbwo", "ulpiuj", "kcnqxwbpo", "obyu", "aasipqi")) - .withTableList( - Arrays - .asList( - new AzureMonitorTableConfiguration().withName("qlpqwcciuq"), - new AzureMonitorTableConfiguration().withName("dbutauvfbtkuwhh"))); - model = BinaryData.fromObject(model).toObject(AzureMonitorSelectedConfigurations.class); - Assertions.assertEquals("kwofyyvoq", model.configurationVersion()); - Assertions.assertEquals("iexpbtgiwbwo", model.globalConfigurations().get("nwashrtd")); - Assertions.assertEquals("qlpqwcciuq", 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 acbea7d08c91..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/AzureMonitorTableConfigurationTests.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.AzureMonitorTableConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AzureMonitorTableConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureMonitorTableConfiguration model = - BinaryData.fromString("{\"name\":\"ykojoxafnndlpic\"}").toObject(AzureMonitorTableConfiguration.class); - Assertions.assertEquals("ykojoxafnndlpic", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureMonitorTableConfiguration model = new AzureMonitorTableConfiguration().withName("ykojoxafnndlpic"); - model = BinaryData.fromObject(model).toObject(AzureMonitorTableConfiguration.class); - Assertions.assertEquals("ykojoxafnndlpic", 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 da8a743bcfe4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingMetersTests.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.BillingMeters; -import org.junit.jupiter.api.Assertions; - -public final class BillingMetersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeters model = - BinaryData - .fromString("{\"meterParameter\":\"fqntcyp\",\"meter\":\"jv\",\"unit\":\"imwkslircizj\"}") - .toObject(BillingMeters.class); - Assertions.assertEquals("fqntcyp", model.meterParameter()); - Assertions.assertEquals("jv", model.meter()); - Assertions.assertEquals("imwkslircizj", model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeters model = - new BillingMeters().withMeterParameter("fqntcyp").withMeter("jv").withUnit("imwkslircizj"); - model = BinaryData.fromObject(model).toObject(BillingMeters.class); - Assertions.assertEquals("fqntcyp", model.meterParameter()); - Assertions.assertEquals("jv", model.meter()); - Assertions.assertEquals("imwkslircizj", 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 2678fdd88516..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResourcesTests.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.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; - -public final class BillingResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingResources model = - BinaryData - .fromString( - "{\"region\":\"fcluyov\",\"billingMeters\":[{\"meterParameter\":\"kfezzxscyhwz\",\"meter\":\"irujbz\",\"unit\":\"mvzzbtdcqvp\"},{\"meterParameter\":\"yujviylwdshfssn\",\"meter\":\"gy\",\"unit\":\"rymsgaojfmw\"},{\"meterParameter\":\"otmrfhir\",\"meter\":\"ymoxoftpipiwyczu\",\"unit\":\"a\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"lihhyuspskasdvlm\",\"sku\":\"dgzxulucvpamrsr\",\"tier\":\"Premium\"},{\"diskRpMeter\":\"xurisjnhnyt\",\"sku\":\"fq\",\"tier\":\"Premium\"},{\"diskRpMeter\":\"mrhublwpc\",\"sku\":\"utr\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"auutpwoqhihe\",\"sku\":\"g\",\"tier\":\"Premium\"}]}") - .toObject(BillingResources.class); - Assertions.assertEquals("fcluyov", model.region()); - Assertions.assertEquals("kfezzxscyhwz", model.billingMeters().get(0).meterParameter()); - Assertions.assertEquals("irujbz", model.billingMeters().get(0).meter()); - Assertions.assertEquals("mvzzbtdcqvp", model.billingMeters().get(0).unit()); - Assertions.assertEquals("lihhyuspskasdvlm", model.diskBillingMeters().get(0).diskRpMeter()); - Assertions.assertEquals("dgzxulucvpamrsr", model.diskBillingMeters().get(0).sku()); - Assertions.assertEquals(Tier.PREMIUM, model.diskBillingMeters().get(0).tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingResources model = - new BillingResources() - .withRegion("fcluyov") - .withBillingMeters( - Arrays - .asList( - new BillingMeters() - .withMeterParameter("kfezzxscyhwz") - .withMeter("irujbz") - .withUnit("mvzzbtdcqvp"), - new BillingMeters() - .withMeterParameter("yujviylwdshfssn") - .withMeter("gy") - .withUnit("rymsgaojfmw"), - new BillingMeters() - .withMeterParameter("otmrfhir") - .withMeter("ymoxoftpipiwyczu") - .withUnit("a"))) - .withDiskBillingMeters( - Arrays - .asList( - new DiskBillingMeters() - .withDiskRpMeter("lihhyuspskasdvlm") - .withSku("dgzxulucvpamrsr") - .withTier(Tier.PREMIUM), - new DiskBillingMeters().withDiskRpMeter("xurisjnhnyt").withSku("fq").withTier(Tier.PREMIUM), - new DiskBillingMeters().withDiskRpMeter("mrhublwpc").withSku("utr").withTier(Tier.STANDARD), - new DiskBillingMeters() - .withDiskRpMeter("auutpwoqhihe") - .withSku("g") - .withTier(Tier.PREMIUM))); - model = BinaryData.fromObject(model).toObject(BillingResources.class); - Assertions.assertEquals("fcluyov", model.region()); - Assertions.assertEquals("kfezzxscyhwz", model.billingMeters().get(0).meterParameter()); - Assertions.assertEquals("irujbz", model.billingMeters().get(0).meter()); - Assertions.assertEquals("mvzzbtdcqvp", model.billingMeters().get(0).unit()); - Assertions.assertEquals("lihhyuspskasdvlm", model.diskBillingMeters().get(0).diskRpMeter()); - Assertions.assertEquals("dgzxulucvpamrsr", 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 ef4f6a61dc61..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/BillingResponseListResultInnerTests.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (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.BillingMeters; -import com.azure.resourcemanager.hdinsight.models.BillingResources; -import com.azure.resourcemanager.hdinsight.models.DiskBillingMeters; -import com.azure.resourcemanager.hdinsight.models.FilterMode; -import com.azure.resourcemanager.hdinsight.models.OSType; -import com.azure.resourcemanager.hdinsight.models.Tier; -import com.azure.resourcemanager.hdinsight.models.VmSizeCompatibilityFilterV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BillingResponseListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingResponseListResultInner model = - BinaryData - .fromString( - "{\"vmSizes\":[\"qfobwyz\"],\"vmSizesWithEncryptionAtHost\":[\"ykutwpf\",\"pagmhrskdsnf\"],\"vmSizeFilters\":[{\"filterMode\":\"Default\",\"regions\":[\"tdlmkkzevd\",\"hewpusdsttwv\"],\"clusterFlavors\":[\"bbejdcngqqm\",\"akufgmjz\",\"wr\"],\"nodeTypes\":[\"twaenuuzko\",\"bminrfdwoyuhhzi\",\"iefozbhdmsml\"],\"clusterVersions\":[\"hoftr\",\"ae\",\"u\",\"ah\"],\"osType\":[\"Linux\",\"Linux\",\"Linux\",\"Linux\"],\"vmSizes\":[\"z\",\"iyylhalnswhccsp\"],\"espApplied\":\"aivwitqscywu\",\"computeIsolationSupported\":\"woluhczbwemhair\"},{\"filterMode\":\"Recommend\",\"regions\":[\"dwmsweypqwd\"],\"clusterFlavors\":[\"icccn\",\"qhuexm\",\"ttlstvlzywemhz\"],\"nodeTypes\":[\"sdtclusiypbs\",\"gytguslfead\",\"ygqukyhejh\",\"isxgfp\"],\"clusterVersions\":[\"lppvksrpq\",\"ujzra\",\"htwdwrftswibyrcd\",\"bhshfwpracstwity\"],\"osType\":[\"Windows\",\"Linux\",\"Windows\"],\"vmSizes\":[\"dcpnmdyodnw\",\"xltjcvnhltiu\",\"cxnavv\",\"xqi\"],\"espApplied\":\"qunyowxwlmdjr\",\"computeIsolationSupported\":\"fgbvfvpdbo\"},{\"filterMode\":\"Default\",\"regions\":[\"sjq\",\"hkr\"],\"clusterFlavors\":[\"deibqip\",\"kghv\",\"ndzwmkrefa\"],\"nodeTypes\":[\"orwkqnyh\",\"b\",\"j\",\"jivfxzsjabib\"],\"clusterVersions\":[\"tawfsdjpvkvp\",\"jxbkzbzkdvn\",\"jabudurgkakmo\"],\"osType\":[\"Windows\",\"Windows\"],\"vmSizes\":[\"ffhmouwqlgzr\",\"zeeyebi\",\"ikayuhqlbjbsybb\"],\"espApplied\":\"r\",\"computeIsolationSupported\":\"ldgmfpgvmpip\"},{\"filterMode\":\"Exclude\",\"regions\":[\"aqfxss\"],\"clusterFlavors\":[\"twbdsrezpdrhn\"],\"nodeTypes\":[\"owqkdwytisi\",\"ircgpikpz\",\"mejzanlfzxia\",\"rmbzo\"],\"clusterVersions\":[\"i\",\"rjqc\"],\"osType\":[\"Windows\",\"Windows\"],\"vmSizes\":[\"lazszrn\",\"oiindfpwpjy\",\"wbtlhflsjcdh\"],\"espApplied\":\"fjvfbgofeljagr\",\"computeIsolationSupported\":\"qhl\"}],\"vmSizeProperties\":[{\"name\":\"iiojnal\",\"cores\":524245347,\"dataDiskStorageTier\":\"vtvsexsowueluq\",\"label\":\"ahhxvrh\",\"maxDataDiskCount\":9171909100636996860,\"memoryInMb\":4157804500338386814,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":7214299945919733789,\"webWorkerResourceDiskSizeInMb\":2856222414032375851},{\"name\":\"xhqxujxukndxdigr\",\"cores\":1599924393,\"dataDiskStorageTier\":\"fzdm\",\"label\":\"qtfihwhbotzinga\",\"maxDataDiskCount\":2353170453764663846,\"memoryInMb\":449816124137860976,\"supportedByVirtualMachines\":false,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":8200061235460803535,\"webWorkerResourceDiskSizeInMb\":7279242451300460541},{\"name\":\"dkfw\",\"cores\":2014780251,\"dataDiskStorageTier\":\"vtbvkayh\",\"label\":\"nvyq\",\"maxDataDiskCount\":2949816427464265295,\"memoryInMb\":1497619530378227200,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":941265626595578709,\"webWorkerResourceDiskSizeInMb\":2780468814645606920},{\"name\":\"vvsccyajguq\",\"cores\":1811586286,\"dataDiskStorageTier\":\"gzlvdnkfxu\",\"label\":\"mdwzrmuhapfcqdps\",\"maxDataDiskCount\":1717467823158981449,\"memoryInMb\":3875353793969101932,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":5946523647295808209,\"webWorkerResourceDiskSizeInMb\":3613891103592609366}],\"billingResources\":[{\"region\":\"ypql\",\"billingMeters\":[{\"meterParameter\":\"kerqwkyh\",\"meter\":\"bopgxedkowepbqp\",\"unit\":\"fkbw\"},{\"meterParameter\":\"snjvcdwxlpqekftn\",\"meter\":\"tjsyin\",\"unit\":\"fq\"},{\"meterParameter\":\"mtdh\",\"meter\":\"dvypgikdgsz\",\"unit\":\"kbir\"},{\"meterParameter\":\"uzhlhkjoqrv\",\"meter\":\"aatjinrvgoupmfi\",\"unit\":\"fggjioolvr\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"tkkgllqwjy\",\"sku\":\"jayvblmhv\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"bxvvyhg\",\"sku\":\"pbyrqufegxu\",\"tier\":\"Standard\"}]},{\"region\":\"bnhlmc\",\"billingMeters\":[{\"meterParameter\":\"ngitvgbmhrixkwm\",\"meter\":\"jejveg\",\"unit\":\"bpnaixexccbdre\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"exdrrvqahqkg\",\"sku\":\"pwijnhy\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"ycxzbfvoo\",\"sku\":\"rvmtgjq\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"s\",\"sku\":\"on\",\"tier\":\"Premium\"}]},{\"region\":\"gfipnsxk\",\"billingMeters\":[{\"meterParameter\":\"ekrrjr\",\"meter\":\"fxtsgum\",\"unit\":\"glikkxwslolb\"},{\"meterParameter\":\"vuzlm\",\"meter\":\"elfk\",\"unit\":\"plcrpwjxeznoig\"},{\"meterParameter\":\"njwmwkpnbsazejj\",\"meter\":\"kagfhsxtt\",\"unit\":\"gzxnfaazpxdtnk\"},{\"meterParameter\":\"kqjjlwuenvrkp\",\"meter\":\"uaibrebqaaysj\",\"unit\":\"xqtnq\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"lwfffi\",\"sku\":\"pjpqqmtedltmmji\",\"tier\":\"Standard\"}]},{\"region\":\"zphv\",\"billingMeters\":[{\"meterParameter\":\"qncygupkvi\",\"meter\":\"dscwxqupevzhf\",\"unit\":\"otxhojujby\"},{\"meterParameter\":\"lmcuvhixb\",\"meter\":\"yfwnylr\",\"unit\":\"o\"},{\"meterParameter\":\"ttpkiwkkbnujrywv\",\"meter\":\"lbfpncurd\",\"unit\":\"wiithtywub\"},{\"meterParameter\":\"bihwqknfdnt\",\"meter\":\"chrdgoihxumwcto\",\"unit\":\"zj\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"fdlwg\",\"sku\":\"tsbwtovvtgse\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"iufxqknpir\",\"sku\":\"epttwqmsniff\",\"tier\":\"Premium\"}]}]}") - .toObject(BillingResponseListResultInner.class); - Assertions.assertEquals("qfobwyz", model.vmSizes().get(0)); - Assertions.assertEquals("ykutwpf", model.vmSizesWithEncryptionAtHost().get(0)); - Assertions.assertEquals(FilterMode.DEFAULT, model.vmSizeFilters().get(0).filterMode()); - Assertions.assertEquals("tdlmkkzevd", model.vmSizeFilters().get(0).regions().get(0)); - Assertions.assertEquals("bbejdcngqqm", model.vmSizeFilters().get(0).clusterFlavors().get(0)); - Assertions.assertEquals("twaenuuzko", model.vmSizeFilters().get(0).nodeTypes().get(0)); - Assertions.assertEquals("hoftr", model.vmSizeFilters().get(0).clusterVersions().get(0)); - Assertions.assertEquals(OSType.LINUX, model.vmSizeFilters().get(0).osType().get(0)); - Assertions.assertEquals("z", model.vmSizeFilters().get(0).vmSizes().get(0)); - Assertions.assertEquals("aivwitqscywu", model.vmSizeFilters().get(0).espApplied()); - Assertions.assertEquals("woluhczbwemhair", model.vmSizeFilters().get(0).computeIsolationSupported()); - Assertions.assertEquals("ypql", model.billingResources().get(0).region()); - Assertions.assertEquals("kerqwkyh", model.billingResources().get(0).billingMeters().get(0).meterParameter()); - Assertions.assertEquals("bopgxedkowepbqp", model.billingResources().get(0).billingMeters().get(0).meter()); - Assertions.assertEquals("fkbw", model.billingResources().get(0).billingMeters().get(0).unit()); - Assertions.assertEquals("tkkgllqwjy", model.billingResources().get(0).diskBillingMeters().get(0).diskRpMeter()); - Assertions.assertEquals("jayvblmhv", model.billingResources().get(0).diskBillingMeters().get(0).sku()); - Assertions.assertEquals(Tier.STANDARD, model.billingResources().get(0).diskBillingMeters().get(0).tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingResponseListResultInner model = - new BillingResponseListResultInner() - .withVmSizes(Arrays.asList("qfobwyz")) - .withVmSizesWithEncryptionAtHost(Arrays.asList("ykutwpf", "pagmhrskdsnf")) - .withVmSizeFilters( - Arrays - .asList( - new VmSizeCompatibilityFilterV2() - .withFilterMode(FilterMode.DEFAULT) - .withRegions(Arrays.asList("tdlmkkzevd", "hewpusdsttwv")) - .withClusterFlavors(Arrays.asList("bbejdcngqqm", "akufgmjz", "wr")) - .withNodeTypes(Arrays.asList("twaenuuzko", "bminrfdwoyuhhzi", "iefozbhdmsml")) - .withClusterVersions(Arrays.asList("hoftr", "ae", "u", "ah")) - .withOsType(Arrays.asList(OSType.LINUX, OSType.LINUX, OSType.LINUX, OSType.LINUX)) - .withVmSizes(Arrays.asList("z", "iyylhalnswhccsp")) - .withEspApplied("aivwitqscywu") - .withComputeIsolationSupported("woluhczbwemhair"), - new VmSizeCompatibilityFilterV2() - .withFilterMode(FilterMode.RECOMMEND) - .withRegions(Arrays.asList("dwmsweypqwd")) - .withClusterFlavors(Arrays.asList("icccn", "qhuexm", "ttlstvlzywemhz")) - .withNodeTypes(Arrays.asList("sdtclusiypbs", "gytguslfead", "ygqukyhejh", "isxgfp")) - .withClusterVersions( - Arrays.asList("lppvksrpq", "ujzra", "htwdwrftswibyrcd", "bhshfwpracstwity")) - .withOsType(Arrays.asList(OSType.WINDOWS, OSType.LINUX, OSType.WINDOWS)) - .withVmSizes(Arrays.asList("dcpnmdyodnw", "xltjcvnhltiu", "cxnavv", "xqi")) - .withEspApplied("qunyowxwlmdjr") - .withComputeIsolationSupported("fgbvfvpdbo"), - new VmSizeCompatibilityFilterV2() - .withFilterMode(FilterMode.DEFAULT) - .withRegions(Arrays.asList("sjq", "hkr")) - .withClusterFlavors(Arrays.asList("deibqip", "kghv", "ndzwmkrefa")) - .withNodeTypes(Arrays.asList("orwkqnyh", "b", "j", "jivfxzsjabib")) - .withClusterVersions(Arrays.asList("tawfsdjpvkvp", "jxbkzbzkdvn", "jabudurgkakmo")) - .withOsType(Arrays.asList(OSType.WINDOWS, OSType.WINDOWS)) - .withVmSizes(Arrays.asList("ffhmouwqlgzr", "zeeyebi", "ikayuhqlbjbsybb")) - .withEspApplied("r") - .withComputeIsolationSupported("ldgmfpgvmpip"), - new VmSizeCompatibilityFilterV2() - .withFilterMode(FilterMode.EXCLUDE) - .withRegions(Arrays.asList("aqfxss")) - .withClusterFlavors(Arrays.asList("twbdsrezpdrhn")) - .withNodeTypes(Arrays.asList("owqkdwytisi", "ircgpikpz", "mejzanlfzxia", "rmbzo")) - .withClusterVersions(Arrays.asList("i", "rjqc")) - .withOsType(Arrays.asList(OSType.WINDOWS, OSType.WINDOWS)) - .withVmSizes(Arrays.asList("lazszrn", "oiindfpwpjy", "wbtlhflsjcdh")) - .withEspApplied("fjvfbgofeljagr") - .withComputeIsolationSupported("qhl"))) - .withBillingResources( - Arrays - .asList( - new BillingResources() - .withRegion("ypql") - .withBillingMeters( - Arrays - .asList( - new BillingMeters() - .withMeterParameter("kerqwkyh") - .withMeter("bopgxedkowepbqp") - .withUnit("fkbw"), - new BillingMeters() - .withMeterParameter("snjvcdwxlpqekftn") - .withMeter("tjsyin") - .withUnit("fq"), - new BillingMeters() - .withMeterParameter("mtdh") - .withMeter("dvypgikdgsz") - .withUnit("kbir"), - new BillingMeters() - .withMeterParameter("uzhlhkjoqrv") - .withMeter("aatjinrvgoupmfi") - .withUnit("fggjioolvr"))) - .withDiskBillingMeters( - Arrays - .asList( - new DiskBillingMeters() - .withDiskRpMeter("tkkgllqwjy") - .withSku("jayvblmhv") - .withTier(Tier.STANDARD), - new DiskBillingMeters() - .withDiskRpMeter("bxvvyhg") - .withSku("pbyrqufegxu") - .withTier(Tier.STANDARD))), - new BillingResources() - .withRegion("bnhlmc") - .withBillingMeters( - Arrays - .asList( - new BillingMeters() - .withMeterParameter("ngitvgbmhrixkwm") - .withMeter("jejveg") - .withUnit("bpnaixexccbdre"))) - .withDiskBillingMeters( - Arrays - .asList( - new DiskBillingMeters() - .withDiskRpMeter("exdrrvqahqkg") - .withSku("pwijnhy") - .withTier(Tier.STANDARD), - new DiskBillingMeters() - .withDiskRpMeter("ycxzbfvoo") - .withSku("rvmtgjq") - .withTier(Tier.STANDARD), - new DiskBillingMeters() - .withDiskRpMeter("s") - .withSku("on") - .withTier(Tier.PREMIUM))), - new BillingResources() - .withRegion("gfipnsxk") - .withBillingMeters( - Arrays - .asList( - new BillingMeters() - .withMeterParameter("ekrrjr") - .withMeter("fxtsgum") - .withUnit("glikkxwslolb"), - new BillingMeters() - .withMeterParameter("vuzlm") - .withMeter("elfk") - .withUnit("plcrpwjxeznoig"), - new BillingMeters() - .withMeterParameter("njwmwkpnbsazejj") - .withMeter("kagfhsxtt") - .withUnit("gzxnfaazpxdtnk"), - new BillingMeters() - .withMeterParameter("kqjjlwuenvrkp") - .withMeter("uaibrebqaaysj") - .withUnit("xqtnq"))) - .withDiskBillingMeters( - Arrays - .asList( - new DiskBillingMeters() - .withDiskRpMeter("lwfffi") - .withSku("pjpqqmtedltmmji") - .withTier(Tier.STANDARD))), - new BillingResources() - .withRegion("zphv") - .withBillingMeters( - Arrays - .asList( - new BillingMeters() - .withMeterParameter("qncygupkvi") - .withMeter("dscwxqupevzhf") - .withUnit("otxhojujby"), - new BillingMeters() - .withMeterParameter("lmcuvhixb") - .withMeter("yfwnylr") - .withUnit("o"), - new BillingMeters() - .withMeterParameter("ttpkiwkkbnujrywv") - .withMeter("lbfpncurd") - .withUnit("wiithtywub"), - new BillingMeters() - .withMeterParameter("bihwqknfdnt") - .withMeter("chrdgoihxumwcto") - .withUnit("zj"))) - .withDiskBillingMeters( - Arrays - .asList( - new DiskBillingMeters() - .withDiskRpMeter("fdlwg") - .withSku("tsbwtovvtgse") - .withTier(Tier.STANDARD), - new DiskBillingMeters() - .withDiskRpMeter("iufxqknpir") - .withSku("epttwqmsniff") - .withTier(Tier.PREMIUM))))); - model = BinaryData.fromObject(model).toObject(BillingResponseListResultInner.class); - Assertions.assertEquals("qfobwyz", model.vmSizes().get(0)); - Assertions.assertEquals("ykutwpf", model.vmSizesWithEncryptionAtHost().get(0)); - Assertions.assertEquals(FilterMode.DEFAULT, model.vmSizeFilters().get(0).filterMode()); - Assertions.assertEquals("tdlmkkzevd", model.vmSizeFilters().get(0).regions().get(0)); - Assertions.assertEquals("bbejdcngqqm", model.vmSizeFilters().get(0).clusterFlavors().get(0)); - Assertions.assertEquals("twaenuuzko", model.vmSizeFilters().get(0).nodeTypes().get(0)); - Assertions.assertEquals("hoftr", model.vmSizeFilters().get(0).clusterVersions().get(0)); - Assertions.assertEquals(OSType.LINUX, model.vmSizeFilters().get(0).osType().get(0)); - Assertions.assertEquals("z", model.vmSizeFilters().get(0).vmSizes().get(0)); - Assertions.assertEquals("aivwitqscywu", model.vmSizeFilters().get(0).espApplied()); - Assertions.assertEquals("woluhczbwemhair", model.vmSizeFilters().get(0).computeIsolationSupported()); - Assertions.assertEquals("ypql", model.billingResources().get(0).region()); - Assertions.assertEquals("kerqwkyh", model.billingResources().get(0).billingMeters().get(0).meterParameter()); - Assertions.assertEquals("bopgxedkowepbqp", model.billingResources().get(0).billingMeters().get(0).meter()); - Assertions.assertEquals("fkbw", model.billingResources().get(0).billingMeters().get(0).unit()); - Assertions.assertEquals("tkkgllqwjy", model.billingResources().get(0).diskBillingMeters().get(0).diskRpMeter()); - Assertions.assertEquals("jayvblmhv", model.billingResources().get(0).diskBillingMeters().get(0).sku()); - Assertions.assertEquals(Tier.STANDARD, model.billingResources().get(0).diskBillingMeters().get(0).tier()); - } -} 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 3b4557133435..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/CapabilitiesResultInnerTests.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (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.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; - -public final class CapabilitiesResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CapabilitiesResultInner model = - BinaryData - .fromString( - "{\"versions\":{\"eaivxwczel\":{\"available\":[{\"friendlyName\":\"iizynkedyatrwyh\",\"displayName\":\"ibzyhwitsmyp\",\"isDefault\":true,\"componentVersions\":{\"nmabik\":\"dpumnzgmw\"}},{\"friendlyName\":\"orgjhxbldt\",\"displayName\":\"wrlkdmtn\",\"isDefault\":false,\"componentVersions\":{\"tdtbnnhadooc\":\"tllxdyhgsyocogj\",\"hnvpamqgxq\":\"kvci\",\"zikywgg\":\"u\"}},{\"friendlyName\":\"allatmelwuipic\",\"displayName\":\"zkzivgvvcnay\",\"isDefault\":true,\"componentVersions\":{\"rdvstkwqqtch\":\"xxmueedn\",\"mtdaa\":\"alm\",\"vgpiohgwxrt\":\"gdv\",\"vmnpkukghimdblx\":\"udxepxgyqagv\"}},{\"friendlyName\":\"imfnjhfjx\",\"displayName\":\"szkkfoqre\",\"isDefault\":true,\"componentVersions\":{\"aw\":\"kf\"}}]},\"yc\":{\"available\":[{\"friendlyName\":\"elsfeaen\",\"displayName\":\"bfatklddxbjhwu\",\"isDefault\":false,\"componentVersions\":{\"hyoulpjr\":\"jos\",\"vimjwos\":\"xagl\"}},{\"friendlyName\":\"xitc\",\"displayName\":\"fcktqumiekke\",\"isDefault\":false,\"componentVersions\":{\"jhdgqggebdunyga\":\"ly\",\"moadsuvarmy\":\"qidbqfatpxllrxcy\",\"hhyxxrw\":\"dmjsjqb\"}}]}},\"regions\":{\"xqugjhkycubedd\":{\"available\":[\"kxkgymareqna\"]},\"ayffim\":{\"available\":[\"ofwq\",\"zqalkrmnjijpx\",\"cqqudf\",\"byxbaaabjy\"]},\"wmewzsyy\":{\"available\":[\"tuzqogsexne\",\"fdnw\"]}},\"features\":[\"zsoibjudpfrxtr\",\"hzv\"],\"quota\":{\"coresUsed\":7682378708055964698,\"maxCoresAllowed\":8785236673495844841,\"regionalQuotas\":[{\"regionName\":\"bpaxhexiilivpdt\",\"coresUsed\":62353218674748426,\"coresAvailable\":233619173932499743}]}}") - .toObject(CapabilitiesResultInner.class); - Assertions - .assertEquals("iizynkedyatrwyh", model.versions().get("eaivxwczel").available().get(0).friendlyName()); - Assertions.assertEquals("ibzyhwitsmyp", model.versions().get("eaivxwczel").available().get(0).displayName()); - Assertions.assertEquals(true, model.versions().get("eaivxwczel").available().get(0).isDefault()); - Assertions - .assertEquals( - "dpumnzgmw", model.versions().get("eaivxwczel").available().get(0).componentVersions().get("nmabik")); - Assertions.assertEquals("kxkgymareqna", model.regions().get("xqugjhkycubedd").available().get(0)); - Assertions.assertEquals("zsoibjudpfrxtr", model.features().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CapabilitiesResultInner model = - new CapabilitiesResultInner() - .withVersions( - mapOf( - "eaivxwczel", - new VersionsCapability() - .withAvailable( - Arrays - .asList( - new VersionSpec() - .withFriendlyName("iizynkedyatrwyh") - .withDisplayName("ibzyhwitsmyp") - .withIsDefault(true) - .withComponentVersions(mapOf("nmabik", "dpumnzgmw")), - new VersionSpec() - .withFriendlyName("orgjhxbldt") - .withDisplayName("wrlkdmtn") - .withIsDefault(false) - .withComponentVersions( - mapOf( - "tdtbnnhadooc", - "tllxdyhgsyocogj", - "hnvpamqgxq", - "kvci", - "zikywgg", - "u")), - new VersionSpec() - .withFriendlyName("allatmelwuipic") - .withDisplayName("zkzivgvvcnay") - .withIsDefault(true) - .withComponentVersions( - mapOf( - "rdvstkwqqtch", - "xxmueedn", - "mtdaa", - "alm", - "vgpiohgwxrt", - "gdv", - "vmnpkukghimdblx", - "udxepxgyqagv")), - new VersionSpec() - .withFriendlyName("imfnjhfjx") - .withDisplayName("szkkfoqre") - .withIsDefault(true) - .withComponentVersions(mapOf("aw", "kf")))), - "yc", - new VersionsCapability() - .withAvailable( - Arrays - .asList( - new VersionSpec() - .withFriendlyName("elsfeaen") - .withDisplayName("bfatklddxbjhwu") - .withIsDefault(false) - .withComponentVersions(mapOf("hyoulpjr", "jos", "vimjwos", "xagl")), - new VersionSpec() - .withFriendlyName("xitc") - .withDisplayName("fcktqumiekke") - .withIsDefault(false) - .withComponentVersions( - mapOf( - "jhdgqggebdunyga", - "ly", - "moadsuvarmy", - "qidbqfatpxllrxcy", - "hhyxxrw", - "dmjsjqb")))))) - .withRegions( - mapOf( - "xqugjhkycubedd", - new RegionsCapability().withAvailable(Arrays.asList("kxkgymareqna")), - "ayffim", - new RegionsCapability() - .withAvailable(Arrays.asList("ofwq", "zqalkrmnjijpx", "cqqudf", "byxbaaabjy")), - "wmewzsyy", - new RegionsCapability().withAvailable(Arrays.asList("tuzqogsexne", "fdnw")))) - .withFeatures(Arrays.asList("zsoibjudpfrxtr", "hzv")); - model = BinaryData.fromObject(model).toObject(CapabilitiesResultInner.class); - Assertions - .assertEquals("iizynkedyatrwyh", model.versions().get("eaivxwczel").available().get(0).friendlyName()); - Assertions.assertEquals("ibzyhwitsmyp", model.versions().get("eaivxwczel").available().get(0).displayName()); - Assertions.assertEquals(true, model.versions().get("eaivxwczel").available().get(0).isDefault()); - Assertions - .assertEquals( - "dpumnzgmw", model.versions().get("eaivxwczel").available().get(0).componentVersions().get("nmabik")); - Assertions.assertEquals("kxkgymareqna", model.regions().get("xqugjhkycubedd").available().get(0)); - Assertions.assertEquals("zsoibjudpfrxtr", 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 4bd1ed8e2e45..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClientGroupInfoTests.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.ClientGroupInfo; -import org.junit.jupiter.api.Assertions; - -public final class ClientGroupInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClientGroupInfo model = - BinaryData - .fromString("{\"groupName\":\"anuzbpzkafkuw\",\"groupId\":\"rnwb\"}") - .toObject(ClientGroupInfo.class); - Assertions.assertEquals("anuzbpzkafkuw", model.groupName()); - Assertions.assertEquals("rnwb", model.groupId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClientGroupInfo model = new ClientGroupInfo().withGroupName("anuzbpzkafkuw").withGroupId("rnwb"); - model = BinaryData.fromObject(model).toObject(ClientGroupInfo.class); - Assertions.assertEquals("anuzbpzkafkuw", model.groupName()); - Assertions.assertEquals("rnwb", 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 cd03da1c66e7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterConfigurationsInnerTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class ClusterConfigurationsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterConfigurationsInner model = - BinaryData - .fromString( - "{\"configurations\":{\"yhrfouyftaakcpw\":{\"xrslpm\":\"gx\",\"qsluicp\":\"twuoegrpkhjwni\",\"modfvuefywsbpfvm\":\"ggkzzlvmbmpa\"},\"smocmbq\":{\"ksmond\":\"zvqtmnubexkp\",\"gkopkwhojvpajqgx\":\"mquxvypo\"},\"uejrjxgc\":{\"zapvhelx\":\"vmkcx\",\"tddckcb\":\"rgly\"}}}") - .toObject(ClusterConfigurationsInner.class); - Assertions.assertEquals("gx", model.configurations().get("yhrfouyftaakcpw").get("xrslpm")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterConfigurationsInner model = - new ClusterConfigurationsInner() - .withConfigurations( - mapOf( - "yhrfouyftaakcpw", - mapOf("xrslpm", "gx", "qsluicp", "twuoegrpkhjwni", "modfvuefywsbpfvm", "ggkzzlvmbmpa"), - "smocmbq", - mapOf("ksmond", "zvqtmnubexkp", "gkopkwhojvpajqgx", "mquxvypo"), - "uejrjxgc", - mapOf("zapvhelx", "vmkcx", "tddckcb", "rgly"))); - model = BinaryData.fromObject(model).toObject(ClusterConfigurationsInner.class); - Assertions.assertEquals("gx", model.configurations().get("yhrfouyftaakcpw").get("xrslpm")); - } - - @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 5b491ff6cab6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterDefinitionTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class ClusterDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterDefinition model = - BinaryData - .fromString( - "{\"blueprint\":\"vce\",\"kind\":\"eil\",\"componentVersion\":{\"jfcn\":\"oty\",\"x\":\"bkc\",\"nv\":\"hbttkphyw\",\"qnermclfplphoxu\":\"t\"},\"configurations\":\"datarpabg\"}") - .toObject(ClusterDefinition.class); - Assertions.assertEquals("vce", model.blueprint()); - Assertions.assertEquals("eil", model.kind()); - Assertions.assertEquals("oty", model.componentVersion().get("jfcn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterDefinition model = - new ClusterDefinition() - .withBlueprint("vce") - .withKind("eil") - .withComponentVersion(mapOf("jfcn", "oty", "x", "bkc", "nv", "hbttkphyw", "qnermclfplphoxu", "t")) - .withConfigurations("datarpabg"); - model = BinaryData.fromObject(model).toObject(ClusterDefinition.class); - Assertions.assertEquals("vce", model.blueprint()); - Assertions.assertEquals("eil", model.kind()); - Assertions.assertEquals("oty", model.componentVersion().get("jfcn")); - } - - @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 38392058b659..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterIdentityTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class ClusterIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"ni\",\"tenantId\":\"x\",\"type\":\"None\",\"userAssignedIdentities\":{\"uwprzql\":{\"principalId\":\"gklwn\",\"clientId\":\"hjdauwhvylwz\",\"tenantId\":\"dhxujznbmpo\"}}}") - .toObject(ClusterIdentity.class); - Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); - Assertions.assertEquals("dhxujznbmpo", model.userAssignedIdentities().get("uwprzql").tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterIdentity model = - new ClusterIdentity() - .withType(ResourceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("uwprzql", new UserAssignedIdentity().withTenantId("dhxujznbmpo"))); - model = BinaryData.fromObject(model).toObject(ClusterIdentity.class); - Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); - Assertions.assertEquals("dhxujznbmpo", model.userAssignedIdentities().get("uwprzql").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/ClusterMonitoringResponseInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterMonitoringResponseInnerTests.java deleted file mode 100644 index 2148b288a61a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterMonitoringResponseInnerTests.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.ClusterMonitoringResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class ClusterMonitoringResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterMonitoringResponseInner model = - BinaryData - .fromString("{\"clusterMonitoringEnabled\":false,\"workspaceId\":\"m\"}") - .toObject(ClusterMonitoringResponseInner.class); - Assertions.assertEquals(false, model.clusterMonitoringEnabled()); - Assertions.assertEquals("m", model.workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterMonitoringResponseInner model = - new ClusterMonitoringResponseInner().withClusterMonitoringEnabled(false).withWorkspaceId("m"); - model = BinaryData.fromObject(model).toObject(ClusterMonitoringResponseInner.class); - Assertions.assertEquals(false, model.clusterMonitoringEnabled()); - Assertions.assertEquals("m", 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 008895f7ca4e..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; - -public final class ClusterPatchParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPatchParameters model = - BinaryData - .fromString("{\"tags\":{\"cers\":\"ylpstdbhhxsrzdz\",\"wjmy\":\"dntnevf\"}}") - .toObject(ClusterPatchParameters.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.tags().get("cers")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPatchParameters model = - new ClusterPatchParameters().withTags(mapOf("cers", "ylpstdbhhxsrzdz", "wjmy", "dntnevf")); - model = BinaryData.fromObject(model).toObject(ClusterPatchParameters.class); - Assertions.assertEquals("ylpstdbhhxsrzdz", model.tags().get("cers")); - } - - @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 d2fd7232c069..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClusterResizeParametersTests.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.ClusterResizeParameters; -import org.junit.jupiter.api.Assertions; - -public final class ClusterResizeParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterResizeParameters model = - BinaryData.fromString("{\"targetInstanceCount\":485357732}").toObject(ClusterResizeParameters.class); - Assertions.assertEquals(485357732, model.targetInstanceCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterResizeParameters model = new ClusterResizeParameters().withTargetInstanceCount(485357732); - model = BinaryData.fromObject(model).toObject(ClusterResizeParameters.class); - Assertions.assertEquals(485357732, 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 99842beff1ab..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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("hzjqatucoige", "xncnwfe", com.azure.core.util.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 22a3f2c62247..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersExecuteScriptActionsMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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.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( - "hsrrryejylmbkz", - "dnigrfihot", - new ExecuteScriptActionParameters() - .withScriptActions( - Arrays - .asList( - new RuntimeScriptAction() - .withName("lpxuzzjgnrefq") - .withUri("hqo") - .withParameters("ihiqakydiw") - .withRoles(Arrays.asList("rkwpzdqtvhcspod", "qaxsipietgbebjf", "lbmoichd")), - new RuntimeScriptAction() - .withName("iqsowsaaelc") - .withUri("ttcjuhplrvkmjc") - .withParameters("jvlgfggcvkyyliz") - .withRoles(Arrays.asList("bjpsfxsfuztlvtm")), - new RuntimeScriptAction() - .withName("koveof") - .withUri("zrvjfnmjmvlwyzgi") - .withParameters("kujrllfojui") - .withRoles(Arrays.asList("puuyjucejik")))) - .withPersistOnSuccess(true), - com.azure.core.util.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 498f7496d3ac..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersResizeMockTests.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.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( - "dxxewuninv", - "db", - RoleName.WORKERNODE, - new ClusterResizeParameters().withTargetInstanceCount(1594166889), - com.azure.core.util.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 8fcd19dccfb1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ClustersUpdateAutoScaleConfigurationMockTests.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.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.AutoscaleSchedule; -import com.azure.resourcemanager.hdinsight.models.AutoscaleTimeAndCapacity; -import com.azure.resourcemanager.hdinsight.models.DaysOfWeek; -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( - "dtvqe", - "rqctmxxdtdd", - RoleName.WORKERNODE, - new AutoscaleConfigurationUpdateParameter() - .withAutoscale( - new Autoscale() - .withCapacity( - new AutoscaleCapacity() - .withMinInstanceCount(1948227960) - .withMaxInstanceCount(1691518178)) - .withRecurrence( - new AutoscaleRecurrence() - .withTimeZone("tznapxbannovv") - .withSchedule( - Arrays - .asList( - new AutoscaleSchedule() - .withDays( - Arrays - .asList( - DaysOfWeek.FRIDAY, - DaysOfWeek.SATURDAY, - DaysOfWeek.SATURDAY)) - .withTimeAndCapacity(new AutoscaleTimeAndCapacity()), - new AutoscaleSchedule() - .withDays( - Arrays - .asList( - DaysOfWeek.WEDNESDAY, - DaysOfWeek.SUNDAY, - DaysOfWeek.MONDAY, - DaysOfWeek.SATURDAY)) - .withTimeAndCapacity(new AutoscaleTimeAndCapacity()))))), - com.azure.core.util.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 0511cbbde988..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ComputeIsolationPropertiesTests.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.ComputeIsolationProperties; -import org.junit.jupiter.api.Assertions; - -public final class ComputeIsolationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeIsolationProperties model = - BinaryData - .fromString("{\"enableComputeIsolation\":false,\"hostSku\":\"nrjawgqwg\"}") - .toObject(ComputeIsolationProperties.class); - Assertions.assertEquals(false, model.enableComputeIsolation()); - Assertions.assertEquals("nrjawgqwg", model.hostSku()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeIsolationProperties model = - new ComputeIsolationProperties().withEnableComputeIsolation(false).withHostSku("nrjawgqwg"); - model = BinaryData.fromObject(model).toObject(ComputeIsolationProperties.class); - Assertions.assertEquals(false, model.enableComputeIsolation()); - Assertions.assertEquals("nrjawgqwg", model.hostSku()); - } -} 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 887380017cde..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsGetWithResponseMockTests.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.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 = "{\"ikjcjcazt\":\"kkum\",\"comlikytwvczc\":\"wsnsqowx\",\"ve\":\"wka\"}"; - - 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("rhpw", "gddeimaw", "o", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("kkum", response.get("ikjcjcazt")); - } -} 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 68fe301d6cf8..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsListWithResponseMockTests.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.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\":{\"uvqejosovyrrle\":{\"pedwqsl\":\"whqjjyslurlpshhk\",\"ndcbrwi\":\"rhmpqvwwsk\"}}}"; - - 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("plkeuachtomflryt", "wfpfmdgycx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("whqjjyslurlpshhk", response.configurations().get("uvqejosovyrrle").get("pedwqsl")); - } -} 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 7b566a404b57..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConfigurationsUpdateMockTests.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.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( - "esi", - "uqtljqobbpih", - "hcecybmrqbr", - mapOf("s", "bmpxdlvykfrexc", "xog", "qwjksghudgz", "rkmdyom", "ggsvoujkxibdaf", "dy", "xfbvfb"), - com.azure.core.util.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 a43c2b1a77f3..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ConnectivityEndpointTests.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.models.ConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class ConnectivityEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectivityEndpoint model = - BinaryData - .fromString( - "{\"name\":\"vasrruvwb\",\"protocol\":\"qfsubcgjbirx\",\"location\":\"ybsrfbjfdtwss\",\"port\":772106102,\"privateIPAddress\":\"pvjzbe\"}") - .toObject(ConnectivityEndpoint.class); - Assertions.assertEquals("vasrruvwb", model.name()); - Assertions.assertEquals("qfsubcgjbirx", model.protocol()); - Assertions.assertEquals("ybsrfbjfdtwss", model.location()); - Assertions.assertEquals(772106102, model.port()); - Assertions.assertEquals("pvjzbe", model.privateIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectivityEndpoint model = - new ConnectivityEndpoint() - .withName("vasrruvwb") - .withProtocol("qfsubcgjbirx") - .withLocation("ybsrfbjfdtwss") - .withPort(772106102) - .withPrivateIpAddress("pvjzbe"); - model = BinaryData.fromObject(model).toObject(ConnectivityEndpoint.class); - Assertions.assertEquals("vasrruvwb", model.name()); - Assertions.assertEquals("qfsubcgjbirx", model.protocol()); - Assertions.assertEquals("ybsrfbjfdtwss", model.location()); - Assertions.assertEquals(772106102, model.port()); - Assertions.assertEquals("pvjzbe", 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 a6793674be90..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DataDisksGroupsTests.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.DataDisksGroups; -import org.junit.jupiter.api.Assertions; - -public final class DataDisksGroupsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataDisksGroups model = - BinaryData - .fromString("{\"disksPerNode\":1173289641,\"storageAccountType\":\"qyud\",\"diskSizeGB\":2120884016}") - .toObject(DataDisksGroups.class); - Assertions.assertEquals(1173289641, model.disksPerNode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataDisksGroups model = new DataDisksGroups().withDisksPerNode(1173289641); - model = BinaryData.fromObject(model).toObject(DataDisksGroups.class); - Assertions.assertEquals(1173289641, 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 749caf8d2a97..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DimensionTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Dimension; -import org.junit.jupiter.api.Assertions; - -public final class DimensionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dimension model = - BinaryData - .fromString( - "{\"name\":\"gg\",\"displayName\":\"pijrajcivmmghf\",\"internalName\":\"iwrxgkn\",\"toBeExportedForShoebox\":false}") - .toObject(Dimension.class); - Assertions.assertEquals("gg", model.name()); - Assertions.assertEquals("pijrajcivmmghf", model.displayName()); - Assertions.assertEquals("iwrxgkn", model.internalName()); - Assertions.assertEquals(false, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dimension model = - new Dimension() - .withName("gg") - .withDisplayName("pijrajcivmmghf") - .withInternalName("iwrxgkn") - .withToBeExportedForShoebox(false); - model = BinaryData.fromObject(model).toObject(Dimension.class); - Assertions.assertEquals("gg", model.name()); - Assertions.assertEquals("pijrajcivmmghf", model.displayName()); - Assertions.assertEquals("iwrxgkn", 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 b0a0b313505a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/DiskBillingMetersTests.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.DiskBillingMeters; -import com.azure.resourcemanager.hdinsight.models.Tier; -import org.junit.jupiter.api.Assertions; - -public final class DiskBillingMetersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskBillingMeters model = - BinaryData - .fromString("{\"diskRpMeter\":\"ydfce\",\"sku\":\"vlhv\",\"tier\":\"Premium\"}") - .toObject(DiskBillingMeters.class); - Assertions.assertEquals("ydfce", model.diskRpMeter()); - Assertions.assertEquals("vlhv", model.sku()); - Assertions.assertEquals(Tier.PREMIUM, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskBillingMeters model = - new DiskBillingMeters().withDiskRpMeter("ydfce").withSku("vlhv").withTier(Tier.PREMIUM); - model = BinaryData.fromObject(model).toObject(DiskBillingMeters.class); - Assertions.assertEquals("ydfce", model.diskRpMeter()); - Assertions.assertEquals("vlhv", 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 7dd7f58135d7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/EncryptionInTransitPropertiesTests.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.EncryptionInTransitProperties; -import org.junit.jupiter.api.Assertions; - -public final class EncryptionInTransitPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EncryptionInTransitProperties model = - BinaryData - .fromString("{\"isEncryptionInTransitEnabled\":false}") - .toObject(EncryptionInTransitProperties.class); - Assertions.assertEquals(false, model.isEncryptionInTransitEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - 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 ff13e5db6b54..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExcludedServicesConfigTests.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.ExcludedServicesConfig; -import org.junit.jupiter.api.Assertions; - -public final class ExcludedServicesConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExcludedServicesConfig model = - BinaryData - .fromString("{\"excludedServicesConfigId\":\"l\",\"excludedServicesList\":\"nfqqnvwp\"}") - .toObject(ExcludedServicesConfig.class); - Assertions.assertEquals("l", model.excludedServicesConfigId()); - Assertions.assertEquals("nfqqnvwp", model.excludedServicesList()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExcludedServicesConfig model = - new ExcludedServicesConfig().withExcludedServicesConfigId("l").withExcludedServicesList("nfqqnvwp"); - model = BinaryData.fromObject(model).toObject(ExcludedServicesConfig.class); - Assertions.assertEquals("l", model.excludedServicesConfigId()); - Assertions.assertEquals("nfqqnvwp", 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 30067ee42231..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExecuteScriptActionParametersTests.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.ExecuteScriptActionParameters; -import com.azure.resourcemanager.hdinsight.models.RuntimeScriptAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExecuteScriptActionParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExecuteScriptActionParameters model = - BinaryData - .fromString( - "{\"scriptActions\":[{\"name\":\"ddjib\",\"uri\":\"bxv\",\"parameters\":\"itvtzeexavo\",\"roles\":[\"fglecdmdqbwp\",\"pqtgsfjac\"],\"applicationName\":\"lhhxudbxvodhtnsi\"},{\"name\":\"ud\",\"uri\":\"z\",\"parameters\":\"es\",\"roles\":[\"dlpagzrcxfail\",\"f\"],\"applicationName\":\"m\"}],\"persistOnSuccess\":true}") - .toObject(ExecuteScriptActionParameters.class); - Assertions.assertEquals("ddjib", model.scriptActions().get(0).name()); - Assertions.assertEquals("bxv", model.scriptActions().get(0).uri()); - Assertions.assertEquals("itvtzeexavo", model.scriptActions().get(0).parameters()); - Assertions.assertEquals("fglecdmdqbwp", model.scriptActions().get(0).roles().get(0)); - Assertions.assertEquals(true, model.persistOnSuccess()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExecuteScriptActionParameters model = - new ExecuteScriptActionParameters() - .withScriptActions( - Arrays - .asList( - new RuntimeScriptAction() - .withName("ddjib") - .withUri("bxv") - .withParameters("itvtzeexavo") - .withRoles(Arrays.asList("fglecdmdqbwp", "pqtgsfjac")), - new RuntimeScriptAction() - .withName("ud") - .withUri("z") - .withParameters("es") - .withRoles(Arrays.asList("dlpagzrcxfail", "f")))) - .withPersistOnSuccess(true); - model = BinaryData.fromObject(model).toObject(ExecuteScriptActionParameters.class); - Assertions.assertEquals("ddjib", model.scriptActions().get(0).name()); - Assertions.assertEquals("bxv", model.scriptActions().get(0).uri()); - Assertions.assertEquals("itvtzeexavo", model.scriptActions().get(0).parameters()); - Assertions.assertEquals("fglecdmdqbwp", 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 ab15ce1941e9..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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("myqwcab", "nuilee", "aswlp", com.azure.core.util.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 ca9579ebf369..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableAzureMonitorMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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("gygqwah", "iul", com.azure.core.util.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 bb3ac0f526cc..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsDisableMonitoringMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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("klelssxb", "ycsxzu", com.azure.core.util.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 1b25a6d92b77..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetAzureMonitorStatusWithResponseMockTests.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.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\":\"khvuhxepmrutz\",\"selectedConfigurations\":{\"configurationVersion\":\"aobn\",\"globalConfigurations\":{\"ywart\":\"jdjltymkmvgui\",\"j\":\"pphkixkykxds\",\"kkflrmymyincqlhr\":\"emmucfxh\"},\"tableList\":[{\"name\":\"lmiiiovg\"},{\"name\":\"gxuugqkctotio\"},{\"name\":\"xteqdptjgwdtg\"},{\"name\":\"ranblwphqlkccu\"}]}}"; - - 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("fsxzecp", "xw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.clusterMonitoringEnabled()); - Assertions.assertEquals("khvuhxepmrutz", response.workspaceId()); - Assertions.assertEquals("aobn", response.selectedConfigurations().configurationVersion()); - Assertions.assertEquals("jdjltymkmvgui", response.selectedConfigurations().globalConfigurations().get("ywart")); - Assertions.assertEquals("lmiiiovg", response.selectedConfigurations().tableList().get(0).name()); - } -} 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 cffead9eba0d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetMonitoringStatusWithResponseMockTests.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.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\":true,\"workspaceId\":\"eeczgfbu\"}"; - - 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("sggux", "eml", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.clusterMonitoringEnabled()); - Assertions.assertEquals("eeczgfbu", 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 082d0f6655c7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ExtensionsGetWithResponseMockTests.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.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\":\"ljvrcmyfqipgxhnp\"}"; - - 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("yzqedikdfrd", "iqmrjgeihfqlggw", "iwzcxmjpbyeph", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.clusterMonitoringEnabled()); - Assertions.assertEquals("ljvrcmyfqipgxhnp", 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 ede667fa5396..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/HardwareProfileTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.HardwareProfile; -import org.junit.jupiter.api.Assertions; - -public final class HardwareProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HardwareProfile model = BinaryData.fromString("{\"vmSize\":\"trpmo\"}").toObject(HardwareProfile.class); - Assertions.assertEquals("trpmo", model.vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HardwareProfile model = new HardwareProfile().withVmSize("trpmo"); - model = BinaryData.fromObject(model).toObject(HardwareProfile.class); - Assertions.assertEquals("trpmo", 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 eb774dc213ff..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationPropertiesTests.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.IpConfigurationProperties; -import com.azure.resourcemanager.hdinsight.models.PrivateIpAllocationMethod; -import com.azure.resourcemanager.hdinsight.models.ResourceId; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfigurationProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Deleting\",\"primary\":false,\"privateIPAddress\":\"yq\",\"privateIPAllocationMethod\":\"dynamic\",\"subnet\":{\"id\":\"j\"}}") - .toObject(IpConfigurationProperties.class); - Assertions.assertEquals(false, model.primary()); - Assertions.assertEquals("yq", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.DYNAMIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("j", model.subnet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfigurationProperties model = - new IpConfigurationProperties() - .withPrimary(false) - .withPrivateIpAddress("yq") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.DYNAMIC) - .withSubnet(new ResourceId().withId("j")); - model = BinaryData.fromObject(model).toObject(IpConfigurationProperties.class); - Assertions.assertEquals(false, model.primary()); - Assertions.assertEquals("yq", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.DYNAMIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("j", 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 33529cd34830..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/IpConfigurationTests.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.PrivateIpAllocationMethod; -import com.azure.resourcemanager.hdinsight.models.ResourceId; -import org.junit.jupiter.api.Assertions; - -public final class IpConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpConfiguration model = - BinaryData - .fromString( - "{\"id\":\"tvfcivfsn\",\"name\":\"ymuctqhjfbebrj\",\"type\":\"erfuwuttt\",\"properties\":{\"provisioningState\":\"Failed\",\"primary\":true,\"privateIPAddress\":\"rp\",\"privateIPAllocationMethod\":\"static\",\"subnet\":{\"id\":\"yva\"}}}") - .toObject(IpConfiguration.class); - Assertions.assertEquals("ymuctqhjfbebrj", model.name()); - Assertions.assertEquals(true, model.primary()); - Assertions.assertEquals("rp", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("yva", model.subnet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpConfiguration model = - new IpConfiguration() - .withName("ymuctqhjfbebrj") - .withPrimary(true) - .withPrivateIpAddress("rp") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.STATIC) - .withSubnet(new ResourceId().withId("yva")); - model = BinaryData.fromObject(model).toObject(IpConfiguration.class); - Assertions.assertEquals("ymuctqhjfbebrj", model.name()); - Assertions.assertEquals(true, model.primary()); - Assertions.assertEquals("rp", model.privateIpAddress()); - Assertions.assertEquals(PrivateIpAllocationMethod.STATIC, model.privateIpAllocationMethod()); - Assertions.assertEquals("yva", 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 3fdc4b566761..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/KafkaRestPropertiesTests.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.ClientGroupInfo; -import com.azure.resourcemanager.hdinsight.models.KafkaRestProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KafkaRestPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KafkaRestProperties model = - BinaryData - .fromString( - "{\"clientGroupInfo\":{\"groupName\":\"sbj\",\"groupId\":\"zq\"},\"configurationOverride\":{\"jidsuyonobglaoc\":\"ywpmueefjzwfqkq\",\"udxytlmoyrx\":\"xtccmg\",\"qj\":\"wfudwpzntxhdzhl\",\"bkyvp\":\"hckfrlhrx\"}}") - .toObject(KafkaRestProperties.class); - Assertions.assertEquals("sbj", model.clientGroupInfo().groupName()); - Assertions.assertEquals("zq", model.clientGroupInfo().groupId()); - Assertions.assertEquals("ywpmueefjzwfqkq", model.configurationOverride().get("jidsuyonobglaoc")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KafkaRestProperties model = - new KafkaRestProperties() - .withClientGroupInfo(new ClientGroupInfo().withGroupName("sbj").withGroupId("zq")) - .withConfigurationOverride( - mapOf( - "jidsuyonobglaoc", - "ywpmueefjzwfqkq", - "udxytlmoyrx", - "xtccmg", - "qj", - "wfudwpzntxhdzhl", - "bkyvp", - "hckfrlhrx")); - model = BinaryData.fromObject(model).toObject(KafkaRestProperties.class); - Assertions.assertEquals("sbj", model.clientGroupInfo().groupName()); - Assertions.assertEquals("zq", model.clientGroupInfo().groupId()); - Assertions.assertEquals("ywpmueefjzwfqkq", model.configurationOverride().get("jidsuyonobglaoc")); - } - - @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 74d83b380bf5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocalizedNameTests.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.LocalizedName; -import org.junit.jupiter.api.Assertions; - -public final class LocalizedNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LocalizedName model = - BinaryData - .fromString("{\"value\":\"wtl\",\"localizedValue\":\"guxawqaldsyuuxi\"}") - .toObject(LocalizedName.class); - Assertions.assertEquals("wtl", model.value()); - Assertions.assertEquals("guxawqaldsyuuxi", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LocalizedName model = new LocalizedName().withValue("wtl").withLocalizedValue("guxawqaldsyuuxi"); - model = BinaryData.fromObject(model).toObject(LocalizedName.class); - Assertions.assertEquals("wtl", model.value()); - Assertions.assertEquals("guxawqaldsyuuxi", 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 4c5301dee9c4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsCheckNameAvailabilityWithResponseMockTests.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.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\":true,\"reason\":\"jszlb\",\"message\":\"mnlzijiufehgmvf\"}"; - - 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( - "co", - new NameAvailabilityCheckRequestParameters().withName("i").withType("s"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, 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 f7119f85949f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsGetCapabilitiesWithResponseMockTests.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.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\":{\"vxnqmhrpqpd\":{\"available\":[{\"friendlyName\":\"mguaml\",\"displayName\":\"l\",\"isDefault\":true,\"componentVersions\":{\"nxkympqanxrjk\":\"lzgaufcshhvnew\",\"ypnyghshxc\":\"xtwbta\",\"ycphdrwjjkhvyo\":\"lhkgmnsghp\",\"u\":\"ac\"}}]},\"opedbwdpyqyybxub\":{\"available\":[{\"friendlyName\":\"oi\",\"displayName\":\"css\",\"isDefault\":true,\"componentVersions\":{\"zr\":\"fmcsypobkd\",\"czzydmxzjij\":\"zsylollgt\",\"hci\":\"vuaurk\",\"kkjanurnnqbnqbp\":\"ldefxrdcoxn\"}},{\"friendlyName\":\"xqltgrd\",\"displayName\":\"ypxrx\",\"isDefault\":false,\"componentVersions\":{\"ctafsrbxrblm\":\"wuh\",\"spnxwqagnepzw\":\"iowxi\",\"rxaomzisglrrcze\":\"klsbsbqqqagw\"}},{\"friendlyName\":\"hhltnjadhqo\",\"displayName\":\"jqoyueayfbpcm\",\"isDefault\":false,\"componentVersions\":{\"mbscbbx\":\"rrueqthwmg\",\"d\":\"gdhxi\"}}]},\"qvapcohhoucq\":{\"available\":[{\"friendlyName\":\"fcbqwremjela\",\"displayName\":\"cigeleohdbvqvw\",\"isDefault\":true,\"componentVersions\":{\"x\":\"wbeonrlkwzdqy\",\"seqchkrt\":\"eakxcptsoqfyi\"}},{\"friendlyName\":\"razisg\",\"displayName\":\"iuemvanbwzohmnr\",\"isDefault\":false,\"componentVersions\":{\"dptysprqs\":\"jklinh\",\"fiqwoy\":\"nzxojpslsvjgpli\"}}]}},\"regions\":{\"tjzmi\":{\"available\":[\"cxzrzdcgdzben\",\"ibcawetzqddtjw\",\"ljhznamtuatmzwcj\",\"nc\"]}},\"features\":[\"bgatzu\",\"vbxngr\",\"bwggahtt\"],\"quota\":{\"coresUsed\":5012267039710812753,\"maxCoresAllowed\":8685578675388239679,\"regionalQuotas\":[{\"regionName\":\"lx\",\"coresUsed\":8142650207393641540,\"coresAvailable\":9197287039568468333},{\"regionName\":\"wqrjzfrg\",\"coresUsed\":1666719420079000960,\"coresAvailable\":6972744056743819269},{\"regionName\":\"uocnjrohmbpyr\",\"coresUsed\":3555567142611740957,\"coresAvailable\":8489336253229945435},{\"regionName\":\"dyvkfkmr\",\"coresUsed\":2786568529817022163,\"coresAvailable\":5427029931191366862}]}}"; - - 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("gyeewxeiq", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("mguaml", response.versions().get("vxnqmhrpqpd").available().get(0).friendlyName()); - Assertions.assertEquals("l", response.versions().get("vxnqmhrpqpd").available().get(0).displayName()); - Assertions.assertEquals(true, response.versions().get("vxnqmhrpqpd").available().get(0).isDefault()); - Assertions - .assertEquals( - "lzgaufcshhvnew", - response.versions().get("vxnqmhrpqpd").available().get(0).componentVersions().get("nxkympqanxrjk")); - Assertions.assertEquals("cxzrzdcgdzben", response.regions().get("tjzmi").available().get(0)); - Assertions.assertEquals("bgatzu", 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 12adcd26ce8e..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/LocationsListBillingSpecsWithResponseMockTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.BillingResponseListResult; -import com.azure.resourcemanager.hdinsight.models.FilterMode; -import com.azure.resourcemanager.hdinsight.models.OSType; -import com.azure.resourcemanager.hdinsight.models.Tier; -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\":[\"qofu\",\"o\",\"mjnlexwhcb\",\"pibkephuu\"],\"vmSizesWithEncryptionAtHost\":[\"ctatoyintqpbrlcy\",\"duczkgof\"],\"vmSizeFilters\":[{\"filterMode\":\"Default\",\"regions\":[\"vcrrpcj\",\"tbstvjeaqnrmv\"],\"clusterFlavors\":[\"oxmlghktuidv\",\"ma\"],\"nodeTypes\":[\"dwwexymz\",\"lazipbhpwvq\",\"gnyyuuzivens\",\"pmeyyvpkpatlbijp\"],\"clusterVersions\":[\"ksrf\",\"fvolmknbnxwcd\",\"mmpvf\",\"awz\"],\"osType\":[\"Linux\",\"Linux\",\"Linux\"],\"vmSizes\":[\"aclkiexhajlfnt\"],\"espApplied\":\"qfyuttd\",\"computeIsolationSupported\":\"gbpvnwswmtxkyct\"},{\"filterMode\":\"Exclude\",\"regions\":[\"xjlme\",\"vogygzyvneez\"],\"clusterFlavors\":[\"gh\"],\"nodeTypes\":[\"qqtlffhzbkrkj\",\"javfqn\"],\"clusterVersions\":[\"qoewdogiyetesy\"],\"osType\":[\"Linux\"],\"vmSizes\":[\"tjhqtfbov\",\"ynkbwetnju\",\"p\",\"prkzya\"],\"espApplied\":\"ia\",\"computeIsolationSupported\":\"xnafbw\"}],\"vmSizeProperties\":[{\"name\":\"htuov\",\"cores\":1434320553,\"dataDiskStorageTier\":\"urjtumghi\",\"label\":\"ve\",\"maxDataDiskCount\":7254614454357001353,\"memoryInMb\":2403764896790744974,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":1273828074911332298,\"webWorkerResourceDiskSizeInMb\":8653084665379016179},{\"name\":\"c\",\"cores\":135332220,\"dataDiskStorageTier\":\"igctmgxuupbezq\",\"label\":\"ydrtc\",\"maxDataDiskCount\":1496049981033669629,\"memoryInMb\":8021032797802122376,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":7053269008494904369,\"webWorkerResourceDiskSizeInMb\":2780215016703800620},{\"name\":\"zgwldoychillcec\",\"cores\":635676325,\"dataDiskStorageTier\":\"waoaguhi\",\"label\":\"llizs\",\"maxDataDiskCount\":400434529308100032,\"memoryInMb\":7393336772515537022,\"supportedByVirtualMachines\":false,\"supportedByWebWorkerRoles\":false,\"virtualMachineResourceDiskSizeInMb\":4597216834587372076,\"webWorkerResourceDiskSizeInMb\":5869518151221469081},{\"name\":\"mvss\",\"cores\":588995306,\"dataDiskStorageTier\":\"pwamcxtczhupeuk\",\"label\":\"jduyyespydjfb\",\"maxDataDiskCount\":1780485105080144297,\"memoryInMb\":6661930398442284318,\"supportedByVirtualMachines\":false,\"supportedByWebWorkerRoles\":false,\"virtualMachineResourceDiskSizeInMb\":8174454096048951349,\"webWorkerResourceDiskSizeInMb\":6365508061248772536}],\"billingResources\":[{\"region\":\"uflgbhgauacdixm\",\"billingMeters\":[{\"meterParameter\":\"sryjqgdkfno\",\"meter\":\"eoqbvjhvefgwbmqj\",\"unit\":\"ntasfaymxbu\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"albmqkyojwyvfk\",\"sku\":\"tsu\",\"tier\":\"Premium\"},{\"diskRpMeter\":\"gxjc\",\"sku\":\"zrrscub\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"rnpxqwodiffjx\",\"sku\":\"rmmuabwibvjo\",\"tier\":\"Premium\"}]},{\"region\":\"mcyefoyzbam\",\"billingMeters\":[{\"meterParameter\":\"ofvfkakpoldtve\",\"meter\":\"oclzhz\",\"unit\":\"n\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"vt\",\"sku\":\"pnrupzaamrdi\",\"tier\":\"Premium\"},{\"diskRpMeter\":\"kidswys\",\"sku\":\"ruffgllukk\",\"tier\":\"Premium\"}]},{\"region\":\"xhrp\",\"billingMeters\":[{\"meterParameter\":\"blcouqehbhbcdszi\",\"meter\":\"randoypmb\",\"unit\":\"oormkfqlwxldyka\"},{\"meterParameter\":\"ygaolnjpnnb\",\"meter\":\"ksibjgsjjxx\",\"unit\":\"mr\"},{\"meterParameter\":\"dzyqe\",\"meter\":\"yi\",\"unit\":\"inbmh\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"jkgqxnhmbkez\",\"sku\":\"aujvaa\",\"tier\":\"Premium\"},{\"diskRpMeter\":\"iycwkdta\",\"sku\":\"xw\",\"tier\":\"Standard\"},{\"diskRpMeter\":\"umrrqmbzm\",\"sku\":\"ratbnxwbjs\",\"tier\":\"Premium\"},{\"diskRpMeter\":\"rkfpks\",\"sku\":\"dgo\",\"tier\":\"Standard\"}]},{\"region\":\"jymrhbg\",\"billingMeters\":[{\"meterParameter\":\"kyewnfnzhhhqo\",\"meter\":\"ffjkutycyarnroo\",\"unit\":\"uabzoghkt\"},{\"meterParameter\":\"yczhco\",\"meter\":\"cnhz\",\"unit\":\"ot\"},{\"meterParameter\":\"zcfyjzptwrl\",\"meter\":\"apqinf\",\"unit\":\"pyglqdhmrjzral\"}],\"diskBillingMeters\":[{\"diskRpMeter\":\"byypsjoqcjenky\",\"sku\":\"qzvs\",\"tier\":\"Standard\"}]}]}"; - - 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("uygdhgaqipirp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qofu", response.vmSizes().get(0)); - Assertions.assertEquals("ctatoyintqpbrlcy", response.vmSizesWithEncryptionAtHost().get(0)); - Assertions.assertEquals(FilterMode.DEFAULT, response.vmSizeFilters().get(0).filterMode()); - Assertions.assertEquals("vcrrpcj", response.vmSizeFilters().get(0).regions().get(0)); - Assertions.assertEquals("oxmlghktuidv", response.vmSizeFilters().get(0).clusterFlavors().get(0)); - Assertions.assertEquals("dwwexymz", response.vmSizeFilters().get(0).nodeTypes().get(0)); - Assertions.assertEquals("ksrf", response.vmSizeFilters().get(0).clusterVersions().get(0)); - Assertions.assertEquals(OSType.LINUX, response.vmSizeFilters().get(0).osType().get(0)); - Assertions.assertEquals("aclkiexhajlfnt", response.vmSizeFilters().get(0).vmSizes().get(0)); - Assertions.assertEquals("qfyuttd", response.vmSizeFilters().get(0).espApplied()); - Assertions.assertEquals("gbpvnwswmtxkyct", response.vmSizeFilters().get(0).computeIsolationSupported()); - Assertions.assertEquals("uflgbhgauacdixm", response.billingResources().get(0).region()); - Assertions - .assertEquals("sryjqgdkfno", response.billingResources().get(0).billingMeters().get(0).meterParameter()); - Assertions.assertEquals("eoqbvjhvefgwbmqj", response.billingResources().get(0).billingMeters().get(0).meter()); - Assertions.assertEquals("ntasfaymxbu", response.billingResources().get(0).billingMeters().get(0).unit()); - Assertions - .assertEquals( - "albmqkyojwyvfk", response.billingResources().get(0).diskBillingMeters().get(0).diskRpMeter()); - Assertions.assertEquals("tsu", response.billingResources().get(0).diskBillingMeters().get(0).sku()); - Assertions.assertEquals(Tier.PREMIUM, response.billingResources().get(0).diskBillingMeters().get(0).tier()); - } -} 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 c0b47c5a51e9..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.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\":\"fpyapucygvoavyu\",\"currentValue\":4220620654261523088,\"limit\":5180733958170755116,\"name\":{\"value\":\"egjlgvvpa\",\"localizedValue\":\"ksgbuxan\"}}]}"; - - 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("sm", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("fpyapucygvoavyu", response.value().get(0).unit()); - Assertions.assertEquals(4220620654261523088L, response.value().get(0).currentValue()); - Assertions.assertEquals(5180733958170755116L, 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 ccc5dd2fed85..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/MetricSpecificationsTests.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class MetricSpecificationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricSpecifications model = - BinaryData - .fromString( - "{\"name\":\"g\",\"displayName\":\"joxslhvnhla\",\"displayDescription\":\"q\",\"unit\":\"kzjcjbtrgae\",\"aggregationType\":\"vibr\",\"supportedAggregationTypes\":[\"s\"],\"supportedTimeGrainTypes\":[\"beitpkx\",\"tmo\",\"bklftidgfcwqmpim\",\"qxzhem\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"hujswtwkozzwcul\",\"sourceMdmNamespace\":\"awpfajnjwltlwtjj\",\"metricFilterPattern\":\"ktalhsnvkcdmxz\",\"fillGapWithZero\":false,\"category\":\"imlnwiaaomylw\",\"resourceIdDimensionNameOverride\":\"z\",\"isInternal\":false,\"delegateMetricNameOverride\":\"ethwwnpjhlfz\",\"dimensions\":[{\"name\":\"hwahfbousn\",\"displayName\":\"pgfewetwlyx\",\"internalName\":\"cxy\",\"toBeExportedForShoebox\":true},{\"name\":\"jhlimmbcxfhbcpo\",\"displayName\":\"vxcjzhqizxfpxtgq\",\"internalName\":\"javftjuhdqa\",\"toBeExportedForShoebox\":false}]}") - .toObject(MetricSpecifications.class); - Assertions.assertEquals("g", model.name()); - Assertions.assertEquals("joxslhvnhla", model.displayName()); - Assertions.assertEquals("q", model.displayDescription()); - Assertions.assertEquals("kzjcjbtrgae", model.unit()); - Assertions.assertEquals("vibr", model.aggregationType()); - Assertions.assertEquals("s", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("beitpkx", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("hujswtwkozzwcul", model.sourceMdmAccount()); - Assertions.assertEquals("awpfajnjwltlwtjj", model.sourceMdmNamespace()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.metricFilterPattern()); - Assertions.assertEquals(false, model.fillGapWithZero()); - Assertions.assertEquals("imlnwiaaomylw", model.category()); - Assertions.assertEquals("z", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.isInternal()); - Assertions.assertEquals("ethwwnpjhlfz", model.delegateMetricNameOverride()); - Assertions.assertEquals("hwahfbousn", model.dimensions().get(0).name()); - Assertions.assertEquals("pgfewetwlyx", model.dimensions().get(0).displayName()); - Assertions.assertEquals("cxy", model.dimensions().get(0).internalName()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricSpecifications model = - new MetricSpecifications() - .withName("g") - .withDisplayName("joxslhvnhla") - .withDisplayDescription("q") - .withUnit("kzjcjbtrgae") - .withAggregationType("vibr") - .withSupportedAggregationTypes(Arrays.asList("s")) - .withSupportedTimeGrainTypes(Arrays.asList("beitpkx", "tmo", "bklftidgfcwqmpim", "qxzhem")) - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("hujswtwkozzwcul") - .withSourceMdmNamespace("awpfajnjwltlwtjj") - .withMetricFilterPattern("ktalhsnvkcdmxz") - .withFillGapWithZero(false) - .withCategory("imlnwiaaomylw") - .withResourceIdDimensionNameOverride("z") - .withIsInternal(false) - .withDelegateMetricNameOverride("ethwwnpjhlfz") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("hwahfbousn") - .withDisplayName("pgfewetwlyx") - .withInternalName("cxy") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("jhlimmbcxfhbcpo") - .withDisplayName("vxcjzhqizxfpxtgq") - .withInternalName("javftjuhdqa") - .withToBeExportedForShoebox(false))); - model = BinaryData.fromObject(model).toObject(MetricSpecifications.class); - Assertions.assertEquals("g", model.name()); - Assertions.assertEquals("joxslhvnhla", model.displayName()); - Assertions.assertEquals("q", model.displayDescription()); - Assertions.assertEquals("kzjcjbtrgae", model.unit()); - Assertions.assertEquals("vibr", model.aggregationType()); - Assertions.assertEquals("s", model.supportedAggregationTypes().get(0)); - Assertions.assertEquals("beitpkx", model.supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("hujswtwkozzwcul", model.sourceMdmAccount()); - Assertions.assertEquals("awpfajnjwltlwtjj", model.sourceMdmNamespace()); - Assertions.assertEquals("ktalhsnvkcdmxz", model.metricFilterPattern()); - Assertions.assertEquals(false, model.fillGapWithZero()); - Assertions.assertEquals("imlnwiaaomylw", model.category()); - Assertions.assertEquals("z", model.resourceIdDimensionNameOverride()); - Assertions.assertEquals(false, model.isInternal()); - Assertions.assertEquals("ethwwnpjhlfz", model.delegateMetricNameOverride()); - Assertions.assertEquals("hwahfbousn", model.dimensions().get(0).name()); - Assertions.assertEquals("pgfewetwlyx", model.dimensions().get(0).displayName()); - Assertions.assertEquals("cxy", 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 88e1da34d1d6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckRequestParametersTests.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.NameAvailabilityCheckRequestParameters; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityCheckRequestParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityCheckRequestParameters model = - BinaryData - .fromString("{\"name\":\"ftumrtwnawjslbiw\",\"type\":\"jgcyztsfmznba\"}") - .toObject(NameAvailabilityCheckRequestParameters.class); - Assertions.assertEquals("ftumrtwnawjslbiw", model.name()); - Assertions.assertEquals("jgcyztsfmznba", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityCheckRequestParameters model = - new NameAvailabilityCheckRequestParameters().withName("ftumrtwnawjslbiw").withType("jgcyztsfmznba"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityCheckRequestParameters.class); - Assertions.assertEquals("ftumrtwnawjslbiw", model.name()); - Assertions.assertEquals("jgcyztsfmznba", 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 17d300468ec7..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NameAvailabilityCheckResultInnerTests.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.fluent.models.NameAvailabilityCheckResultInner; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityCheckResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityCheckResultInner model = - BinaryData - .fromString("{\"nameAvailable\":false,\"reason\":\"chqnrnrpxehuwry\",\"message\":\"gaifmvik\"}") - .toObject(NameAvailabilityCheckResultInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - 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 4b8219c30973..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/NetworkPropertiesTests.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.NetworkProperties; -import com.azure.resourcemanager.hdinsight.models.PrivateLink; -import com.azure.resourcemanager.hdinsight.models.ResourceProviderConnection; -import org.junit.jupiter.api.Assertions; - -public final class NetworkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NetworkProperties model = - BinaryData - .fromString("{\"resourceProviderConnection\":\"Inbound\",\"privateLink\":\"Disabled\"}") - .toObject(NetworkProperties.class); - Assertions.assertEquals(ResourceProviderConnection.INBOUND, model.resourceProviderConnection()); - Assertions.assertEquals(PrivateLink.DISABLED, model.privateLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - 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 f553b5911e69..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"hrnxrxc\",\"resource\":\"uisavokq\",\"operation\":\"fvazivjlfrqttba\",\"description\":\"katnwxyi\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("hrnxrxc", model.provider()); - Assertions.assertEquals("uisavokq", model.resource()); - Assertions.assertEquals("fvazivjlfrqttba", model.operation()); - Assertions.assertEquals("katnwxyi", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("hrnxrxc") - .withResource("uisavokq") - .withOperation("fvazivjlfrqttba") - .withDescription("katnwxyi"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("hrnxrxc", model.provider()); - Assertions.assertEquals("uisavokq", model.resource()); - Assertions.assertEquals("fvazivjlfrqttba", model.operation()); - Assertions.assertEquals("katnwxyi", 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 2722087e820d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationInnerTests.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (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.Dimension; -import com.azure.resourcemanager.hdinsight.models.MetricSpecifications; -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; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"hvcyyysfg\",\"display\":{\"provider\":\"cubiipuipw\",\"resource\":\"onmacjekniz\",\"operation\":\"qvci\",\"description\":\"ev\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"rilbywdx\",\"displayName\":\"icc\",\"displayDescription\":\"wfscjfn\",\"unit\":\"szqujizdvoq\",\"aggregationType\":\"ibyowbblgyavutp\",\"supportedAggregationTypes\":[\"oxoismsksbpim\",\"qolj\"],\"supportedTimeGrainTypes\":[\"gxxlxsffgcvizq\",\"dwl\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"oupfgfb\",\"sourceMdmNamespace\":\"ubdyhgk\",\"metricFilterPattern\":\"in\",\"fillGapWithZero\":true,\"category\":\"zfttsttktlahb\",\"resourceIdDimensionNameOverride\":\"ctxtgzukxi\",\"isInternal\":false,\"delegateMetricNameOverride\":\"tg\",\"dimensions\":[{}]}]}}}") - .toObject(OperationInner.class); - Assertions.assertEquals("hvcyyysfg", model.name()); - Assertions.assertEquals("cubiipuipw", model.display().provider()); - Assertions.assertEquals("onmacjekniz", model.display().resource()); - Assertions.assertEquals("qvci", model.display().operation()); - Assertions.assertEquals("ev", model.display().description()); - Assertions - .assertEquals("rilbywdx", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("icc", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "wfscjfn", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals( - "szqujizdvoq", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "ibyowbblgyavutp", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "oxoismsksbpim", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "gxxlxsffgcvizq", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - true, - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "oupfgfb", model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "ubdyhgk", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions - .assertEquals( - "in", model.properties().serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions - .assertEquals( - true, model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "zfttsttktlahb", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "ctxtgzukxi", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .resourceIdDimensionNameOverride()); - Assertions - .assertEquals(false, model.properties().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions - .assertEquals( - "tg", - model.properties().serviceSpecification().metricSpecifications().get(0).delegateMetricNameOverride()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("hvcyyysfg") - .withDisplay( - new OperationDisplay() - .withProvider("cubiipuipw") - .withResource("onmacjekniz") - .withOperation("qvci") - .withDescription("ev")) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications() - .withName("rilbywdx") - .withDisplayName("icc") - .withDisplayDescription("wfscjfn") - .withUnit("szqujizdvoq") - .withAggregationType("ibyowbblgyavutp") - .withSupportedAggregationTypes(Arrays.asList("oxoismsksbpim", "qolj")) - .withSupportedTimeGrainTypes(Arrays.asList("gxxlxsffgcvizq", "dwl")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("oupfgfb") - .withSourceMdmNamespace("ubdyhgk") - .withMetricFilterPattern("in") - .withFillGapWithZero(true) - .withCategory("zfttsttktlahb") - .withResourceIdDimensionNameOverride("ctxtgzukxi") - .withIsInternal(false) - .withDelegateMetricNameOverride("tg") - .withDimensions(Arrays.asList(new Dimension())))))); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("hvcyyysfg", model.name()); - Assertions.assertEquals("cubiipuipw", model.display().provider()); - Assertions.assertEquals("onmacjekniz", model.display().resource()); - Assertions.assertEquals("qvci", model.display().operation()); - Assertions.assertEquals("ev", model.display().description()); - Assertions - .assertEquals("rilbywdx", model.properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals("icc", model.properties().serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals( - "wfscjfn", - model.properties().serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals( - "szqujizdvoq", model.properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "ibyowbblgyavutp", - model.properties().serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "oxoismsksbpim", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "gxxlxsffgcvizq", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - true, - model.properties().serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals( - "oupfgfb", model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals( - "ubdyhgk", - model.properties().serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions - .assertEquals( - "in", model.properties().serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions - .assertEquals( - true, model.properties().serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions - .assertEquals( - "zfttsttktlahb", model.properties().serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "ctxtgzukxi", - model - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .resourceIdDimensionNameOverride()); - Assertions - .assertEquals(false, model.properties().serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions - .assertEquals( - "tg", - model.properties().serviceSpecification().metricSpecifications().get(0).delegateMetricNameOverride()); - } -} 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 bc6e3973b940..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationListResultTests.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (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.MetricSpecifications; -import com.azure.resourcemanager.hdinsight.models.OperationDisplay; -import com.azure.resourcemanager.hdinsight.models.OperationListResult; -import com.azure.resourcemanager.hdinsight.models.OperationProperties; -import com.azure.resourcemanager.hdinsight.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"cjznmwcpmg\",\"display\":{\"provider\":\"draufactkah\",\"resource\":\"v\",\"operation\":\"j\",\"description\":\"uxxpshne\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{}]}}},{\"name\":\"slqubkwdl\",\"display\":{\"provider\":\"d\",\"resource\":\"tujbazpju\",\"operation\":\"minyflnorwm\",\"description\":\"vwpklvxwmygdxp\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{},{},{}]}}},{\"name\":\"sze\",\"display\":{\"provider\":\"bjcrxgibbdaxco\",\"resource\":\"ozauorsukokwb\",\"operation\":\"lhlv\",\"description\":\"uepzl\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}]}}},{\"name\":\"oldweyuqdu\",\"display\":{\"provider\":\"nnrwrbiork\",\"resource\":\"lywjhh\",\"operation\":\"nhxmsi\",\"description\":\"omi\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{},{}]}}}],\"nextLink\":\"ufiqndieuzaof\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("cjznmwcpmg", model.value().get(0).name()); - Assertions.assertEquals("draufactkah", model.value().get(0).display().provider()); - Assertions.assertEquals("v", model.value().get(0).display().resource()); - Assertions.assertEquals("j", model.value().get(0).display().operation()); - Assertions.assertEquals("uxxpshne", model.value().get(0).display().description()); - Assertions.assertEquals("ufiqndieuzaof", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("cjznmwcpmg") - .withDisplay( - new OperationDisplay() - .withProvider("draufactkah") - .withResource("v") - .withOperation("j") - .withDescription("uxxpshne")) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications(), - new MetricSpecifications(), - new MetricSpecifications())))), - new OperationInner() - .withName("slqubkwdl") - .withDisplay( - new OperationDisplay() - .withProvider("d") - .withResource("tujbazpju") - .withOperation("minyflnorwm") - .withDescription("vwpklvxwmygdxp")) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications(), - new MetricSpecifications(), - new MetricSpecifications(), - new MetricSpecifications())))), - new OperationInner() - .withName("sze") - .withDisplay( - new OperationDisplay() - .withProvider("bjcrxgibbdaxco") - .withResource("ozauorsukokwb") - .withOperation("lhlv") - .withDescription("uepzl")) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications(), new MetricSpecifications())))), - new OperationInner() - .withName("oldweyuqdu") - .withDisplay( - new OperationDisplay() - .withProvider("nnrwrbiork") - .withResource("lywjhh") - .withOperation("nhxmsi") - .withDescription("omi")) - .withProperties( - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications(), new MetricSpecifications())))))) - .withNextLink("ufiqndieuzaof"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("cjznmwcpmg", model.value().get(0).name()); - Assertions.assertEquals("draufactkah", model.value().get(0).display().provider()); - Assertions.assertEquals("v", model.value().get(0).display().resource()); - Assertions.assertEquals("j", model.value().get(0).display().operation()); - Assertions.assertEquals("uxxpshne", model.value().get(0).display().description()); - Assertions.assertEquals("ufiqndieuzaof", 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 fecead7d6e62..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationPropertiesTests.java +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (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 com.azure.resourcemanager.hdinsight.models.OperationProperties; -import com.azure.resourcemanager.hdinsight.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationProperties model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"qqfkuv\",\"displayName\":\"xkdmligo\",\"displayDescription\":\"brxk\",\"unit\":\"loazuruocbgoo\",\"aggregationType\":\"te\",\"supportedAggregationTypes\":[\"fhjxakvvjgs\",\"ordilmywwtkgkxny\",\"dabg\",\"vudtjuewbcihx\"],\"supportedTimeGrainTypes\":[\"hcjyxc\",\"ybvpay\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"dzpxgwjpl\",\"sourceMdmNamespace\":\"gstcyohpf\",\"metricFilterPattern\":\"rkdbdgiogsjkmnwq\",\"fillGapWithZero\":true,\"category\":\"aiy\",\"resourceIdDimensionNameOverride\":\"d\",\"isInternal\":true,\"delegateMetricNameOverride\":\"egfnmntfpmvmemfn\",\"dimensions\":[{\"name\":\"vvbalx\",\"displayName\":\"lchpodbzevwrdn\",\"internalName\":\"ukuv\",\"toBeExportedForShoebox\":true},{\"name\":\"wsmystuluqypf\",\"displayName\":\"lerchpq\",\"internalName\":\"f\",\"toBeExportedForShoebox\":true}]},{\"name\":\"bwidfcxsspuunn\",\"displayName\":\"yhkx\",\"displayDescription\":\"ddrihpf\",\"unit\":\"qcaaewdaomdjvl\",\"aggregationType\":\"x\",\"supportedAggregationTypes\":[\"brm\"],\"supportedTimeGrainTypes\":[\"ivsiy\",\"zkdnc\",\"dxonbzoggculap\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"pgogtqxepny\",\"sourceMdmNamespace\":\"fuajly\",\"metricFilterPattern\":\"lvofqzhvfcibyfmo\",\"fillGapWithZero\":false,\"category\":\"kjpvdwxf\",\"resourceIdDimensionNameOverride\":\"iivwzjbhyzsxjrka\",\"isInternal\":true,\"delegateMetricNameOverride\":\"negvmnvuqe\",\"dimensions\":[{\"name\":\"spastjbkkdmf\",\"displayName\":\"est\",\"internalName\":\"lx\",\"toBeExportedForShoebox\":true}]},{\"name\":\"ozapeew\",\"displayName\":\"pxlktwkuziycsl\",\"displayDescription\":\"ufuztcktyhjtq\",\"unit\":\"cgzulwmmrqzzr\",\"aggregationType\":\"vpglydz\",\"supportedAggregationTypes\":[\"vqeevtoep\",\"yutnwytpzdmov\",\"vf\",\"aawzqadfl\"],\"supportedTimeGrainTypes\":[\"riglaec\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"icokpv\",\"sourceMdmNamespace\":\"lqtmldgxob\",\"metricFilterPattern\":\"rclnpkc\",\"fillGapWithZero\":false,\"category\":\"riykhyawfvjlbox\",\"resourceIdDimensionNameOverride\":\"kjlmx\",\"isInternal\":false,\"delegateMetricNameOverride\":\"ynhdwdigum\",\"dimensions\":[{\"name\":\"auzzptjazysd\",\"displayName\":\"ezwwv\",\"internalName\":\"qyuvvfonkp\",\"toBeExportedForShoebox\":false},{\"name\":\"ikvylauya\",\"displayName\":\"uwmncs\",\"internalName\":\"ijf\",\"toBeExportedForShoebox\":false}]},{\"name\":\"o\",\"displayName\":\"rsg\",\"displayDescription\":\"b\",\"unit\":\"uzqgnjdgkynsc\",\"aggregationType\":\"qhzvhxnkomt\",\"supportedAggregationTypes\":[\"otppnv\"],\"supportedTimeGrainTypes\":[\"xhihfrbbcevqagtl\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"fkqojpy\",\"sourceMdmNamespace\":\"gtrd\",\"metricFilterPattern\":\"ifmzzsd\",\"fillGapWithZero\":false,\"category\":\"nysuxmprafwgckh\",\"resourceIdDimensionNameOverride\":\"xvd\",\"isInternal\":true,\"delegateMetricNameOverride\":\"afqr\",\"dimensions\":[{\"name\":\"spave\",\"displayName\":\"r\",\"internalName\":\"bunzozudh\",\"toBeExportedForShoebox\":true},{\"name\":\"moy\",\"displayName\":\"dyuib\",\"internalName\":\"fdn\",\"toBeExportedForShoebox\":true},{\"name\":\"vfvfcj\",\"displayName\":\"eoisrvhmgor\",\"internalName\":\"ukiscvwmzhw\",\"toBeExportedForShoebox\":true}]}]}}") - .toObject(OperationProperties.class); - Assertions.assertEquals("qqfkuv", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("xkdmligo", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("brxk", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("loazuruocbgoo", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("te", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "fhjxakvvjgs", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions - .assertEquals( - "hcjyxc", model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions - .assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals("dzpxgwjpl", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals("gstcyohpf", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions - .assertEquals( - "rkdbdgiogsjkmnwq", model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("aiy", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "d", model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions - .assertEquals( - "egfnmntfpmvmemfn", - model.serviceSpecification().metricSpecifications().get(0).delegateMetricNameOverride()); - Assertions - .assertEquals( - "vvbalx", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "lchpodbzevwrdn", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "ukuv", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - true, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationProperties model = - new OperationProperties() - .withServiceSpecification( - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications() - .withName("qqfkuv") - .withDisplayName("xkdmligo") - .withDisplayDescription("brxk") - .withUnit("loazuruocbgoo") - .withAggregationType("te") - .withSupportedAggregationTypes( - Arrays.asList("fhjxakvvjgs", "ordilmywwtkgkxny", "dabg", "vudtjuewbcihx")) - .withSupportedTimeGrainTypes(Arrays.asList("hcjyxc", "ybvpay")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("dzpxgwjpl") - .withSourceMdmNamespace("gstcyohpf") - .withMetricFilterPattern("rkdbdgiogsjkmnwq") - .withFillGapWithZero(true) - .withCategory("aiy") - .withResourceIdDimensionNameOverride("d") - .withIsInternal(true) - .withDelegateMetricNameOverride("egfnmntfpmvmemfn") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("vvbalx") - .withDisplayName("lchpodbzevwrdn") - .withInternalName("ukuv") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("wsmystuluqypf") - .withDisplayName("lerchpq") - .withInternalName("f") - .withToBeExportedForShoebox(true))), - new MetricSpecifications() - .withName("bwidfcxsspuunn") - .withDisplayName("yhkx") - .withDisplayDescription("ddrihpf") - .withUnit("qcaaewdaomdjvl") - .withAggregationType("x") - .withSupportedAggregationTypes(Arrays.asList("brm")) - .withSupportedTimeGrainTypes(Arrays.asList("ivsiy", "zkdnc", "dxonbzoggculap")) - .withEnableRegionalMdmAccount(false) - .withSourceMdmAccount("pgogtqxepny") - .withSourceMdmNamespace("fuajly") - .withMetricFilterPattern("lvofqzhvfcibyfmo") - .withFillGapWithZero(false) - .withCategory("kjpvdwxf") - .withResourceIdDimensionNameOverride("iivwzjbhyzsxjrka") - .withIsInternal(true) - .withDelegateMetricNameOverride("negvmnvuqe") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("spastjbkkdmf") - .withDisplayName("est") - .withInternalName("lx") - .withToBeExportedForShoebox(true))), - new MetricSpecifications() - .withName("ozapeew") - .withDisplayName("pxlktwkuziycsl") - .withDisplayDescription("ufuztcktyhjtq") - .withUnit("cgzulwmmrqzzr") - .withAggregationType("vpglydz") - .withSupportedAggregationTypes( - Arrays.asList("vqeevtoep", "yutnwytpzdmov", "vf", "aawzqadfl")) - .withSupportedTimeGrainTypes(Arrays.asList("riglaec")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("icokpv") - .withSourceMdmNamespace("lqtmldgxob") - .withMetricFilterPattern("rclnpkc") - .withFillGapWithZero(false) - .withCategory("riykhyawfvjlbox") - .withResourceIdDimensionNameOverride("kjlmx") - .withIsInternal(false) - .withDelegateMetricNameOverride("ynhdwdigum") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("auzzptjazysd") - .withDisplayName("ezwwv") - .withInternalName("qyuvvfonkp") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("ikvylauya") - .withDisplayName("uwmncs") - .withInternalName("ijf") - .withToBeExportedForShoebox(false))), - new MetricSpecifications() - .withName("o") - .withDisplayName("rsg") - .withDisplayDescription("b") - .withUnit("uzqgnjdgkynsc") - .withAggregationType("qhzvhxnkomt") - .withSupportedAggregationTypes(Arrays.asList("otppnv")) - .withSupportedTimeGrainTypes(Arrays.asList("xhihfrbbcevqagtl")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("fkqojpy") - .withSourceMdmNamespace("gtrd") - .withMetricFilterPattern("ifmzzsd") - .withFillGapWithZero(false) - .withCategory("nysuxmprafwgckh") - .withResourceIdDimensionNameOverride("xvd") - .withIsInternal(true) - .withDelegateMetricNameOverride("afqr") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("spave") - .withDisplayName("r") - .withInternalName("bunzozudh") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("moy") - .withDisplayName("dyuib") - .withInternalName("fdn") - .withToBeExportedForShoebox(true), - new Dimension() - .withName("vfvfcj") - .withDisplayName("eoisrvhmgor") - .withInternalName("ukiscvwmzhw") - .withToBeExportedForShoebox(true)))))); - model = BinaryData.fromObject(model).toObject(OperationProperties.class); - Assertions.assertEquals("qqfkuv", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("xkdmligo", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions - .assertEquals("brxk", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("loazuruocbgoo", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions.assertEquals("te", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions - .assertEquals( - "fhjxakvvjgs", - model.serviceSpecification().metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions - .assertEquals( - "hcjyxc", model.serviceSpecification().metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions - .assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions - .assertEquals("dzpxgwjpl", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals("gstcyohpf", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions - .assertEquals( - "rkdbdgiogsjkmnwq", model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("aiy", model.serviceSpecification().metricSpecifications().get(0).category()); - Assertions - .assertEquals( - "d", model.serviceSpecification().metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).isInternal()); - Assertions - .assertEquals( - "egfnmntfpmvmemfn", - model.serviceSpecification().metricSpecifications().get(0).delegateMetricNameOverride()); - Assertions - .assertEquals( - "vvbalx", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).name()); - Assertions - .assertEquals( - "lchpodbzevwrdn", - model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals( - "ukuv", model.serviceSpecification().metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals( - true, - model - .serviceSpecification() - .metricSpecifications() - .get(0) - .dimensions() - .get(0) - .toBeExportedForShoebox()); - } -} 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 545bb55a8475..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/OperationsListMockTests.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (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.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\":\"wnapfdq\",\"display\":{\"provider\":\"ftptnuwj\",\"resource\":\"sch\",\"operation\":\"gqy\",\"description\":\"eseyqr\"},\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[{\"name\":\"otjvdkwiswskukjt\",\"displayName\":\"bvwispkx\",\"displayDescription\":\"txfkndlqvt\",\"unit\":\"nvgmmbugtywa\",\"aggregationType\":\"qaqkuea\",\"supportedAggregationTypes\":[\"oeshoygzcbyfq\",\"kfaoytehq\",\"uvjmv\"],\"supportedTimeGrainTypes\":[\"dwckygroe\",\"n\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"djus\",\"sourceMdmNamespace\":\"rreqynkceysfaqe\",\"metricFilterPattern\":\"lwryshwddkvbxgkq\",\"fillGapWithZero\":false,\"category\":\"w\",\"resourceIdDimensionNameOverride\":\"dacarvvlfnty\",\"isInternal\":false,\"delegateMetricNameOverride\":\"iwenazero\",\"dimensions\":[{}]},{\"name\":\"qalsxkd\",\"displayName\":\"qapfgsdpc\",\"displayDescription\":\"ssmzhhkuui\",\"unit\":\"dqq\",\"aggregationType\":\"ekvalblhtjq\",\"supportedAggregationTypes\":[\"vweht\",\"emxhzzy\",\"ev\"],\"supportedTimeGrainTypes\":[\"ivzrrryveimipsk\",\"yzatvfuzkaft\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"uxwigsyeipqdsm\",\"sourceMdmNamespace\":\"grq\",\"metricFilterPattern\":\"gkkileplkcsmkn\",\"fillGapWithZero\":true,\"category\":\"baedorvvmqfl\",\"resourceIdDimensionNameOverride\":\"gbdg\",\"isInternal\":true,\"delegateMetricNameOverride\":\"xdgd\",\"dimensions\":[{},{}]},{\"name\":\"gdexjd\",\"displayName\":\"jsaqwotmmwllcols\",\"displayDescription\":\"xaptefhexcgjok\",\"unit\":\"jnhvlqjbekpeeks\",\"aggregationType\":\"ksdqhjvy\",\"supportedAggregationTypes\":[\"eslk\",\"hustcpoqmavnwqjw\",\"o\",\"nlejjjkxybwf\"],\"supportedTimeGrainTypes\":[\"jbzten\",\"vkzykjtjknsxf\",\"us\",\"cdp\"],\"enableRegionalMdmAccount\":false,\"sourceMdmAccount\":\"qrmgjfbpkuw\",\"sourceMdmNamespace\":\"oiojfizfavkjzwfb\",\"metricFilterPattern\":\"aykmmf\",\"fillGapWithZero\":false,\"category\":\"wxrzxmdewsrsxkrp\",\"resourceIdDimensionNameOverride\":\"jazejwwviyoyp\",\"isInternal\":false,\"delegateMetricNameOverride\":\"rnnhjxs\",\"dimensions\":[{},{},{},{}]},{\"name\":\"qkbiwet\",\"displayName\":\"zycyqiqyhg\",\"displayDescription\":\"etzlexbsfledynoj\",\"unit\":\"iuwfbzkkdtnhqsy\",\"aggregationType\":\"jselpkpbafvafh\",\"supportedAggregationTypes\":[\"lc\"],\"supportedTimeGrainTypes\":[\"vxrh\",\"zdfwrsofpltdbm\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"hvhfnracw\",\"sourceMdmNamespace\":\"qigtuujwouhdaws\",\"metricFilterPattern\":\"rb\",\"fillGapWithZero\":true,\"category\":\"jybvit\",\"resourceIdDimensionNameOverride\":\"kjyaznumtg\",\"isInternal\":false,\"delegateMetricNameOverride\":\"dchozfnkfexl\",\"dimensions\":[{},{}]}]}}}]}"; - - 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(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wnapfdq", response.iterator().next().name()); - Assertions.assertEquals("ftptnuwj", response.iterator().next().display().provider()); - Assertions.assertEquals("sch", response.iterator().next().display().resource()); - Assertions.assertEquals("gqy", response.iterator().next().display().operation()); - Assertions.assertEquals("eseyqr", response.iterator().next().display().description()); - Assertions - .assertEquals( - "otjvdkwiswskukjt", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).name()); - Assertions - .assertEquals( - "bvwispkx", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayName()); - Assertions - .assertEquals( - "txfkndlqvt", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .displayDescription()); - Assertions - .assertEquals( - "nvgmmbugtywa", - response.iterator().next().properties().serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - "qaqkuea", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .aggregationType()); - Assertions - .assertEquals( - "oeshoygzcbyfq", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedAggregationTypes() - .get(0)); - Assertions - .assertEquals( - "dwckygroe", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .supportedTimeGrainTypes() - .get(0)); - Assertions - .assertEquals( - true, - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .enableRegionalMdmAccount()); - Assertions - .assertEquals( - "djus", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmAccount()); - Assertions - .assertEquals( - "rreqynkceysfaqe", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .sourceMdmNamespace()); - Assertions - .assertEquals( - "lwryshwddkvbxgkq", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .metricFilterPattern()); - Assertions - .assertEquals( - false, - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .fillGapWithZero()); - Assertions - .assertEquals( - "w", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .category()); - Assertions - .assertEquals( - "dacarvvlfnty", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .resourceIdDimensionNameOverride()); - Assertions - .assertEquals( - false, - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .isInternal()); - Assertions - .assertEquals( - "iwenazero", - response - .iterator() - .next() - .properties() - .serviceSpecification() - .metricSpecifications() - .get(0) - .delegateMetricNameOverride()); - } -} 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 9c029f481add..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionInnerTests.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.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"aruoujmkcjhwqyt\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"bnw\",\"actionsRequired\":\"wgdrjervnaenqp\"},\"linkIdentifier\":\"indoygmifthnzd\",\"provisioningState\":\"Updating\"},\"id\":\"gnayqigynduh\",\"name\":\"vhqlkthumaqo\",\"type\":\"bgycduiertgccym\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bnw", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("wgdrjervnaenqp", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("bnw") - .withActionsRequired("wgdrjervnaenqp")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bnw", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("wgdrjervnaenqp", 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 0c483812269d..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionListResultTests.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.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.hdinsight.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"qodfvp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"oxgsgbpfgzdjtx\",\"actionsRequired\":\"flbqvgaq\"},\"linkIdentifier\":\"gafcqu\",\"provisioningState\":\"Succeeded\"},\"id\":\"etnwsdtutnw\",\"name\":\"duy\",\"type\":\"vuzhyr\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"ipmve\"},\"privateLinkServiceConnectionState\":{\"status\":\"Removed\",\"description\":\"ukuqgsj\",\"actionsRequired\":\"undxgketw\"},\"linkIdentifier\":\"hzjhf\",\"provisioningState\":\"InProgress\"},\"id\":\"vmuvgpmu\",\"name\":\"eqsx\",\"type\":\"mhfbuzjy\"},{\"properties\":{\"privateEndpoint\":{\"id\":\"as\"},\"privateLinkServiceConnectionState\":{\"status\":\"Removed\",\"description\":\"dyp\",\"actionsRequired\":\"yue\"},\"linkIdentifier\":\"lynsqyrpf\",\"provisioningState\":\"Canceled\"},\"id\":\"lttymsjn\",\"name\":\"gqdnfwqzd\",\"type\":\"gtilax\"}],\"nextLink\":\"fhqlyvi\"}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("oxgsgbpfgzdjtx", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("flbqvgaq", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model = - new PrivateEndpointConnectionListResult() - .withValue( - Arrays - .asList( - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REJECTED) - .withDescription("oxgsgbpfgzdjtx") - .withActionsRequired("flbqvgaq")), - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REMOVED) - .withDescription("ukuqgsj") - .withActionsRequired("undxgketw")), - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REMOVED) - .withDescription("dyp") - .withActionsRequired("yue")))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("oxgsgbpfgzdjtx", model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("flbqvgaq", model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); - } -} 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 747900f64d70..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionPropertiesTests.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.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.hdinsight.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"l\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"lqlfm\",\"actionsRequired\":\"n\"},\"linkIdentifier\":\"glzpswiydm\",\"provisioningState\":\"InProgress\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lqlfm", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("n", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("lqlfm") - .withActionsRequired("n")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("lqlfm", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("n", 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 6fceff140bb5..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\":\"qtyltcoqcujp\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"zakuejk\",\"actionsRequired\":\"bizt\"},\"linkIdentifier\":\"fqcvovj\",\"provisioningState\":\"Succeeded\"},\"id\":\"sj\",\"name\":\"lbemyej\",\"type\":\"riuxegthortuda\"}"; - - 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("ujcngo") - .withExistingCluster("ngpszngafpg", "lkvec") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REMOVED) - .withDescription("tp") - .withActionsRequired("ztrgdgxvcoq")) - .create(); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("zakuejk", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("bizt", 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 60ff29f56417..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 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("khyxvrqtvbcz", "ulmdgglm", "pjpfseykgs", com.azure.core.util.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 4c8f411ba915..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsGetWithResponseMockTests.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.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\":\"pdxphlkksnmgzvyf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"kzuqnwsith\",\"actionsRequired\":\"olyahluqwqulsut\"},\"linkIdentifier\":\"bhxykfhyqezvqqug\",\"provisioningState\":\"Updating\"},\"id\":\"bcvex\",\"name\":\"e\",\"type\":\"quowtljvfwhrea\"}"; - - 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("rke", "yildudxjascow", "f", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("kzuqnwsith", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("olyahluqwqulsut", 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 74fe2d6f2567..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointConnectionsListByClusterMockTests.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.http.rest.PagedIterable; -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.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\":\"guyxlyk\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"vx\",\"actionsRequired\":\"wxh\"},\"linkIdentifier\":\"ejtlk\",\"provisioningState\":\"Updating\"},\"id\":\"nwivkcqhrxh\",\"name\":\"knlccrmmkyup\",\"type\":\"jubyqjfkakfq\"}]}"; - - 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("oakizvoai", "naqln", com.azure.core.util.Context.NONE); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("vx", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals("wxh", 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 6fa3a44d5254..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.PrivateEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"zdxss\"}").toObject(PrivateEndpoint.class); - Assertions.assertEquals("zdxss", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint().withId("zdxss"); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - Assertions.assertEquals("zdxss", 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 b8f169136591..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 com.azure.resourcemanager.hdinsight.models.ResourceId; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkConfigurationProperties model = - BinaryData - .fromString( - "{\"groupId\":\"jzicwifsjt\",\"provisioningState\":\"Failed\",\"ipConfigurations\":[{\"id\":\"ishc\",\"name\":\"khaj\",\"type\":\"yeamdphagalpb\",\"properties\":{\"provisioningState\":\"Deleting\",\"primary\":true,\"privateIPAddress\":\"honowkgshwank\",\"privateIPAllocationMethod\":\"static\",\"subnet\":{\"id\":\"njeputtmrywn\"}}},{\"id\":\"oqftiyqzrnkcq\",\"name\":\"yx\",\"type\":\"hzls\",\"properties\":{\"provisioningState\":\"Succeeded\",\"primary\":false,\"privateIPAddress\":\"nwvlryavwhheunmm\",\"privateIPAllocationMethod\":\"dynamic\",\"subnet\":{\"id\":\"zko\"}}},{\"id\":\"cukoklyaxuconu\",\"name\":\"szfkbe\",\"type\":\"ewrmjmwvvjektc\",\"properties\":{\"provisioningState\":\"Succeeded\",\"primary\":true,\"privateIPAddress\":\"rsffrzpwvlqdqgbi\",\"privateIPAllocationMethod\":\"static\",\"subnet\":{\"id\":\"kaet\"}}}]}") - .toObject(PrivateLinkConfigurationProperties.class); - Assertions.assertEquals("jzicwifsjt", model.groupId()); - Assertions.assertEquals("khaj", model.ipConfigurations().get(0).name()); - Assertions.assertEquals(true, model.ipConfigurations().get(0).primary()); - Assertions.assertEquals("honowkgshwank", model.ipConfigurations().get(0).privateIpAddress()); - Assertions - .assertEquals( - PrivateIpAllocationMethod.STATIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("njeputtmrywn", model.ipConfigurations().get(0).subnet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkConfigurationProperties model = - new PrivateLinkConfigurationProperties() - .withGroupId("jzicwifsjt") - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration() - .withName("khaj") - .withPrimary(true) - .withPrivateIpAddress("honowkgshwank") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.STATIC) - .withSubnet(new ResourceId().withId("njeputtmrywn")), - new IpConfiguration() - .withName("yx") - .withPrimary(false) - .withPrivateIpAddress("nwvlryavwhheunmm") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.DYNAMIC) - .withSubnet(new ResourceId().withId("zko")), - new IpConfiguration() - .withName("szfkbe") - .withPrimary(true) - .withPrivateIpAddress("rsffrzpwvlqdqgbi") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.STATIC) - .withSubnet(new ResourceId().withId("kaet")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkConfigurationProperties.class); - Assertions.assertEquals("jzicwifsjt", model.groupId()); - Assertions.assertEquals("khaj", model.ipConfigurations().get(0).name()); - Assertions.assertEquals(true, model.ipConfigurations().get(0).primary()); - Assertions.assertEquals("honowkgshwank", model.ipConfigurations().get(0).privateIpAddress()); - Assertions - .assertEquals( - PrivateIpAllocationMethod.STATIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("njeputtmrywn", model.ipConfigurations().get(0).subnet().id()); - } -} 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 32a9944816bd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkConfigurationTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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.PrivateLinkConfiguration; -import com.azure.resourcemanager.hdinsight.models.ResourceId; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkConfiguration model = - BinaryData - .fromString( - "{\"id\":\"rxwburv\",\"name\":\"xxjnspydptk\",\"type\":\"nkoukn\",\"properties\":{\"groupId\":\"udwtiukbl\",\"provisioningState\":\"Succeeded\",\"ipConfigurations\":[{\"id\":\"ocipazyxoeg\",\"name\":\"kgjn\",\"type\":\"ucgygevqz\",\"properties\":{\"provisioningState\":\"Succeeded\",\"primary\":false,\"privateIPAddress\":\"p\",\"privateIPAllocationMethod\":\"dynamic\",\"subnet\":{\"id\":\"qjsdpydnfyhxdeo\"}}}]}}") - .toObject(PrivateLinkConfiguration.class); - Assertions.assertEquals("xxjnspydptk", model.name()); - Assertions.assertEquals("udwtiukbl", model.groupId()); - Assertions.assertEquals("kgjn", model.ipConfigurations().get(0).name()); - Assertions.assertEquals(false, model.ipConfigurations().get(0).primary()); - Assertions.assertEquals("p", model.ipConfigurations().get(0).privateIpAddress()); - Assertions - .assertEquals( - PrivateIpAllocationMethod.DYNAMIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("qjsdpydnfyhxdeo", model.ipConfigurations().get(0).subnet().id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkConfiguration model = - new PrivateLinkConfiguration() - .withName("xxjnspydptk") - .withGroupId("udwtiukbl") - .withIpConfigurations( - Arrays - .asList( - new IpConfiguration() - .withName("kgjn") - .withPrimary(false) - .withPrivateIpAddress("p") - .withPrivateIpAllocationMethod(PrivateIpAllocationMethod.DYNAMIC) - .withSubnet(new ResourceId().withId("qjsdpydnfyhxdeo")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkConfiguration.class); - Assertions.assertEquals("xxjnspydptk", model.name()); - Assertions.assertEquals("udwtiukbl", model.groupId()); - Assertions.assertEquals("kgjn", model.ipConfigurations().get(0).name()); - Assertions.assertEquals(false, model.ipConfigurations().get(0).primary()); - Assertions.assertEquals("p", model.ipConfigurations().get(0).privateIpAddress()); - Assertions - .assertEquals( - PrivateIpAllocationMethod.DYNAMIC, model.ipConfigurations().get(0).privateIpAllocationMethod()); - Assertions.assertEquals("qjsdpydnfyhxdeo", model.ipConfigurations().get(0).subnet().id()); - } -} 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 b4f78492a430..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"ahhvjhhna\",\"requiredMembers\":[\"bbjjidjksyxk\",\"xvxevblbjednljla\",\"euaulxu\"],\"requiredZoneNames\":[\"jbnkpp\",\"ynenlsvxeizz\"]},\"id\":\"klnsrmffey\",\"name\":\"xcktpiymerteeamm\",\"type\":\"qiekkkzddrt\"}") - .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("jbnkpp", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = - new PrivateLinkResourceInner().withRequiredZoneNames(Arrays.asList("jbnkpp", "ynenlsvxeizz")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("jbnkpp", 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 b075526a31a6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourceListResultInnerTests.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.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.hdinsight.fluent.models.PrivateLinkResourceListResultInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"vk\",\"requiredMembers\":[\"zunbixx\",\"ti\",\"vcpwpgclrc\",\"vtsoxf\"],\"requiredZoneNames\":[\"nxpmyyefrpmpdnq\",\"skawaoqvmmb\",\"pqfrtqlkz\"]},\"id\":\"gnitgvkxlzyq\",\"name\":\"rfe\",\"type\":\"cealzxwh\"},{\"properties\":{\"groupId\":\"symoyq\",\"requiredMembers\":[\"igdivbkbxg\",\"mf\"],\"requiredZoneNames\":[\"wasqvdaeyyg\",\"xakjsqzhzb\"]},\"id\":\"kgimsidxasic\",\"name\":\"dyvvjskgfmocwahp\",\"type\":\"gat\"}]}") - .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.value().get(0).requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResultInner model = - new PrivateLinkResourceListResultInner() - .withValue( - Arrays - .asList( - new PrivateLinkResourceInner() - .withRequiredZoneNames(Arrays.asList("nxpmyyefrpmpdnq", "skawaoqvmmb", "pqfrtqlkz")), - new PrivateLinkResourceInner() - .withRequiredZoneNames(Arrays.asList("wasqvdaeyyg", "xakjsqzhzb")))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals("nxpmyyefrpmpdnq", model.value().get(0).requiredZoneNames().get(0)); - } -} 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 ecc751d4b634..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"doj\",\"requiredMembers\":[\"vavrefdees\"],\"requiredZoneNames\":[\"uij\",\"xtxsuwprtujw\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("uij", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("uij", "xtxsuwprtujw")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("uij", 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 ba9dcb2103c1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesGetWithResponseMockTests.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.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\":\"durelyujl\",\"requiredMembers\":[\"u\",\"pckyec\"],\"requiredZoneNames\":[\"igptajbrzmqxucyc\"]},\"id\":\"oclxiut\",\"name\":\"jc\",\"type\":\"z\"}"; - - 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("inzcpdltkrlgj", "tbdrvcqgue", "zhomp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("igptajbrzmqxucyc", 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 8e430be5df32..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkResourcesListByClusterWithResponseMockTests.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.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.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 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\":[{\"properties\":{\"groupId\":\"bcccgzpra\",\"requiredMembers\":[\"yuffatsgf\",\"ipwcxbyu\"],\"requiredZoneNames\":[\"qdx\",\"urnpnuhzafccnuh\",\"i\"]},\"id\":\"yl\",\"name\":\"ui\",\"type\":\"vxva\"},{\"properties\":{\"groupId\":\"rkdlb\",\"requiredMembers\":[\"xvhcs\",\"hzlwxaea\",\"vurex\",\"ndsbdw\"],\"requiredZoneNames\":[\"e\",\"zmwntopagt\",\"mvmmagoaqylkjz\"]},\"id\":\"iua\",\"name\":\"jcg\",\"type\":\"xitp\"}]}"; - - 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("lpjfelqerpptcbgq", "zmnhiilialwc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qdx", response.value().get(0).requiredZoneNames().get(0)); - } -} 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 cbf2781af3a5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString("{\"status\":\"Approved\",\"description\":\"zmnvdfznudaod\",\"actionsRequired\":\"zbn\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("zmnvdfznudaod", model.description()); - Assertions.assertEquals("zbn", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("zmnvdfznudaod") - .withActionsRequired("zbn"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, model.status()); - Assertions.assertEquals("zmnvdfznudaod", model.description()); - Assertions.assertEquals("zbn", 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 30112c796078..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaCapabilityTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class QuotaCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaCapability model = - BinaryData - .fromString( - "{\"coresUsed\":5551569076358580820,\"maxCoresAllowed\":3267053393250008871,\"regionalQuotas\":[{\"regionName\":\"grauwjuetaebur\",\"coresUsed\":6667663712851473070,\"coresAvailable\":308370800789582415}]}") - .toObject(QuotaCapability.class); - Assertions.assertEquals(5551569076358580820L, model.coresUsed()); - Assertions.assertEquals(3267053393250008871L, model.maxCoresAllowed()); - Assertions.assertEquals("grauwjuetaebur", model.regionalQuotas().get(0).regionName()); - Assertions.assertEquals(6667663712851473070L, model.regionalQuotas().get(0).coresUsed()); - Assertions.assertEquals(308370800789582415L, model.regionalQuotas().get(0).coresAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaCapability model = - new QuotaCapability() - .withCoresUsed(5551569076358580820L) - .withMaxCoresAllowed(3267053393250008871L) - .withRegionalQuotas( - Arrays - .asList( - new RegionalQuotaCapability() - .withRegionName("grauwjuetaebur") - .withCoresUsed(6667663712851473070L) - .withCoresAvailable(308370800789582415L))); - model = BinaryData.fromObject(model).toObject(QuotaCapability.class); - Assertions.assertEquals(5551569076358580820L, model.coresUsed()); - Assertions.assertEquals(3267053393250008871L, model.maxCoresAllowed()); - Assertions.assertEquals("grauwjuetaebur", model.regionalQuotas().get(0).regionName()); - Assertions.assertEquals(6667663712851473070L, model.regionalQuotas().get(0).coresUsed()); - Assertions.assertEquals(308370800789582415L, 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 292c7b34513f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/QuotaInfoTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.QuotaInfo; -import org.junit.jupiter.api.Assertions; - -public final class QuotaInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaInfo model = BinaryData.fromString("{\"coresUsed\":1416358219}").toObject(QuotaInfo.class); - Assertions.assertEquals(1416358219, model.coresUsed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaInfo model = new QuotaInfo().withCoresUsed(1416358219); - model = BinaryData.fromObject(model).toObject(QuotaInfo.class); - Assertions.assertEquals(1416358219, 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 e36dd847b77f..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionalQuotaCapabilityTests.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.RegionalQuotaCapability; -import org.junit.jupiter.api.Assertions; - -public final class RegionalQuotaCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionalQuotaCapability model = - BinaryData - .fromString( - "{\"regionName\":\"zlxwabmqoefkifr\",\"coresUsed\":6868317644582891875,\"coresAvailable\":6882751528428278733}") - .toObject(RegionalQuotaCapability.class); - Assertions.assertEquals("zlxwabmqoefkifr", model.regionName()); - Assertions.assertEquals(6868317644582891875L, model.coresUsed()); - Assertions.assertEquals(6882751528428278733L, model.coresAvailable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionalQuotaCapability model = - new RegionalQuotaCapability() - .withRegionName("zlxwabmqoefkifr") - .withCoresUsed(6868317644582891875L) - .withCoresAvailable(6882751528428278733L); - model = BinaryData.fromObject(model).toObject(RegionalQuotaCapability.class); - Assertions.assertEquals("zlxwabmqoefkifr", model.regionName()); - Assertions.assertEquals(6868317644582891875L, model.coresUsed()); - Assertions.assertEquals(6882751528428278733L, 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 34179bf1cdee..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RegionsCapabilityTests.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.RegionsCapability; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegionsCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegionsCapability model = - BinaryData.fromString("{\"available\":[\"gdknnqv\",\"aznqntoru\"]}").toObject(RegionsCapability.class); - Assertions.assertEquals("gdknnqv", model.available().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegionsCapability model = new RegionsCapability().withAvailable(Arrays.asList("gdknnqv", "aznqntoru")); - model = BinaryData.fromObject(model).toObject(RegionsCapability.class); - Assertions.assertEquals("gdknnqv", 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 c4772fd08219..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ResourceIdTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ResourceId; -import org.junit.jupiter.api.Assertions; - -public final class ResourceIdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceId model = BinaryData.fromString("{\"id\":\"idokgjlj\"}").toObject(ResourceId.class); - Assertions.assertEquals("idokgjlj", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceId model = new ResourceId().withId("idokgjlj"); - model = BinaryData.fromObject(model).toObject(ResourceId.class); - Assertions.assertEquals("idokgjlj", 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 f151dc9697c5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionDetailInnerTests.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.fluent.models.RuntimeScriptActionDetailInner; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeScriptActionDetailInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeScriptActionDetailInner model = - BinaryData - .fromString( - "{\"scriptExecutionId\":1138155605453758000,\"startTime\":\"pmjerbdkelvidiz\",\"endTime\":\"sdbccxjmonfdgnwn\",\"status\":\"puuw\",\"operation\":\"tvuqjctzenkeifzz\",\"executionSummary\":[{\"status\":\"as\",\"instanceCount\":897576014},{\"status\":\"hbxcu\",\"instanceCount\":995133757},{\"status\":\"gsrboldforobw\",\"instanceCount\":2116230034},{\"status\":\"zbfhfovvac\",\"instanceCount\":1350154839}],\"debugInformation\":\"uodxesza\",\"name\":\"belawumuaslzkwr\",\"uri\":\"woycqucwyha\",\"parameters\":\"omd\",\"roles\":[\"ywuhpsvfuur\",\"tlwexxwlalniexz\",\"rzpgep\"],\"applicationName\":\"yb\"}") - .toObject(RuntimeScriptActionDetailInner.class); - Assertions.assertEquals("belawumuaslzkwr", model.name()); - Assertions.assertEquals("woycqucwyha", model.uri()); - Assertions.assertEquals("omd", model.parameters()); - Assertions.assertEquals("ywuhpsvfuur", model.roles().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeScriptActionDetailInner model = - new RuntimeScriptActionDetailInner() - .withName("belawumuaslzkwr") - .withUri("woycqucwyha") - .withParameters("omd") - .withRoles(Arrays.asList("ywuhpsvfuur", "tlwexxwlalniexz", "rzpgep")); - model = BinaryData.fromObject(model).toObject(RuntimeScriptActionDetailInner.class); - Assertions.assertEquals("belawumuaslzkwr", model.name()); - Assertions.assertEquals("woycqucwyha", model.uri()); - Assertions.assertEquals("omd", model.parameters()); - Assertions.assertEquals("ywuhpsvfuur", 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 60c6dfccc939..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/RuntimeScriptActionTests.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.RuntimeScriptAction; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RuntimeScriptActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RuntimeScriptAction model = - BinaryData - .fromString( - "{\"name\":\"fqrvkdvjsllrmvvd\",\"uri\":\"watkpnpulexxb\",\"parameters\":\"wtruwiqzbqjvsovm\",\"roles\":[\"kacspkw\",\"hzdobpxjmflbvvnc\"],\"applicationName\":\"kcciwwzjuqkhr\"}") - .toObject(RuntimeScriptAction.class); - Assertions.assertEquals("fqrvkdvjsllrmvvd", model.name()); - Assertions.assertEquals("watkpnpulexxb", model.uri()); - Assertions.assertEquals("wtruwiqzbqjvsovm", model.parameters()); - Assertions.assertEquals("kacspkw", model.roles().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RuntimeScriptAction model = - new RuntimeScriptAction() - .withName("fqrvkdvjsllrmvvd") - .withUri("watkpnpulexxb") - .withParameters("wtruwiqzbqjvsovm") - .withRoles(Arrays.asList("kacspkw", "hzdobpxjmflbvvnc")); - model = BinaryData.fromObject(model).toObject(RuntimeScriptAction.class); - Assertions.assertEquals("fqrvkdvjsllrmvvd", model.name()); - Assertions.assertEquals("watkpnpulexxb", model.uri()); - Assertions.assertEquals("wtruwiqzbqjvsovm", model.parameters()); - Assertions.assertEquals("kacspkw", 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 d8d18cd1bd12..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionHistoryListTests.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.ScriptActionExecutionHistoryList; - -public final class ScriptActionExecutionHistoryListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptActionExecutionHistoryList model = - BinaryData - .fromString( - "{\"value\":[{\"scriptExecutionId\":7238089424205548916,\"startTime\":\"nrkcxkj\",\"endTime\":\"nxm\",\"status\":\"uxswqrntvl\",\"operation\":\"jpsttexoq\",\"executionSummary\":[{\"status\":\"yyufmhruncuw\",\"instanceCount\":2077646980},{\"status\":\"kcdqzhlct\",\"instanceCount\":1266865634},{\"status\":\"qn\",\"instanceCount\":981773620},{\"status\":\"chrqb\",\"instanceCount\":1026325475}],\"debugInformation\":\"cgegydcwbo\",\"name\":\"jumvqqolihrraio\",\"uri\":\"aubrjtloq\",\"parameters\":\"uojrngiflr\",\"roles\":[\"asccbiui\",\"zdlyjdfqw\"],\"applicationName\":\"yoqufdvruz\"}],\"nextLink\":\"zojhpctfnmd\"}") - .toObject(ScriptActionExecutionHistoryList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - 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 0010a1c2dc72..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionExecutionSummaryTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.ScriptActionExecutionSummary; - -public final class ScriptActionExecutionSummaryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptActionExecutionSummary model = - BinaryData - .fromString("{\"status\":\"wpgdak\",\"instanceCount\":1202587998}") - .toObject(ScriptActionExecutionSummary.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - 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 94abf4c87bd4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionTests.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.ScriptAction; -import org.junit.jupiter.api.Assertions; - -public final class ScriptActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptAction model = - BinaryData - .fromString("{\"name\":\"rq\",\"uri\":\"b\",\"parameters\":\"oczvy\"}") - .toObject(ScriptAction.class); - Assertions.assertEquals("rq", model.name()); - Assertions.assertEquals("b", model.uri()); - Assertions.assertEquals("oczvy", model.parameters()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptAction model = new ScriptAction().withName("rq").withUri("b").withParameters("oczvy"); - model = BinaryData.fromObject(model).toObject(ScriptAction.class); - Assertions.assertEquals("rq", model.name()); - Assertions.assertEquals("b", model.uri()); - Assertions.assertEquals("oczvy", 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 4227e1df36d2..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 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("zjd", "r", "jb", com.azure.core.util.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 32b362ce7dae..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsGetExecutionDetailWithResponseMockTests.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.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\":2607460445370912418,\"startTime\":\"huxiqhzlraymez\",\"endTime\":\"skihmxrfd\",\"status\":\"jrednwyysh\",\"operation\":\"w\",\"executionSummary\":[{\"status\":\"uafpwzyifrk\",\"instanceCount\":1842303000},{\"status\":\"xeqipx\",\"instanceCount\":1931684247},{\"status\":\"imsfayorp\",\"instanceCount\":450350421},{\"status\":\"jogeslabnsmjkwyn\",\"instanceCount\":360618774}],\"debugInformation\":\"kqsykvwjtqpke\",\"name\":\"myltj\",\"uri\":\"rspxklur\",\"parameters\":\"lfg\",\"roles\":[\"nnnoytz\",\"osewxi\",\"pxvkqma\",\"pxvpifdfaif\"],\"applicationName\":\"yzeyuubeid\"}"; - - 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( - "hnhjtfvpndpmi", "jpnwynudql", "zsauzp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("myltj", response.name()); - Assertions.assertEquals("rspxklur", response.uri()); - Assertions.assertEquals("lfg", response.parameters()); - Assertions.assertEquals("nnnoytz", 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 2689a2b37123..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListByClusterMockTests.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.http.rest.PagedIterable; -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.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\":7487371903139013200,\"startTime\":\"bwbqamt\",\"endTime\":\"liys\",\"status\":\"kcvmwfauxxepmy\",\"operation\":\"ormcqmic\",\"executionSummary\":[{\"status\":\"pkzfbojxj\",\"instanceCount\":2016154693},{\"status\":\"yqwixvcpwnkwywzw\",\"instanceCount\":47513011}],\"debugInformation\":\"ickduoiqta\",\"name\":\"t\",\"uri\":\"vsknxrwzawnv\",\"parameters\":\"cfhzagxnvhycv\",\"roles\":[\"mwrzregzgyufutrw\",\"weryekzk\",\"hmeott\",\"w\"],\"applicationName\":\"osxw\"}]}"; - - 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("xjeaoqaqbzgyh", "w", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("t", response.iterator().next().name()); - Assertions.assertEquals("vsknxrwzawnv", response.iterator().next().uri()); - Assertions.assertEquals("cfhzagxnvhycv", response.iterator().next().parameters()); - Assertions.assertEquals("mwrzregzgyufutrw", 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 4c91f5681ec0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptActionsListTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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; - -public final class ScriptActionsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptActionsList model = - BinaryData - .fromString( - "{\"value\":[{\"scriptExecutionId\":1563332735084443990,\"startTime\":\"ft\",\"endTime\":\"qobr\",\"status\":\"nac\",\"operation\":\"ckknhxkizvy\",\"executionSummary\":[{\"status\":\"vuljraaeranokqg\",\"instanceCount\":578630229},{\"status\":\"qnvb\",\"instanceCount\":387687877}],\"debugInformation\":\"a\",\"name\":\"xulcdisdos\",\"uri\":\"jbjsvgjrwh\",\"parameters\":\"vyc\",\"roles\":[\"dclxgc\"],\"applicationName\":\"nfnw\"},{\"scriptExecutionId\":3132711740281855287,\"startTime\":\"pdvjdhttzaefedx\",\"endTime\":\"ch\",\"status\":\"hk\",\"operation\":\"rjdqnsdfzp\",\"executionSummary\":[{\"status\":\"kylkdghrj\",\"instanceCount\":852383444}],\"debugInformation\":\"lwxezwzhokvbwnh\",\"name\":\"tqlgehgppi\",\"uri\":\"ifhpf\",\"parameters\":\"ajvgcxtxjcsheafi\",\"roles\":[\"tugsresmkssjh\",\"iftxfkf\",\"egprhptil\",\"ucb\"],\"applicationName\":\"tgdqohmcwsldriz\"},{\"scriptExecutionId\":7692206600451693142,\"startTime\":\"ralllibphb\",\"endTime\":\"mizak\",\"status\":\"ankjpdnjzh\",\"operation\":\"oylhjlmuoyxprimr\",\"executionSummary\":[{\"status\":\"eecjmeis\",\"instanceCount\":1157129881},{\"status\":\"asylwx\",\"instanceCount\":1212726658}],\"debugInformation\":\"mweoohgu\",\"name\":\"fuzboyjathwtzolb\",\"uri\":\"emwmdxmebwjs\",\"parameters\":\"p\",\"roles\":[\"lxveabfqx\",\"mwmqtibx\"],\"applicationName\":\"jddtvqct\"},{\"scriptExecutionId\":3995165957523237174,\"startTime\":\"aeukm\",\"endTime\":\"ieekpndzaa\",\"status\":\"udqmeqwigpibudq\",\"operation\":\"xebeybpmz\",\"executionSummary\":[{\"status\":\"ff\",\"instanceCount\":1447322372},{\"status\":\"tmhheioqa\",\"instanceCount\":170135486},{\"status\":\"eufuqyrxpdlcgql\",\"instanceCount\":732264201}],\"debugInformation\":\"jqfrddgamquh\",\"name\":\"os\",\"uri\":\"sjuivfcdisyir\",\"parameters\":\"zhczexrxzbujrtrh\",\"roles\":[\"wrevkhgnlnzon\",\"lrpiqywnc\",\"jtszcof\",\"zehtdhgb\"],\"applicationName\":\"vreljea\"}],\"nextLink\":\"rvzmlovuana\"}") - .toObject(ScriptActionsList.class); - Assertions.assertEquals("xulcdisdos", model.value().get(0).name()); - Assertions.assertEquals("jbjsvgjrwh", model.value().get(0).uri()); - Assertions.assertEquals("vyc", model.value().get(0).parameters()); - Assertions.assertEquals("dclxgc", model.value().get(0).roles().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptActionsList model = - new ScriptActionsList() - .withValue( - Arrays - .asList( - new RuntimeScriptActionDetailInner() - .withName("xulcdisdos") - .withUri("jbjsvgjrwh") - .withParameters("vyc") - .withRoles(Arrays.asList("dclxgc")), - new RuntimeScriptActionDetailInner() - .withName("tqlgehgppi") - .withUri("ifhpf") - .withParameters("ajvgcxtxjcsheafi") - .withRoles(Arrays.asList("tugsresmkssjh", "iftxfkf", "egprhptil", "ucb")), - new RuntimeScriptActionDetailInner() - .withName("fuzboyjathwtzolb") - .withUri("emwmdxmebwjs") - .withParameters("p") - .withRoles(Arrays.asList("lxveabfqx", "mwmqtibx")), - new RuntimeScriptActionDetailInner() - .withName("os") - .withUri("sjuivfcdisyir") - .withParameters("zhczexrxzbujrtrh") - .withRoles(Arrays.asList("wrevkhgnlnzon", "lrpiqywnc", "jtszcof", "zehtdhgb")))); - model = BinaryData.fromObject(model).toObject(ScriptActionsList.class); - Assertions.assertEquals("xulcdisdos", model.value().get(0).name()); - Assertions.assertEquals("jbjsvgjrwh", model.value().get(0).uri()); - Assertions.assertEquals("vyc", model.value().get(0).parameters()); - Assertions.assertEquals("dclxgc", 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 375b6c6d42b5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesListByClusterMockTests.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.http.rest.PagedIterable; -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.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\":2103991841556709200,\"startTime\":\"anniyopetxivcnr\",\"endTime\":\"xnucaephblkwqp\",\"status\":\"vbqsdt\",\"operation\":\"bctvivuzqym\",\"executionSummary\":[{\"status\":\"o\",\"instanceCount\":1369163262}],\"debugInformation\":\"tsqhzvbrzcdban\",\"name\":\"zndscxmxeatkdbmw\",\"uri\":\"rdjyibqb\",\"parameters\":\"omhjrmkuhm\",\"roles\":[\"ljalfihcjmobc\",\"nc\",\"exxqcwg\"],\"applicationName\":\"fgvaknokzwj\"}]}"; - - 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("ienhqhskndnelq", "aadl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("zndscxmxeatkdbmw", response.iterator().next().name()); - Assertions.assertEquals("rdjyibqb", response.iterator().next().uri()); - Assertions.assertEquals("omhjrmkuhm", response.iterator().next().parameters()); - Assertions.assertEquals("ljalfihcjmobc", 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 bdd6222a5db0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ScriptExecutionHistoriesPromoteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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 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("zrltixldzyyf", "tpq", "ixymmpujivyql", com.azure.core.util.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 765a52890da1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/ServiceSpecificationTests.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.models.Dimension; -import com.azure.resourcemanager.hdinsight.models.MetricSpecifications; -import com.azure.resourcemanager.hdinsight.models.ServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceSpecification model = - BinaryData - .fromString( - "{\"metricSpecifications\":[{\"name\":\"vxilcbt\",\"displayName\":\"hnze\",\"displayDescription\":\"xtjjfzqlqhycav\",\"unit\":\"ggxdb\",\"aggregationType\":\"smieknlra\",\"supportedAggregationTypes\":[\"awiuagyd\",\"qfby\",\"yr\",\"giagtcojo\"],\"supportedTimeGrainTypes\":[\"ogfnzjvusf\",\"ld\",\"ozuxylfsbtkadpys\"],\"enableRegionalMdmAccount\":true,\"sourceMdmAccount\":\"tgkbugrjqctojc\",\"sourceMdmNamespace\":\"sofieypefojyqd\",\"metricFilterPattern\":\"u\",\"fillGapWithZero\":false,\"category\":\"lcwkhihihlhz\",\"resourceIdDimensionNameOverride\":\"qtz\",\"isInternal\":true,\"delegateMetricNameOverride\":\"nowc\",\"dimensions\":[{\"name\":\"mvec\",\"displayName\":\"txmwoteyow\",\"internalName\":\"uqovekqvgqouwif\",\"toBeExportedForShoebox\":false},{\"name\":\"wyivqikf\",\"displayName\":\"vhrfsphuagrt\",\"internalName\":\"kteusqczk\",\"toBeExportedForShoebox\":false},{\"name\":\"xubyjaffmmfblcqc\",\"displayName\":\"bgq\",\"internalName\":\"rtalmet\",\"toBeExportedForShoebox\":false},{\"name\":\"dslqxihhrmooizqs\",\"displayName\":\"pxiutc\",\"internalName\":\"pzhyr\",\"toBeExportedForShoebox\":true}]}]}") - .toObject(ServiceSpecification.class); - Assertions.assertEquals("vxilcbt", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("hnze", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("xtjjfzqlqhycav", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("ggxdb", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("smieknlra", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("awiuagyd", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("ogfnzjvusf", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("tgkbugrjqctojc", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("sofieypefojyqd", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("u", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("lcwkhihihlhz", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("qtz", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("nowc", model.metricSpecifications().get(0).delegateMetricNameOverride()); - Assertions.assertEquals("mvec", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("txmwoteyow", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals("uqovekqvgqouwif", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals(false, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceSpecification model = - new ServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new MetricSpecifications() - .withName("vxilcbt") - .withDisplayName("hnze") - .withDisplayDescription("xtjjfzqlqhycav") - .withUnit("ggxdb") - .withAggregationType("smieknlra") - .withSupportedAggregationTypes(Arrays.asList("awiuagyd", "qfby", "yr", "giagtcojo")) - .withSupportedTimeGrainTypes(Arrays.asList("ogfnzjvusf", "ld", "ozuxylfsbtkadpys")) - .withEnableRegionalMdmAccount(true) - .withSourceMdmAccount("tgkbugrjqctojc") - .withSourceMdmNamespace("sofieypefojyqd") - .withMetricFilterPattern("u") - .withFillGapWithZero(false) - .withCategory("lcwkhihihlhz") - .withResourceIdDimensionNameOverride("qtz") - .withIsInternal(true) - .withDelegateMetricNameOverride("nowc") - .withDimensions( - Arrays - .asList( - new Dimension() - .withName("mvec") - .withDisplayName("txmwoteyow") - .withInternalName("uqovekqvgqouwif") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("wyivqikf") - .withDisplayName("vhrfsphuagrt") - .withInternalName("kteusqczk") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("xubyjaffmmfblcqc") - .withDisplayName("bgq") - .withInternalName("rtalmet") - .withToBeExportedForShoebox(false), - new Dimension() - .withName("dslqxihhrmooizqs") - .withDisplayName("pxiutc") - .withInternalName("pzhyr") - .withToBeExportedForShoebox(true))))); - model = BinaryData.fromObject(model).toObject(ServiceSpecification.class); - Assertions.assertEquals("vxilcbt", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("hnze", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("xtjjfzqlqhycav", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("ggxdb", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals("smieknlra", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("awiuagyd", model.metricSpecifications().get(0).supportedAggregationTypes().get(0)); - Assertions.assertEquals("ogfnzjvusf", model.metricSpecifications().get(0).supportedTimeGrainTypes().get(0)); - Assertions.assertEquals(true, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("tgkbugrjqctojc", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals("sofieypefojyqd", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("u", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).fillGapWithZero()); - Assertions.assertEquals("lcwkhihihlhz", model.metricSpecifications().get(0).category()); - Assertions.assertEquals("qtz", model.metricSpecifications().get(0).resourceIdDimensionNameOverride()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).isInternal()); - Assertions.assertEquals("nowc", model.metricSpecifications().get(0).delegateMetricNameOverride()); - Assertions.assertEquals("mvec", model.metricSpecifications().get(0).dimensions().get(0).name()); - Assertions.assertEquals("txmwoteyow", model.metricSpecifications().get(0).dimensions().get(0).displayName()); - Assertions - .assertEquals("uqovekqvgqouwif", model.metricSpecifications().get(0).dimensions().get(0).internalName()); - Assertions - .assertEquals(false, model.metricSpecifications().get(0).dimensions().get(0).toBeExportedForShoebox()); - } -} 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 0d79e49200e5..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; - -public final class SshPublicKeyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SshPublicKey model = - BinaryData.fromString("{\"certificateData\":\"imoryocfsfksym\"}").toObject(SshPublicKey.class); - Assertions.assertEquals("imoryocfsfksym", model.certificateData()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SshPublicKey model = new SshPublicKey().withCertificateData("imoryocfsfksym"); - model = BinaryData.fromObject(model).toObject(SshPublicKey.class); - Assertions.assertEquals("imoryocfsfksym", 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 e003a588e0b5..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsageTests.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.Usage; -import org.junit.jupiter.api.Assertions; - -public final class UsageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Usage model = - BinaryData - .fromString( - "{\"unit\":\"mciodhkhazxkhn\",\"currentValue\":1031605542268068469,\"limit\":5106824512288532592,\"name\":{\"value\":\"egokdwbwhkszzcmr\",\"localizedValue\":\"xztvbtqgsfraoyzk\"}}") - .toObject(Usage.class); - Assertions.assertEquals("mciodhkhazxkhn", model.unit()); - Assertions.assertEquals(1031605542268068469L, model.currentValue()); - Assertions.assertEquals(5106824512288532592L, model.limit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Usage model = - new Usage() - .withUnit("mciodhkhazxkhn") - .withCurrentValue(1031605542268068469L) - .withLimit(5106824512288532592L); - model = BinaryData.fromObject(model).toObject(Usage.class); - Assertions.assertEquals("mciodhkhazxkhn", model.unit()); - Assertions.assertEquals(1031605542268068469L, model.currentValue()); - Assertions.assertEquals(5106824512288532592L, 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 a524f693d8b4..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UsagesListResultInnerTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.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; - -public final class UsagesListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsagesListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"unit\":\"gkfbtndoaong\",\"currentValue\":1271439560574404501,\"limit\":3888691267660480720,\"name\":{\"value\":\"c\",\"localizedValue\":\"df\"}},{\"unit\":\"waezkojvd\",\"currentValue\":5361825295052268042,\"limit\":6459666134329406148,\"name\":{\"value\":\"cybxa\",\"localizedValue\":\"gszufoxciqopid\"}}]}") - .toObject(UsagesListResultInner.class); - Assertions.assertEquals("gkfbtndoaong", model.value().get(0).unit()); - Assertions.assertEquals(1271439560574404501L, model.value().get(0).currentValue()); - Assertions.assertEquals(3888691267660480720L, model.value().get(0).limit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsagesListResultInner model = - new UsagesListResultInner() - .withValue( - Arrays - .asList( - new Usage() - .withUnit("gkfbtndoaong") - .withCurrentValue(1271439560574404501L) - .withLimit(3888691267660480720L), - new Usage() - .withUnit("waezkojvd") - .withCurrentValue(5361825295052268042L) - .withLimit(6459666134329406148L))); - model = BinaryData.fromObject(model).toObject(UsagesListResultInner.class); - Assertions.assertEquals("gkfbtndoaong", model.value().get(0).unit()); - Assertions.assertEquals(1271439560574404501L, model.value().get(0).currentValue()); - Assertions.assertEquals(3888691267660480720L, 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 8401ad61b0ce..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/UserAssignedIdentityTests.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.UserAssignedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString("{\"principalId\":\"ualupjmkh\",\"clientId\":\"obbc\",\"tenantId\":\"s\"}") - .toObject(UserAssignedIdentity.class); - Assertions.assertEquals("s", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity().withTenantId("s"); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - Assertions.assertEquals("s", 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 f136dc15e7e0..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionSpecTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - -public final class VersionSpecTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VersionSpec model = - BinaryData - .fromString( - "{\"friendlyName\":\"ncwsob\",\"displayName\":\"csdbnwdcfhuc\",\"isDefault\":true,\"componentVersions\":{\"vxb\":\"vglsbjjca\",\"udutnco\":\"t\",\"xqtvcofu\":\"mr\",\"vkg\":\"f\"}}") - .toObject(VersionSpec.class); - Assertions.assertEquals("ncwsob", model.friendlyName()); - Assertions.assertEquals("csdbnwdcfhuc", model.displayName()); - Assertions.assertEquals(true, model.isDefault()); - Assertions.assertEquals("vglsbjjca", model.componentVersions().get("vxb")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VersionSpec model = - new VersionSpec() - .withFriendlyName("ncwsob") - .withDisplayName("csdbnwdcfhuc") - .withIsDefault(true) - .withComponentVersions(mapOf("vxb", "vglsbjjca", "udutnco", "t", "xqtvcofu", "mr", "vkg", "f")); - model = BinaryData.fromObject(model).toObject(VersionSpec.class); - Assertions.assertEquals("ncwsob", model.friendlyName()); - Assertions.assertEquals("csdbnwdcfhuc", model.displayName()); - Assertions.assertEquals(true, model.isDefault()); - Assertions.assertEquals("vglsbjjca", model.componentVersions().get("vxb")); - } - - @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 1f5f1eaa85e6..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VersionsCapabilityTests.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.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; - -public final class VersionsCapabilityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VersionsCapability model = - BinaryData - .fromString( - "{\"available\":[{\"friendlyName\":\"oruzfgsquyfxrxx\",\"displayName\":\"ptramxj\",\"isDefault\":true,\"componentVersions\":{\"tdooaoj\":\"nwxuqlcvydyp\",\"nuj\":\"niodkooeb\",\"odtji\":\"emmsbvdkc\"}},{\"friendlyName\":\"wj\",\"displayName\":\"lt\",\"isDefault\":true,\"componentVersions\":{\"akggkfpag\":\"efkdlf\",\"lyls\":\"owpulpq\",\"agxsdszuemps\":\"xkqjnsjervt\",\"nqicvinvkjjxdxrb\":\"zkfzbeyv\"}},{\"friendlyName\":\"kzclewyh\",\"displayName\":\"wp\",\"isDefault\":true,\"componentVersions\":{\"yq\":\"ofncckwyfzqwhxxb\",\"ztppriolxorjalto\":\"xzfe\"}}]}") - .toObject(VersionsCapability.class); - Assertions.assertEquals("oruzfgsquyfxrxx", model.available().get(0).friendlyName()); - Assertions.assertEquals("ptramxj", model.available().get(0).displayName()); - Assertions.assertEquals(true, model.available().get(0).isDefault()); - Assertions.assertEquals("nwxuqlcvydyp", model.available().get(0).componentVersions().get("tdooaoj")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VersionsCapability model = - new VersionsCapability() - .withAvailable( - Arrays - .asList( - new VersionSpec() - .withFriendlyName("oruzfgsquyfxrxx") - .withDisplayName("ptramxj") - .withIsDefault(true) - .withComponentVersions( - mapOf("tdooaoj", "nwxuqlcvydyp", "nuj", "niodkooeb", "odtji", "emmsbvdkc")), - new VersionSpec() - .withFriendlyName("wj") - .withDisplayName("lt") - .withIsDefault(true) - .withComponentVersions( - mapOf( - "akggkfpag", - "efkdlf", - "lyls", - "owpulpq", - "agxsdszuemps", - "xkqjnsjervt", - "nqicvinvkjjxdxrb", - "zkfzbeyv")), - new VersionSpec() - .withFriendlyName("kzclewyh") - .withDisplayName("wp") - .withIsDefault(true) - .withComponentVersions(mapOf("yq", "ofncckwyfzqwhxxb", "ztppriolxorjalto", "xzfe")))); - model = BinaryData.fromObject(model).toObject(VersionsCapability.class); - Assertions.assertEquals("oruzfgsquyfxrxx", model.available().get(0).friendlyName()); - Assertions.assertEquals("ptramxj", model.available().get(0).displayName()); - Assertions.assertEquals(true, model.available().get(0).isDefault()); - Assertions.assertEquals("nwxuqlcvydyp", model.available().get(0).componentVersions().get("tdooaoj")); - } - - @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 4862154360dd..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualMachinesRestartHostsMockTests.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.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( - "fqivj", "euy", Arrays.asList("bmnwa", "ltbxoeeonqlnfw", "y"), com.azure.core.util.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 ce2844146e44..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VirtualNetworkProfileTests.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.VirtualNetworkProfile; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkProfile model = - BinaryData.fromString("{\"id\":\"ys\",\"subnet\":\"i\"}").toObject(VirtualNetworkProfile.class); - Assertions.assertEquals("ys", model.id()); - Assertions.assertEquals("i", model.subnet()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkProfile model = new VirtualNetworkProfile().withId("ys").withSubnet("i"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkProfile.class); - Assertions.assertEquals("ys", model.id()); - Assertions.assertEquals("i", 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 43139b9325f1..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizeCompatibilityFilterV2Tests.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.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; - -public final class VmSizeCompatibilityFilterV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmSizeCompatibilityFilterV2 model = - BinaryData - .fromString( - "{\"filterMode\":\"Recommend\",\"regions\":[\"jlpijnkrx\",\"rddh\",\"ratiz\"],\"clusterFlavors\":[\"nasx\",\"ft\",\"zq\"],\"nodeTypes\":[\"f\",\"wesgogczh\",\"nnxk\"],\"clusterVersions\":[\"nyhmossxkkgthr\",\"gh\",\"jbdhqxvc\"],\"osType\":[\"Windows\",\"Windows\",\"Linux\",\"Windows\"],\"vmSizes\":[\"bshrnsvbuswd\",\"z\",\"ybycnunvj\",\"rtkfawnopq\"],\"espApplied\":\"kyzirtxdyux\",\"computeIsolationSupported\":\"jntpsewgioilqu\"}") - .toObject(VmSizeCompatibilityFilterV2.class); - Assertions.assertEquals(FilterMode.RECOMMEND, model.filterMode()); - Assertions.assertEquals("jlpijnkrx", model.regions().get(0)); - Assertions.assertEquals("nasx", model.clusterFlavors().get(0)); - Assertions.assertEquals("f", model.nodeTypes().get(0)); - Assertions.assertEquals("nyhmossxkkgthr", model.clusterVersions().get(0)); - Assertions.assertEquals(OSType.WINDOWS, model.osType().get(0)); - Assertions.assertEquals("bshrnsvbuswd", model.vmSizes().get(0)); - Assertions.assertEquals("kyzirtxdyux", model.espApplied()); - Assertions.assertEquals("jntpsewgioilqu", model.computeIsolationSupported()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmSizeCompatibilityFilterV2 model = - new VmSizeCompatibilityFilterV2() - .withFilterMode(FilterMode.RECOMMEND) - .withRegions(Arrays.asList("jlpijnkrx", "rddh", "ratiz")) - .withClusterFlavors(Arrays.asList("nasx", "ft", "zq")) - .withNodeTypes(Arrays.asList("f", "wesgogczh", "nnxk")) - .withClusterVersions(Arrays.asList("nyhmossxkkgthr", "gh", "jbdhqxvc")) - .withOsType(Arrays.asList(OSType.WINDOWS, OSType.WINDOWS, OSType.LINUX, OSType.WINDOWS)) - .withVmSizes(Arrays.asList("bshrnsvbuswd", "z", "ybycnunvj", "rtkfawnopq")) - .withEspApplied("kyzirtxdyux") - .withComputeIsolationSupported("jntpsewgioilqu"); - model = BinaryData.fromObject(model).toObject(VmSizeCompatibilityFilterV2.class); - Assertions.assertEquals(FilterMode.RECOMMEND, model.filterMode()); - Assertions.assertEquals("jlpijnkrx", model.regions().get(0)); - Assertions.assertEquals("nasx", model.clusterFlavors().get(0)); - Assertions.assertEquals("f", model.nodeTypes().get(0)); - Assertions.assertEquals("nyhmossxkkgthr", model.clusterVersions().get(0)); - Assertions.assertEquals(OSType.WINDOWS, model.osType().get(0)); - Assertions.assertEquals("bshrnsvbuswd", model.vmSizes().get(0)); - Assertions.assertEquals("kyzirtxdyux", model.espApplied()); - Assertions.assertEquals("jntpsewgioilqu", 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 152c43ea711a..000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight/src/test/java/com/azure/resourcemanager/hdinsight/generated/VmSizePropertyTests.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.VmSizeProperty; -import org.junit.jupiter.api.Assertions; - -public final class VmSizePropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VmSizeProperty model = - BinaryData - .fromString( - "{\"name\":\"ydxtqm\",\"cores\":323647852,\"dataDiskStorageTier\":\"orgguf\",\"label\":\"aomtbghhavgrvkff\",\"maxDataDiskCount\":5595663447131926478,\"memoryInMb\":3841332379064621298,\"supportedByVirtualMachines\":true,\"supportedByWebWorkerRoles\":true,\"virtualMachineResourceDiskSizeInMb\":6764739063385765952,\"webWorkerResourceDiskSizeInMb\":7551905176757776284}") - .toObject(VmSizeProperty.class); - Assertions.assertEquals("ydxtqm", model.name()); - Assertions.assertEquals(323647852, model.cores()); - Assertions.assertEquals("orgguf", model.dataDiskStorageTier()); - Assertions.assertEquals("aomtbghhavgrvkff", model.label()); - Assertions.assertEquals(5595663447131926478L, model.maxDataDiskCount()); - Assertions.assertEquals(3841332379064621298L, model.memoryInMb()); - Assertions.assertEquals(true, model.supportedByVirtualMachines()); - Assertions.assertEquals(true, model.supportedByWebWorkerRoles()); - Assertions.assertEquals(6764739063385765952L, model.virtualMachineResourceDiskSizeInMb()); - Assertions.assertEquals(7551905176757776284L, model.webWorkerResourceDiskSizeInMb()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VmSizeProperty model = - new VmSizeProperty() - .withName("ydxtqm") - .withCores(323647852) - .withDataDiskStorageTier("orgguf") - .withLabel("aomtbghhavgrvkff") - .withMaxDataDiskCount(5595663447131926478L) - .withMemoryInMb(3841332379064621298L) - .withSupportedByVirtualMachines(true) - .withSupportedByWebWorkerRoles(true) - .withVirtualMachineResourceDiskSizeInMb(6764739063385765952L) - .withWebWorkerResourceDiskSizeInMb(7551905176757776284L); - model = BinaryData.fromObject(model).toObject(VmSizeProperty.class); - Assertions.assertEquals("ydxtqm", model.name()); - Assertions.assertEquals(323647852, model.cores()); - Assertions.assertEquals("orgguf", model.dataDiskStorageTier()); - Assertions.assertEquals("aomtbghhavgrvkff", model.label()); - Assertions.assertEquals(5595663447131926478L, model.maxDataDiskCount()); - Assertions.assertEquals(3841332379064621298L, model.memoryInMb()); - Assertions.assertEquals(true, model.supportedByVirtualMachines()); - Assertions.assertEquals(true, model.supportedByWebWorkerRoles()); - Assertions.assertEquals(6764739063385765952L, model.virtualMachineResourceDiskSizeInMb()); - Assertions.assertEquals(7551905176757776284L, model.webWorkerResourceDiskSizeInMb()); - } -}