From 2cf00c9b80ed5699465ab4f397e2aa3a2ea674e3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 23 Jan 2024 09:45:26 +0000 Subject: [PATCH] CodeGen from PR 27306 in Azure/azure-rest-api-specs Merge f0145108f0c697ca3ef05f076ae70c6b0a5c7039 into 51a6e410cf9752dfdaad71f0f9778645d737d8c4 --- .../CHANGELOG.md | 4 +- .../README.md | 8 +- .../SAMPLE.md | 787 ++++---- .../pom.xml | 4 +- .../HDInsightContainersManager.java | 135 +- .../AvailableClusterPoolVersionsClient.java | 8 +- .../AvailableClusterVersionsClient.java | 8 +- .../ClusterAvailableUpgradesClient.java | 47 + .../containers/fluent/ClusterJobsClient.java | 46 +- .../ClusterPoolAvailableUpgradesClient.java | 44 + .../containers/fluent/ClusterPoolsClient.java | 131 +- .../containers/fluent/ClustersClient.java | 235 ++- .../HDInsightContainersManagementClient.java | 42 +- .../containers/fluent/LocationsClient.java | 16 +- .../containers/fluent/OperationsClient.java | 16 +- .../models/ClusterAvailableUpgradeInner.java | 75 + .../fluent/models/ClusterInner.java | 40 +- .../ClusterInstanceViewResultInner.java | 44 +- .../ClusterInstanceViewResultProperties.java | 18 +- .../fluent/models/ClusterJobInner.java | 21 +- .../fluent/models/ClusterPatchProperties.java | 14 +- .../ClusterPoolAvailableUpgradeInner.java | 75 + .../fluent/models/ClusterPoolInner.java | 56 +- .../models/ClusterPoolResourceProperties.java | 62 +- .../models/ClusterPoolVersionInner.java | 40 +- .../models/ClusterPoolVersionProperties.java | 22 +- .../models/ClusterResizeProperties.java | 14 +- .../models/ClusterResourceProperties.java | 46 +- .../fluent/models/ClusterVersionInner.java | 50 +- .../models/ClusterVersionProperties.java | 32 +- .../models/NameAvailabilityResultInner.java | 22 +- .../fluent/models/OperationInner.java | 22 +- .../models/ServiceConfigResultInner.java | 44 +- .../models/ServiceConfigResultProperties.java | 42 +- .../fluent/models/TrinoDebugConfig.java | 22 +- .../fluent/models/package-info.java | 4 +- .../containers/fluent/package-info.java | 4 +- ...vailableClusterPoolVersionsClientImpl.java | 200 +- .../AvailableClusterPoolVersionsImpl.java | 7 +- .../AvailableClusterVersionsClientImpl.java | 199 +- .../AvailableClusterVersionsImpl.java | 7 +- .../ClusterAvailableUpgradeImpl.java | 50 + .../ClusterAvailableUpgradesClientImpl.java | 300 +++ .../ClusterAvailableUpgradesImpl.java | 49 + .../implementation/ClusterImpl.java | 69 +- .../ClusterInstanceViewResultImpl.java | 3 +- .../implementation/ClusterJobImpl.java | 3 +- .../implementation/ClusterJobsClientImpl.java | 427 ++-- .../implementation/ClusterJobsImpl.java | 39 +- .../ClusterPoolAvailableUpgradeImpl.java | 50 + ...lusterPoolAvailableUpgradesClientImpl.java | 286 +++ .../ClusterPoolAvailableUpgradesImpl.java | 50 + .../implementation/ClusterPoolImpl.java | 69 +- .../ClusterPoolVersionImpl.java | 8 +- .../ClusterPoolsClientImpl.java | 1110 +++++------ .../implementation/ClusterPoolsImpl.java | 115 +- .../implementation/ClusterVersionImpl.java | 8 +- .../implementation/ClustersClientImpl.java | 1742 ++++++++--------- .../implementation/ClustersImpl.java | 236 ++- ...ightContainersManagementClientBuilder.java | 46 +- ...InsightContainersManagementClientImpl.java | 165 +- .../implementation/LocationsClientImpl.java | 123 +- .../implementation/LocationsImpl.java | 24 +- .../NameAvailabilityResultImpl.java | 3 +- .../implementation/OperationImpl.java | 3 +- .../implementation/OperationsClientImpl.java | 171 +- .../implementation/OperationsImpl.java | 7 +- .../{Utils.java => ResourceManagerUtils.java} | 45 +- .../ServiceConfigResultImpl.java | 3 +- .../implementation/package-info.java | 4 +- .../hdinsight/containers/models/Action.java | 52 +- .../containers/models/ActionType.java | 14 +- .../containers/models/AksClusterProfile.java | 20 +- ...ileAksClusterAgentPoolIdentityProfile.java | 22 +- .../models/AuthorizationProfile.java | 18 +- .../containers/models/AutoscaleProfile.java | 38 +- .../containers/models/AutoscaleType.java | 18 +- .../models/AvailableClusterPoolVersions.java | 8 +- .../models/AvailableClusterVersions.java | 8 +- .../containers/models/CatalogOptions.java | 14 +- .../hdinsight/containers/models/Cluster.java | 161 +- .../models/ClusterAccessProfile.java | 72 + ...usterAksPatchVersionUpgradeProperties.java | 33 + .../models/ClusterAvailableUpgrade.java | 55 + ...lableUpgradeAksPatchUpgradeProperties.java | 115 ++ ...ailableUpgradeHotfixUpgradeProperties.java | 321 +++ .../models/ClusterAvailableUpgradeList.java | 91 + .../ClusterAvailableUpgradeProperties.java | 39 + .../models/ClusterAvailableUpgradeType.java | 53 + .../models/ClusterAvailableUpgrades.java | 41 + .../models/ClusterComponentsItem.java | 18 +- .../containers/models/ClusterConfigFile.java | 43 +- .../ClusterHotfixUpgradeProperties.java | 138 ++ .../models/ClusterInstanceViewProperties.java | 40 +- .../ClusterInstanceViewPropertiesStatus.java | 22 +- .../models/ClusterInstanceViewResult.java | 14 +- .../models/ClusterInstanceViewStatus.java | 27 +- .../models/ClusterInstanceViewsResult.java | 16 +- .../containers/models/ClusterJob.java | 16 +- .../containers/models/ClusterJobList.java | 23 +- .../models/ClusterJobProperties.java | 12 +- .../containers/models/ClusterJobs.java | 24 +- .../containers/models/ClusterListResult.java | 16 +- .../ClusterLogAnalyticsApplicationLogs.java | 18 +- .../models/ClusterLogAnalyticsProfile.java | 22 +- .../containers/models/ClusterPatch.java | 55 +- .../containers/models/ClusterPool.java | 180 +- ...rPoolAksPatchVersionUpgradeProperties.java | 125 ++ .../models/ClusterPoolAvailableUpgrade.java | 56 + ...lableUpgradeAksPatchUpgradeProperties.java | 113 ++ .../ClusterPoolAvailableUpgradeList.java | 91 + ...ailableUpgradeNodeOsUpgradeProperties.java | 60 + ...ClusterPoolAvailableUpgradeProperties.java | 39 + .../ClusterPoolAvailableUpgradeType.java | 53 + .../models/ClusterPoolAvailableUpgrades.java | 38 + .../models/ClusterPoolComputeProfile.java | 22 +- .../models/ClusterPoolListResult.java | 16 +- .../ClusterPoolLogAnalyticsProfile.java | 18 +- .../models/ClusterPoolNetworkProfile.java | 120 +- ...lusterPoolNodeOsImageUpdateProperties.java | 33 + .../containers/models/ClusterPoolProfile.java | 20 +- ...olResourcePropertiesAksClusterProfile.java | 18 +- ...lResourcePropertiesClusterPoolProfile.java | 14 +- ...rPoolResourcePropertiesComputeProfile.java | 14 +- ...ResourcePropertiesLogAnalyticsProfile.java | 18 +- ...rPoolResourcePropertiesNetworkProfile.java | 43 +- .../containers/models/ClusterPoolUpgrade.java | 63 + .../models/ClusterPoolUpgradeProperties.java | 39 + .../models/ClusterPoolUpgradeType.java | 53 + .../containers/models/ClusterPoolVersion.java | 26 +- .../models/ClusterPoolVersionsListResult.java | 16 +- .../containers/models/ClusterPools.java | 62 +- .../containers/models/ClusterProfile.java | 217 +- .../models/ClusterPrometheusProfile.java | 14 +- .../models/ClusterRangerPluginProfile.java | 54 + .../containers/models/ClusterResizeData.java | 26 +- .../models/ClusterServiceConfig.java | 28 +- .../models/ClusterServiceConfigsProfile.java | 30 +- .../containers/models/ClusterUpgrade.java | 63 + .../models/ClusterUpgradeProperties.java | 39 + .../containers/models/ClusterUpgradeType.java | 53 + .../containers/models/ClusterVersion.java | 32 +- .../models/ClusterVersionsListResult.java | 16 +- .../hdinsight/containers/models/Clusters.java | 109 +- .../containers/models/ComparisonOperator.java | 26 +- .../containers/models/ComparisonRule.java | 23 +- .../containers/models/ComputeProfile.java | 19 +- .../models/ComputeResourceDefinition.java | 18 +- .../models/ConnectivityProfile.java | 23 +- .../models/ConnectivityProfileWeb.java | 23 +- .../containers/models/ContentEncoding.java | 14 +- .../CurrentClusterAksVersionStatus.java | 53 + .../CurrentClusterPoolAksVersionStatus.java | 53 + .../containers/models/DataDiskType.java | 73 + .../DbConnectionAuthenticationMode.java | 54 + .../containers/models/DeploymentMode.java | 54 + .../containers/models/DiskStorageProfile.java | 90 + .../models/FlinkCatalogOptions.java | 14 +- .../models/FlinkHiveCatalogOption.java | 78 +- .../containers/models/FlinkJobProfile.java | 208 ++ .../containers/models/FlinkJobProperties.java | 88 +- .../containers/models/FlinkProfile.java | 112 +- .../models/FlinkStorageProfile.java | 23 +- .../containers/models/HiveCatalogOption.java | 96 +- .../containers/models/IdentityProfile.java | 37 +- .../hdinsight/containers/models/JobType.java | 14 +- .../models/KafkaConnectivityEndpoints.java | 81 + .../containers/models/KafkaProfile.java | 177 ++ .../containers/models/KeyVaultObjectType.java | 22 +- .../containers/models/LoadBasedConfig.java | 35 +- .../containers/models/Locations.java | 16 +- ...tastoreDbConnectionAuthenticationMode.java | 55 + .../models/NameAvailabilityParameters.java | 18 +- .../models/NameAvailabilityResult.java | 12 +- .../containers/models/NodeProfile.java | 32 +- .../containers/models/Operation.java | 16 +- .../containers/models/OperationDisplay.java | 18 +- .../models/OperationListResult.java | 14 +- .../containers/models/Operations.java | 16 +- .../hdinsight/containers/models/Origin.java | 18 +- .../containers/models/OutboundType.java | 55 + .../containers/models/ProvisioningStatus.java | 26 +- .../containers/models/RangerAdminSpec.java | 97 + .../models/RangerAdminSpecDatabase.java | 143 ++ .../containers/models/RangerAuditSpec.java | 56 + .../containers/models/RangerProfile.java | 124 ++ .../containers/models/RangerUsersyncMode.java | 53 + .../containers/models/RangerUsersyncSpec.java | 166 ++ .../containers/models/ScaleActionType.java | 18 +- .../containers/models/ScalingRule.java | 41 +- .../hdinsight/containers/models/Schedule.java | 36 +- .../models/ScheduleBasedConfig.java | 32 +- .../containers/models/ScheduleDay.java | 38 +- .../models/ScriptActionProfile.java | 58 +- .../containers/models/SecretReference.java | 42 +- .../containers/models/SecretsProfile.java | 24 +- .../models/ServiceConfigListResult.java | 16 +- .../ServiceConfigListResultProperties.java | 77 +- .../ServiceConfigListResultValueEntity.java | 24 +- .../models/ServiceConfigResult.java | 22 +- .../containers/models/ServiceStatus.java | 32 +- .../hdinsight/containers/models/Severity.java | 63 + .../containers/models/SparkMetastoreSpec.java | 99 +- .../containers/models/SparkProfile.java | 22 +- .../containers/models/SparkUserPlugin.java | 19 +- .../containers/models/SparkUserPlugins.java | 14 +- .../models/SshConnectivityEndpoint.java | 48 +- .../containers/models/SshProfile.java | 16 +- .../containers/models/TagsObject.java | 14 +- .../containers/models/TrinoCoordinator.java | 28 +- .../containers/models/TrinoProfile.java | 30 +- .../models/TrinoTelemetryConfig.java | 34 +- .../containers/models/TrinoUserPlugin.java | 22 +- .../containers/models/TrinoUserPlugins.java | 14 +- .../containers/models/TrinoUserTelemetry.java | 14 +- .../containers/models/TrinoWorker.java | 24 +- .../models/UpdatableClusterProfile.java | 100 +- .../containers/models/UpgradeMode.java | 59 + .../models/WebConnectivityEndpoint.java | 47 +- .../containers/models/package-info.java | 3 +- .../hdinsight/containers/package-info.java | 5 +- .../src/main/java/module-info.java | 9 +- .../proxy-config.json | 1 + .../reflect-config.json | 746 +++++++ ...sterPoolVersionsListByLocationSamples.java | 10 +- ...eClusterVersionsListByLocationSamples.java | 14 +- .../ClusterAvailableUpgradesListSamples.java | 26 + .../generated/ClusterJobsListSamples.java | 17 +- .../generated/ClusterJobsRunJobSamples.java | 41 +- ...usterPoolAvailableUpgradesListSamples.java | 26 + .../ClusterPoolsCreateOrUpdateSamples.java | 65 +- .../generated/ClusterPoolsDeleteSamples.java | 14 +- ...ClusterPoolsGetByResourceGroupSamples.java | 19 +- ...lusterPoolsListByResourceGroupSamples.java | 10 +- .../generated/ClusterPoolsListSamples.java | 10 +- .../ClusterPoolsUpdateTagsSamples.java | 22 +- .../generated/ClusterPoolsUpgradeSamples.java | 49 + .../generated/ClustersCreateSamples.java | 319 +-- .../generated/ClustersDeleteSamples.java | 14 +- .../ClustersGetInstanceViewSamples.java | 15 +- .../generated/ClustersGetSamples.java | 19 +- .../ClustersListByClusterPoolNameSamples.java | 10 +- .../ClustersListInstanceViewsSamples.java | 10 +- .../ClustersListServiceConfigsSamples.java | 10 +- .../generated/ClustersResizeSamples.java | 25 +- .../generated/ClustersUpdateSamples.java | 179 +- .../generated/ClustersUpgradeSamples.java | 49 + ...LocationsCheckNameAvailabilitySamples.java | 24 +- .../generated/OperationsListSamples.java | 14 +- ...sClusterAgentPoolIdentityProfileTests.java | 36 - .../generated/AksClusterProfileTests.java | 42 - .../generated/AuthorizationProfileTests.java | 34 - .../generated/AutoscaleProfileTests.java | 125 -- ...erPoolVersionsListByLocationMockTests.java | 70 - ...lusterVersionsListByLocationMockTests.java | 72 - .../generated/ClusterComponentsItemTests.java | 29 - .../generated/ClusterConfigFileTests.java | 57 - ...sterInstanceViewPropertiesStatusTests.java | 32 - .../ClusterInstanceViewPropertiesTests.java | 58 - .../ClusterInstanceViewResultInnerTests.java | 60 - ...sterInstanceViewResultPropertiesTests.java | 51 - .../ClusterInstanceViewStatusTests.java | 35 - .../ClusterInstanceViewsResultTests.java | 106 - .../generated/ClusterJobInnerTests.java | 26 - .../generated/ClusterJobListTests.java | 38 - .../generated/ClusterJobPropertiesTests.java | 22 - .../generated/ClusterJobsListMockTests.java | 65 - .../generated/ClusterJobsRunJobMockTests.java | 73 - ...usterLogAnalyticsApplicationLogsTests.java | 30 - .../ClusterLogAnalyticsProfileTests.java | 40 - .../ClusterPoolComputeProfileTests.java | 25 - .../generated/ClusterPoolInnerTests.java | 72 - .../generated/ClusterPoolListResultTests.java | 124 -- .../ClusterPoolLogAnalyticsProfileTests.java | 30 - .../ClusterPoolNetworkProfileTests.java | 25 - .../generated/ClusterPoolProfileTests.java | 25 - ...ourcePropertiesAksClusterProfileTests.java | 42 - ...urcePropertiesClusterPoolProfileTests.java | 28 - ...ResourcePropertiesComputeProfileTests.java | 28 - ...rcePropertiesLogAnalyticsProfileTests.java | 30 - ...ResourcePropertiesNetworkProfileTests.java | 28 - .../ClusterPoolResourcePropertiesTests.java | 52 - .../ClusterPoolVersionInnerTests.java | 33 - .../ClusterPoolVersionPropertiesTests.java | 35 - .../ClusterPoolVersionsListResultTests.java | 50 - .../ClusterPoolsCreateOrUpdateMockTests.java | 105 - .../ClusterPoolsDeleteMockTests.java | 61 - ...tByResourceGroupWithResponseMockTests.java | 77 - ...sterPoolsListByResourceGroupMockTests.java | 75 - .../generated/ClusterPoolsListMockTests.java | 74 - .../ClusterPrometheusProfileTests.java | 25 - .../generated/ClusterResizeDataTests.java | 50 - .../ClusterResizePropertiesTests.java | 25 - .../generated/ClusterServiceConfigTests.java | 91 - .../ClusterServiceConfigsProfileTests.java | 144 -- .../generated/ClusterVersionInnerTests.java | 42 - .../ClusterVersionPropertiesTests.java | 42 - .../ClusterVersionsListResultTests.java | 60 - .../generated/ClustersDeleteMockTests.java | 61 - ...sGetInstanceViewWithResponseMockTests.java | 76 - .../ClustersListInstanceViewsMockTests.java | 74 - .../generated/ComparisonRuleTests.java | 31 - .../generated/ComputeProfileTests.java | 42 - .../ComputeResourceDefinitionTests.java | 30 - .../generated/ConnectivityProfileTests.java | 35 - .../ConnectivityProfileWebTests.java | 25 - .../generated/FlinkJobPropertiesTests.java | 67 - .../generated/IdentityProfileTests.java | 36 - .../generated/LoadBasedConfigTests.java | 81 - ...NameAvailabilityWithResponseMockTests.java | 75 - .../NameAvailabilityParametersTests.java | 29 - .../NameAvailabilityResultInnerTests.java | 32 - .../generated/NodeProfileTests.java | 31 - .../generated/OperationDisplayTests.java | 25 - .../generated/OperationInnerTests.java | 26 - .../generated/OperationListResultTests.java | 25 - .../generated/OperationsListMockTests.java | 64 - .../generated/ScalingRuleTests.java | 45 - .../generated/ScheduleBasedConfigTests.java | 68 - .../containers/generated/ScheduleTests.java | 41 - .../generated/ScriptActionProfileTests.java | 49 - ...rviceConfigListResultValueEntityTests.java | 30 - .../generated/ServiceStatusTests.java | 31 - .../generated/SparkUserPluginTests.java | 24 - .../generated/SparkUserPluginsTests.java | 28 - .../SshConnectivityEndpointTests.java | 25 - .../containers/generated/SshProfileTests.java | 25 - .../containers/generated/TagsObjectTests.java | 53 - .../generated/TrinoCoordinatorTests.java | 39 - .../generated/TrinoDebugConfigTests.java | 31 - .../generated/TrinoTelemetryConfigTests.java | 39 - .../generated/TrinoUserPluginTests.java | 32 - .../generated/TrinoUserPluginsTests.java | 43 - .../generated/TrinoUserTelemetryTests.java | 42 - .../generated/TrinoWorkerTests.java | 31 - .../WebConnectivityEndpointTests.java | 25 - 336 files changed, 11706 insertions(+), 9453 deletions(-) create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterAvailableUpgradesClient.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolAvailableUpgradesClient.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradeImpl.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesClientImpl.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesImpl.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradeImpl.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesClientImpl.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesImpl.java rename sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/{Utils.java => ResourceManagerUtils.java} (80%) create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAccessProfile.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrade.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeList.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeType.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrades.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrade.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeList.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeType.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrades.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgrade.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeType.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterRangerPluginProfile.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgrade.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeProperties.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeType.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterAksVersionStatus.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterPoolAksVersionStatus.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DataDiskType.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DbConnectionAuthenticationMode.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DeploymentMode.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DiskStorageProfile.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProfile.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaConnectivityEndpoints.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaProfile.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MetastoreDbConnectionAuthenticationMode.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OutboundType.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpec.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpecDatabase.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAuditSpec.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerProfile.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncMode.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncSpec.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Severity.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpgradeMode.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/proxy-config.json create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/reflect-config.json create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListSamples.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListSamples.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeSamples.java create mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeSamples.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java delete mode 100644 sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md index a757578de6f8a..4ab9cccbbf3d3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2024-01-23) + +- Azure Resource Manager HDInsightContainers client library for Java. This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-preview-2023-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md index 4c0077a079847..8ac9e242a0584 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md @@ -2,7 +2,7 @@ Azure Resource Manager HDInsightContainers client library for Java. -This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-2023-06-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 HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-preview-2023-11. 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-containers - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md index ba68d039f16a4..fc51a14dd1335 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md @@ -9,11 +9,19 @@ - [ListByLocation](#availableclusterversions_listbylocation) +## ClusterAvailableUpgrades + +- [List](#clusteravailableupgrades_list) + ## ClusterJobs - [List](#clusterjobs_list) - [RunJob](#clusterjobs_runjob) +## ClusterPoolAvailableUpgrades + +- [List](#clusterpoolavailableupgrades_list) + ## ClusterPools - [CreateOrUpdate](#clusterpools_createorupdate) @@ -22,6 +30,7 @@ - [List](#clusterpools_list) - [ListByResourceGroup](#clusterpools_listbyresourcegroup) - [UpdateTags](#clusterpools_updatetags) +- [Upgrade](#clusterpools_upgrade) ## Clusters @@ -34,6 +43,7 @@ - [ListServiceConfigs](#clusters_listserviceconfigs) - [Resize](#clusters_resize) - [Update](#clusters_update) +- [Upgrade](#clusters_upgrade) ## Locations @@ -45,18 +55,19 @@ ### AvailableClusterPoolVersions_ListByLocation ```java -/** Samples for AvailableClusterPoolVersions ListByLocation. */ +/** + * Samples for AvailableClusterPoolVersions ListByLocation. + */ public final class AvailableClusterPoolVersionsListByLocationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListAvailableClusterPoolVersions.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListAvailableClusterPoolVersions.json */ /** * Sample code: ClusterPoolVersionListResult. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolVersionListResult( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void clusterPoolVersionListResult(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.availableClusterPoolVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); } } @@ -65,39 +76,62 @@ public final class AvailableClusterPoolVersionsListByLocationSamples { ### AvailableClusterVersions_ListByLocation ```java -/** Samples for AvailableClusterVersions ListByLocation. */ +/** + * Samples for AvailableClusterVersions ListByLocation. + */ public final class AvailableClusterVersionsListByLocationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListAvailableClusterVersions.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListAvailableClusterVersions.json */ /** * Sample code: ClusterVersionListResult. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterVersionListResult( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void clusterVersionListResult(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.availableClusterVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); } } ``` +### ClusterAvailableUpgrades_List + +```java +/** + * Samples for ClusterAvailableUpgrades List. + */ +public final class ClusterAvailableUpgradesListSamples { + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClusterAvailableUpgrades.json + */ + /** + * Sample code: GetClusterAvailableUpgrade. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void getClusterAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterAvailableUpgrades().list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); + } +} +``` + ### ClusterJobs_List ```java -/** Samples for ClusterJobs List. */ +/** + * Samples for ClusterJobs List. + */ public final class ClusterJobsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterJobs.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClusterJobs.json */ /** * Sample code: ListClusterJobs. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void listClusterJobs( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs().list("hiloResourcegroup", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); + public static void listClusterJobs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterJobs().list("hiloResourcegroup", "clusterPool1", "cluster1", null, com.azure.core.util.Context.NONE); } } ``` @@ -110,40 +144,22 @@ import com.azure.resourcemanager.hdinsight.containers.models.Action; import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for ClusterJobs RunJob. */ +/** + * Samples for ClusterJobs RunJob. + */ public final class ClusterJobsRunJobSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/RunClusterJob.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/RunClusterJob.json */ /** * Sample code: RunClusterJob. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void runClusterJob( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusterJobs() - .runJob( - "hiloResourcegroup", - "clusterpool1", - "cluster1", - new ClusterJobInner() - .withProperties( - new FlinkJobProperties() - .withJobName("flink-job-name") - .withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars") - .withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar") - .withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob") - .withAction(Action.START) - .withFlinkConfiguration( - mapOf( - "parallelism", - "1", - "savepoint.directory", - "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), - com.azure.core.util.Context.NONE); + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void runClusterJob(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterJobs().runJob("hiloResourcegroup", "clusterpool1", "cluster1", new ClusterJobInner().withProperties(new FlinkJobProperties().withJobName("flink-job-name").withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars").withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar").withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob").withAction(Action.START).withFlinkConfiguration(mapOf("parallelism", "1", "savepoint.directory", "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -160,32 +176,74 @@ public final class ClusterJobsRunJobSamples { } ``` +### ClusterPoolAvailableUpgrades_List + +```java +/** + * Samples for ClusterPoolAvailableUpgrades List. + */ +public final class ClusterPoolAvailableUpgradesListSamples { + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClusterPoolAvailableUpgrades.json + */ + /** + * Sample code: GetClusterPoolAvailableUpgrade. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void getClusterPoolAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPoolAvailableUpgrades().list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); + } +} +``` + ### ClusterPools_CreateOrUpdate ```java import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; +import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; +import java.util.stream.Collectors; -/** Samples for ClusterPools CreateOrUpdate. */ +/** + * Samples for ClusterPools CreateOrUpdate. + */ public final class ClusterPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/CreateClusterPool.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/CreateClusterPoolWithPrivateAks.json + */ + /** + * Sample code: ClusterPoolPutWithPrivateAks. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clusterPoolPutWithPrivateAks(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().define("clusterpool1").withRegion("West US 2").withExistingResourceGroup("hiloResourcegroup").withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")).withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")).withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1").withEnablePrivateApiServer(true)).create(); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/CreateClusterPoolWithUDRAks.json + */ + /** + * Sample code: ClusterPoolPutWithUDRAks. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clusterPoolPutWithUDRAks(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().define("clusterpool1").withRegion("West US 2").withExistingResourceGroup("hiloResourcegroup").withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")).withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")).withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1").withOutboundType(OutboundType.USER_DEFINED_ROUTING)).create(); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/CreateClusterPool.json */ /** * Sample code: ClusterPoolPut. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolPut( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusterPools() - .define("clusterpool1") - .withRegion("West US 2") - .withExistingResourceGroup("hiloResourcegroup") - .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")) - .create(); + public static void clusterPoolPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().define("clusterpool1").withRegion("West US 2").withExistingResourceGroup("hiloResourcegroup").withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")).withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")).create(); } } ``` @@ -193,18 +251,19 @@ public final class ClusterPoolsCreateOrUpdateSamples { ### ClusterPools_Delete ```java -/** Samples for ClusterPools Delete. */ +/** + * Samples for ClusterPools Delete. + */ public final class ClusterPoolsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/DeleteClusterPool.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/DeleteClusterPool.json */ /** * Sample code: ClusterPoolDelete. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolDelete( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void clusterPoolDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusterPools().delete("rg1", "clusterpool1", com.azure.core.util.Context.NONE); } } @@ -213,21 +272,20 @@ public final class ClusterPoolsDeleteSamples { ### ClusterPools_GetByResourceGroup ```java -/** Samples for ClusterPools GetByResourceGroup. */ +/** + * Samples for ClusterPools GetByResourceGroup. + */ public final class ClusterPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetClusterPool.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/GetClusterPool.json */ /** * Sample code: ClusterPoolGet. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolGet( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); + public static void clusterPoolGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); } } ``` @@ -235,18 +293,19 @@ public final class ClusterPoolsGetByResourceGroupSamples { ### ClusterPools_List ```java -/** Samples for ClusterPools List. */ +/** + * Samples for ClusterPools List. + */ public final class ClusterPoolsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterPoolsSubscription.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClusterPoolsSubscription.json */ /** * Sample code: ClusterPoolsListBySubscription. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolsListBySubscription( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void clusterPoolsListBySubscription(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusterPools().list(com.azure.core.util.Context.NONE); } } @@ -255,18 +314,19 @@ public final class ClusterPoolsListSamples { ### ClusterPools_ListByResourceGroup ```java -/** Samples for ClusterPools ListByResourceGroup. */ +/** + * Samples for ClusterPools ListByResourceGroup. + */ public final class ClusterPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterPools.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClusterPools.json */ /** * Sample code: ClusterPoolsListByResourceGroup. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolsListByResourceGroup( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void clusterPoolsListByResourceGroup(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusterPools().listByResourceGroup("hiloResourcegroup", com.azure.core.util.Context.NONE); } } @@ -279,23 +339,20 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; import java.util.HashMap; import java.util.Map; -/** Samples for ClusterPools UpdateTags. */ +/** + * Samples for ClusterPools UpdateTags. + */ public final class ClusterPoolsUpdateTagsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/PatchClusterPool.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/PatchClusterPool.json */ /** * Sample code: ClusterPoolsPatchTags. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolsPatchTags( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - ClusterPool resource = - manager - .clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE) - .getValue(); + public static void clusterPoolsPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + ClusterPool resource = manager.clusterPools().getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -313,12 +370,50 @@ public final class ClusterPoolsUpdateTagsSamples { } ``` +### ClusterPools_Upgrade + +```java +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; + +/** + * Samples for ClusterPools Upgrade. + */ +public final class ClusterPoolsUpgradeSamples { + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/UpgradeNodeOsForClusterPool.json + */ + /** + * Sample code: ClusterPoolsUpgradeNodeOs. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clusterPoolsUpgradeNodeOs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().upgrade("hiloResourcegroup", "clusterpool1", new ClusterPoolUpgrade().withProperties(new ClusterPoolNodeOsImageUpdateProperties()), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/UpgradeAKSPatchVersionForClusterPool.json + */ + /** + * Sample code: ClusterPoolsUpgradeAKSPatchVersion. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clusterPoolsUpgradeAKSPatchVersion(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().upgrade("hiloResourcegroup", "clusterpool1", new ClusterPoolUpgrade().withProperties(new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true).withUpgradeAllClusterNodes(false)), com.azure.core.util.Context.NONE); + } +} +``` + ### Clusters_Create ```java import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAccessProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; @@ -329,6 +424,12 @@ import com.azure.resourcemanager.hdinsight.containers.models.ComputeProfile; import com.azure.resourcemanager.hdinsight.containers.models.IdentityProfile; import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; import com.azure.resourcemanager.hdinsight.containers.models.Schedule; @@ -336,176 +437,62 @@ import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; import com.azure.resourcemanager.hdinsight.containers.models.SparkProfile; import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; +import com.azure.resourcemanager.hdinsight.containers.models.TrinoProfile; import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for Clusters Create. */ +/** + * Samples for Clusters Create. + */ public final class ClustersCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/CreateSparkCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/CreateSparkCluster.json */ /** * Sample code: HDInsightSparkClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightSparkClusterPut( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withClusterType("spark") - .withComputeProfile( - new ComputeProfile() - .withNodes( - Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))) - .withClusterProfile( - new ClusterProfile() - .withClusterVersion("0.0.1") - .withOssVersion("2.2.3") - .withIdentityProfile( - new IdentityProfile() - .withMsiResourceId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") - .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") - .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) - .withServiceConfigsProfiles( - Arrays - .asList( - new ClusterServiceConfigsProfile() - .withServiceName("spark-service") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("spark-config") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("spark-defaults.conf") - .withValues( - mapOf("spark.eventLog.enabled", "true")))))), - new ClusterServiceConfigsProfile() - .withServiceName("yarn-service") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("yarn-config") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("core-site.xml") - .withValues( - mapOf( - "fs.defaultFS", - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - "storage.container", - "testcontainer", - "storage.key", - "fakeTokenPlaceholder", - "storage.name", - "teststorage", - "storage.protocol", - "wasb")), - new ClusterConfigFile() - .withFileName("yarn-site.xml") - .withValues( - mapOf("yarn.webapp.ui2.enable", "false")))))))) - .withSshProfile(new SshProfile().withCount(2)) - .withSparkProfile(new SparkProfile())) - .create(); - } - - /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/CreateAutoscaleCluster.json + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightSparkClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().define("cluster1").withRegion("West US 2").withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("spark").withComputeProfile(new ComputeProfile().withNodes(Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))).withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1").withOssVersion("2.2.3").withIdentityProfile(new IdentityProfile().withMsiResourceId("/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi").withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34").withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")).withAuthorizationProfile(new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))).withServiceConfigsProfiles(Arrays.asList(new ClusterServiceConfigsProfile().withServiceName("spark-service").withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("spark-config").withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf").withValues(mapOf("spark.eventLog.enabled", "true")))))), new ClusterServiceConfigsProfile().withServiceName("yarn-service").withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config").withFiles(Arrays.asList(new ClusterConfigFile().withFileName("core-site.xml").withValues(mapOf("fs.defaultFS", "wasb://testcontainer@teststorage.dfs.core.windows.net/", "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", "storage.name", "teststorage", "storage.protocol", "wasb")), new ClusterConfigFile().withFileName("yarn-site.xml").withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))).withSshProfile(new SshProfile().withCount(2)).withSparkProfile(new SparkProfile())).create(); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/CreateSparkClusterWithInternalIngress.json + */ + /** + * Sample code: HDInsightSparkClusterPutWithInternalIngress. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightSparkClusterPutWithInternalIngress(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().define("cluster1").withRegion("West US 2").withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("spark").withComputeProfile(new ComputeProfile().withNodes(Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))).withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1").withOssVersion("2.2.3").withIdentityProfile(new IdentityProfile().withMsiResourceId("/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi").withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34").withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")).withAuthorizationProfile(new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))).withServiceConfigsProfiles(Arrays.asList(new ClusterServiceConfigsProfile().withServiceName("spark-service").withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("spark-config").withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf").withValues(mapOf("spark.eventLog.enabled", "true")))))), new ClusterServiceConfigsProfile().withServiceName("yarn-service").withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config").withFiles(Arrays.asList(new ClusterConfigFile().withFileName("core-site.xml").withValues(mapOf("fs.defaultFS", "wasb://testcontainer@teststorage.dfs.core.windows.net/", "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", "storage.name", "teststorage", "storage.protocol", "wasb")), new ClusterConfigFile().withFileName("yarn-site.xml").withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))).withClusterAccessProfile(new ClusterAccessProfile().withEnableInternalIngress(true)).withSshProfile(new SshProfile().withCount(2)).withSparkProfile(new SparkProfile())).create(); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/CreateAutoscaleCluster.json */ /** * Sample code: HDInsightClusterPut. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClusterPut( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withClusterType("kafka") - .withComputeProfile( - new ComputeProfile() - .withNodes( - Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))) - .withClusterProfile( - new ClusterProfile() - .withClusterVersion("1.0.1") - .withOssVersion("2.4.1") - .withIdentityProfile( - new IdentityProfile() - .withMsiResourceId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") - .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") - .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) - .withSshProfile(new SshProfile().withCount(2)) - .withAutoscaleProfile( - new AutoscaleProfile() - .withEnabled(true) - .withGracefulDecommissionTimeout(3600) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) - .withScheduleBasedConfig( - new ScheduleBasedConfig() - .withTimeZone("Cen. Australia Standard Time") - .withDefaultCount(10) - .withSchedules( - Arrays - .asList( - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(20) - .withDays(Arrays.asList(ScheduleDay.MONDAY)), - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(25) - .withDays(Arrays.asList(ScheduleDay.SUNDAY))))) - .withLoadBasedConfig( - new LoadBasedConfig() - .withMinNodes(10) - .withMaxNodes(20) - .withPollInterval(60) - .withCooldownPeriod(300) - .withScalingRules( - Arrays - .asList( - new ScalingRule() - .withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(3) - .withScalingMetric("cpu") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.GREATER_THAN) - .withThreshold(90f)), - new ScalingRule() - .withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(3) - .withScalingMetric("cpu") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(20f)))))) - .withKafkaProfile(mapOf())) - .create(); + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().define("cluster1").withRegion("West US 2").withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("Trino").withComputeProfile(new ComputeProfile().withNodes(Arrays.asList(new NodeProfile().withType("Head").withVmSize("Standard_E8as_v5").withCount(2), new NodeProfile().withType("Worker").withVmSize("Standard_E8as_v5").withCount(3)))).withClusterProfile(new ClusterProfile().withClusterVersion("1.0.6").withOssVersion("0.410.0").withIdentityProfile(new IdentityProfile().withMsiResourceId("/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi").withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34").withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")).withAuthorizationProfile(new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))).withSshProfile(new SshProfile().withCount(2)).withAutoscaleProfile(new AutoscaleProfile().withEnabled(true).withGracefulDecommissionTimeout(3600).withAutoscaleType(AutoscaleType.SCHEDULE_BASED).withScheduleBasedConfig(new ScheduleBasedConfig().withTimeZone("Cen. Australia Standard Time").withDefaultCount(10).withSchedules(Arrays.asList(new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(20).withDays(Arrays.asList(ScheduleDay.MONDAY)), new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(25).withDays(Arrays.asList(ScheduleDay.SUNDAY))))).withLoadBasedConfig(new LoadBasedConfig().withMinNodes(10).withMaxNodes(20).withPollInterval(60).withCooldownPeriod(300).withScalingRules(Arrays.asList(new ScalingRule().withActionType(ScaleActionType.SCALEUP).withEvaluationCount(3).withScalingMetric("cpu").withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.GREATER_THAN).withThreshold(90f)), new ScalingRule().withActionType(ScaleActionType.SCALEDOWN).withEvaluationCount(3).withScalingMetric("cpu").withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN).withThreshold(20f)))))).withTrinoProfile(new TrinoProfile())).create(); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/CreateRangerCluster.json + */ + /** + * Sample code: HDInsightRangerClusterPut. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightRangerClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().define("cluster1").withRegion("West US 2").withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("ranger").withComputeProfile(new ComputeProfile().withNodes(Arrays.asList(new NodeProfile().withType("head").withVmSize("Standard_D3_v2").withCount(2)))).withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1").withOssVersion("2.2.3").withIdentityProfile(new IdentityProfile().withMsiResourceId("/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi").withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34").withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")).withAuthorizationProfile(new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))).withRangerProfile(new RangerProfile().withRangerAdmin(new RangerAdminSpec().withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")).withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net").withName("testdb").withPasswordSecretRef("fakeTokenPlaceholder").withUsername("admin"))).withRangerAudit(new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")).withRangerUsersync(new RangerUsersyncSpec().withEnabled(true).withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", "13be6971-79db-4f33-9d41-b25589ca25ac")).withMode(RangerUsersyncMode.AUTOMATIC).withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com"))))).create(); } // Use "Map.of" if available @@ -525,18 +512,19 @@ public final class ClustersCreateSamples { ### Clusters_Delete ```java -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/DeleteCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/DeleteCluster.json */ /** * Sample code: HDInsightClustersDelete. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClustersDelete( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void hDInsightClustersDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusters().delete("rg1", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); } } @@ -545,21 +533,20 @@ public final class ClustersDeleteSamples { ### Clusters_Get ```java -/** Samples for Clusters Get. */ +/** + * Samples for Clusters Get. + */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/GetCluster.json */ /** * Sample code: HDInsightClusterGet. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterGet( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); + public static void hDInsightClusterGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -567,21 +554,20 @@ public final class ClustersGetSamples { ### Clusters_GetInstanceView ```java -/** Samples for Clusters GetInstanceView. */ +/** + * Samples for Clusters GetInstanceView. + */ public final class ClustersGetInstanceViewSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetClusterInstanceView.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/GetClusterInstanceView.json */ /** * Sample code: HDInsightClusterGetInstanceView. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterGetInstanceView( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); + public static void hDInsightClusterGetInstanceView(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); } } ``` @@ -589,18 +575,19 @@ public final class ClustersGetInstanceViewSamples { ### Clusters_ListByClusterPoolName ```java -/** Samples for Clusters ListByClusterPoolName. */ +/** + * Samples for Clusters ListByClusterPoolName. + */ public final class ClustersListByClusterPoolNameSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClustersByClusterPoolName.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClustersByClusterPoolName.json */ /** * Sample code: HDInsightClustersListByClusterPoolName. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClustersListByClusterPoolName( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void hDInsightClustersListByClusterPoolName(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusters().listByClusterPoolName("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); } } @@ -609,18 +596,19 @@ public final class ClustersListByClusterPoolNameSamples { ### Clusters_ListInstanceViews ```java -/** Samples for Clusters ListInstanceViews. */ +/** + * Samples for Clusters ListInstanceViews. + */ public final class ClustersListInstanceViewsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterInstanceViews.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClusterInstanceViews.json */ /** * Sample code: HDInsightClusterGetInstanceViews. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterGetInstanceViews( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void hDInsightClusterGetInstanceViews(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusters().listInstanceViews("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); } } @@ -629,18 +617,19 @@ public final class ClustersListInstanceViewsSamples { ### Clusters_ListServiceConfigs ```java -/** Samples for Clusters ListServiceConfigs. */ +/** + * Samples for Clusters ListServiceConfigs. + */ public final class ClustersListServiceConfigsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterServiceConfigs.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ListClusterServiceConfigs.json */ /** * Sample code: HDInsightClusterGetServiceConfigs. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterGetServiceConfigs( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void hDInsightClusterGetServiceConfigs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusters().listServiceConfigs("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); } } @@ -651,26 +640,20 @@ public final class ClustersListServiceConfigsSamples { ```java import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -/** Samples for Clusters Resize. */ +/** + * Samples for Clusters Resize. + */ public final class ClustersResizeSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ResizeCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ResizeCluster.json */ /** * Sample code: HDInsightClusterResize. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterResize( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .resize( - "hiloResourcegroup", - "clusterpool1", - "cluster1", - new ClusterResizeData().withLocation("West US 2").withTargetWorkerNodeCount(5), - com.azure.core.util.Context.NONE); + public static void hDInsightClusterResize(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().resize("hiloResourcegroup", "clusterpool1", "cluster1", new ClusterResizeData().withLocation("West US 2").withTargetWorkerNodeCount(5), com.azure.core.util.Context.NONE); } } ``` @@ -687,6 +670,12 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalytics import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; import com.azure.resourcemanager.hdinsight.containers.models.Schedule; import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; @@ -695,124 +684,36 @@ import com.azure.resourcemanager.hdinsight.containers.models.UpdatableClusterPro import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.stream.Collectors; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/PatchCluster.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/PatchRangerCluster.json + */ + /** + * Sample code: HDInsightRangerClusterPatchTags. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightRangerClusterPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + Cluster resource = manager.clusters().getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile().withRangerAdmin(new RangerAdminSpec().withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")).withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net").withName("testdb").withPasswordSecretRef("fakeTokenPlaceholder").withUsername("admin"))).withRangerAudit(new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")).withRangerUsersync(new RangerUsersyncSpec().withEnabled(true).withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", "13be6971-79db-4f33-9d41-b25589ca25ac")).withMode(RangerUsersyncMode.AUTOMATIC).withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com"))))).apply(); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/PatchCluster.json */ /** * Sample code: HDInsightClustersPatchTags. - * - * @param manager Entry point to HDInsightContainersManager. - */ - public static void hDInsightClustersPatchTags( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = - manager - .clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withClusterProfile( - new UpdatableClusterProfile() - .withServiceConfigsProfiles( - Arrays - .asList( - new ClusterServiceConfigsProfile() - .withServiceName("TestService1") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("TestComp1") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("TestFile1") - .withValues( - mapOf( - "Test.config.1", - "1", - "Test.config.2", - "2")), - new ClusterConfigFile() - .withFileName("TestFile2") - .withValues( - mapOf( - "Test.config.3", - "3", - "Test.config.4", - "4")))), - new ClusterServiceConfig() - .withComponent("TestComp2") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("TestFile3") - .withContent("TestContent") - .withPath("TestPath"), - new ClusterConfigFile() - .withFileName("TestFile4") - .withValues( - mapOf( - "Test.config.7", - "7", - "Test.config.8", - "8")))))), - new ClusterServiceConfigsProfile() - .withServiceName("TestService2") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("TestComp3") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("TestFile5") - .withValues(mapOf("Test.config.9", "9")))))))) - .withSshProfile(new SshProfile().withCount(2)) - .withAutoscaleProfile( - new AutoscaleProfile() - .withEnabled(true) - .withGracefulDecommissionTimeout(-1) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) - .withScheduleBasedConfig( - new ScheduleBasedConfig() - .withTimeZone("Cen. Australia Standard Time") - .withDefaultCount(3) - .withSchedules( - Arrays - .asList( - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays( - Arrays - .asList( - ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays.asList(ScheduleDay.SUNDAY)))))) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("Testuser1", "Testuser2"))) - .withLogAnalyticsProfile( - new ClusterLogAnalyticsProfile() - .withEnabled(true) - .withApplicationLogs( - new ClusterLogAnalyticsApplicationLogs() - .withStdOutEnabled(true) - .withStdErrorEnabled(true)) - .withMetricsEnabled(true))) - .apply(); + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightClustersPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + Cluster resource = manager.clusters().getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE).getValue(); + resource.update().withClusterProfile(new UpdatableClusterProfile().withServiceConfigsProfiles(Arrays.asList(new ClusterServiceConfigsProfile().withServiceName("TestService1").withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("TestComp1").withFiles(Arrays.asList(new ClusterConfigFile().withFileName("TestFile1").withValues(mapOf("Test.config.1", "1", "Test.config.2", "2")), new ClusterConfigFile().withFileName("TestFile2").withValues(mapOf("Test.config.3", "3", "Test.config.4", "4")))), new ClusterServiceConfig().withComponent("TestComp2").withFiles(Arrays.asList(new ClusterConfigFile().withFileName("TestFile3").withContent("TestContent").withPath("TestPath"), new ClusterConfigFile().withFileName("TestFile4").withValues(mapOf("Test.config.7", "7", "Test.config.8", "8")))))), new ClusterServiceConfigsProfile().withServiceName("TestService2").withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("TestComp3").withFiles(Arrays.asList(new ClusterConfigFile().withFileName("TestFile5").withValues(mapOf("Test.config.9", "9")))))))).withSshProfile(new SshProfile().withCount(2)).withAutoscaleProfile(new AutoscaleProfile().withEnabled(true).withGracefulDecommissionTimeout(-1).withAutoscaleType(AutoscaleType.SCHEDULE_BASED).withScheduleBasedConfig(new ScheduleBasedConfig().withTimeZone("Cen. Australia Standard Time").withDefaultCount(3).withSchedules(Arrays.asList(new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(3).withDays(Arrays.asList(ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(3).withDays(Arrays.asList(ScheduleDay.SUNDAY)))))).withAuthorizationProfile(new AuthorizationProfile().withUserIds(Arrays.asList("Testuser1", "Testuser2"))).withLogAnalyticsProfile(new ClusterLogAnalyticsProfile().withEnabled(true).withApplicationLogs(new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true).withStdErrorEnabled(true)).withMetricsEnabled(true))).apply(); } // Use "Map.of" if available @@ -829,31 +730,62 @@ public final class ClustersUpdateSamples { } ``` +### Clusters_Upgrade + +```java +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; + +/** + * Samples for Clusters Upgrade. + */ +public final class ClustersUpgradeSamples { + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/UpgradeAKSPatchVersionForCluster.json + */ + /** + * Sample code: ClustersUpgradeAKSPatchVersion. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clustersUpgradeAKSPatchVersion(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().upgrade("hiloResourcegroup", "clusterpool1", "cluster1", new ClusterUpgrade().withProperties(new ClusterAksPatchVersionUpgradeProperties()), com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/UpgradeHotfixForCluster.json + */ + /** + * Sample code: ClustersUpgradeHotfix. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clustersUpgradeHotfix(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().upgrade("hiloResourcegroup", "clusterpool1", "cluster1", new ClusterUpgrade().withProperties(new ClusterHotfixUpgradeProperties().withTargetOssVersion("1.16.0").withTargetClusterVersion("1.0.6").withTargetBuildNumber("3").withComponentName("historyserver")), com.azure.core.util.Context.NONE); + } +} +``` + ### Locations_CheckNameAvailability ```java import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -/** Samples for Locations CheckNameAvailability. */ +/** + * Samples for Locations CheckNameAvailability. + */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/LocationsNameAvailability.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/LocationsNameAvailability.json */ /** * Sample code: LocationsNameAvailability. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void locationsNameAvailability( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .locations() - .checkNameAvailabilityWithResponse( - "southeastasia", - new NameAvailabilityParameters() - .withName("contosemember1") - .withType("Microsoft.HDInsight/clusterPools/clusters"), - com.azure.core.util.Context.NONE); + public static void locationsNameAvailability(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.locations().checkNameAvailabilityWithResponse("southeastasia", new NameAvailabilityParameters().withName("contosemember1").withType("Microsoft.HDInsight/clusterPools/clusters"), com.azure.core.util.Context.NONE); } } ``` @@ -861,18 +793,19 @@ public final class LocationsCheckNameAvailabilitySamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetOperations.json + * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/GetOperations.json */ /** * Sample code: ListOperations. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void listOperations( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void listOperations(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml index 772192ba4a910..577dcff081f76 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for HDInsightContainers Management - This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Containers Management Client. Package tag package-2023-06-preview. + This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. HDInsight Containers Management Client. Package tag package-preview-2023-11. https://github.com/Azure/azure-sdk-for-java @@ -88,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java index 4e39035d863de..d7c97053129ac 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java @@ -26,7 +26,9 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.HDInsightContainersManagementClient; import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterPoolVersionsImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterVersionsImpl; +import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterAvailableUpgradesImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterJobsImpl; +import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolAvailableUpgradesImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.ClustersImpl; import com.azure.resourcemanager.hdinsight.containers.implementation.HDInsightContainersManagementClientBuilder; @@ -34,7 +36,9 @@ import com.azure.resourcemanager.hdinsight.containers.implementation.OperationsImpl; import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterPoolVersions; import com.azure.resourcemanager.hdinsight.containers.models.AvailableClusterVersions; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrades; import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobs; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrades; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools; import com.azure.resourcemanager.hdinsight.containers.models.Clusters; import com.azure.resourcemanager.hdinsight.containers.models.Locations; @@ -46,12 +50,19 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to HDInsightContainersManager. HDInsight Containers Management Client. */ +/** + * Entry point to HDInsightContainersManager. + * HDInsight Containers Management Client. + */ public final class HDInsightContainersManager { private ClusterPools clusterPools; + private ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades; + private Clusters clusters; + private ClusterAvailableUpgrades clusterAvailableUpgrades; + private ClusterJobs clusterJobs; private Locations locations; @@ -67,18 +78,14 @@ public final class HDInsightContainersManager { private HDInsightContainersManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new HDInsightContainersManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new HDInsightContainersManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of HDInsightContainers service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the HDInsightContainers service API instance. @@ -91,7 +98,7 @@ public static HDInsightContainersManager authenticate(TokenCredential credential /** * Creates an instance of HDInsightContainers service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the HDInsightContainers service API instance. @@ -104,14 +111,16 @@ public static HDInsightContainersManager authenticate(HttpPipeline httpPipeline, /** * Gets a Configurable instance that can be used to create HDInsightContainersManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new HDInsightContainersManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -183,8 +192,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -201,8 +210,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -222,21 +231,12 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.hdinsight.containers") - .append("/") - .append("1.0.0-beta.1"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.hdinsight.containers") + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -255,38 +255,25 @@ public HDInsightContainersManager authenticate(TokenCredential credential, Azure policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new HDInsightContainersManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of ClusterPools. It manages ClusterPool. - * + * * @return Resource collection API of ClusterPools. */ public ClusterPools clusterPools() { @@ -296,9 +283,22 @@ public ClusterPools clusterPools() { return clusterPools; } + /** + * Gets the resource collection API of ClusterPoolAvailableUpgrades. + * + * @return Resource collection API of ClusterPoolAvailableUpgrades. + */ + public ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades() { + if (this.clusterPoolAvailableUpgrades == null) { + this.clusterPoolAvailableUpgrades + = new ClusterPoolAvailableUpgradesImpl(clientObject.getClusterPoolAvailableUpgrades(), this); + } + return clusterPoolAvailableUpgrades; + } + /** * Gets the resource collection API of Clusters. It manages Cluster. - * + * * @return Resource collection API of Clusters. */ public Clusters clusters() { @@ -308,9 +308,22 @@ public Clusters clusters() { return clusters; } + /** + * Gets the resource collection API of ClusterAvailableUpgrades. + * + * @return Resource collection API of ClusterAvailableUpgrades. + */ + public ClusterAvailableUpgrades clusterAvailableUpgrades() { + if (this.clusterAvailableUpgrades == null) { + this.clusterAvailableUpgrades + = new ClusterAvailableUpgradesImpl(clientObject.getClusterAvailableUpgrades(), this); + } + return clusterAvailableUpgrades; + } + /** * Gets the resource collection API of ClusterJobs. - * + * * @return Resource collection API of ClusterJobs. */ public ClusterJobs clusterJobs() { @@ -322,7 +335,7 @@ public ClusterJobs clusterJobs() { /** * Gets the resource collection API of Locations. - * + * * @return Resource collection API of Locations. */ public Locations locations() { @@ -334,7 +347,7 @@ public Locations locations() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -346,26 +359,26 @@ public Operations operations() { /** * Gets the resource collection API of AvailableClusterPoolVersions. - * + * * @return Resource collection API of AvailableClusterPoolVersions. */ public AvailableClusterPoolVersions availableClusterPoolVersions() { if (this.availableClusterPoolVersions == null) { - this.availableClusterPoolVersions = - new AvailableClusterPoolVersionsImpl(clientObject.getAvailableClusterPoolVersions(), this); + this.availableClusterPoolVersions + = new AvailableClusterPoolVersionsImpl(clientObject.getAvailableClusterPoolVersions(), this); } return availableClusterPoolVersions; } /** * Gets the resource collection API of AvailableClusterVersions. - * + * * @return Resource collection API of AvailableClusterVersions. */ public AvailableClusterVersions availableClusterVersions() { if (this.availableClusterVersions == null) { - this.availableClusterVersions = - new AvailableClusterVersionsImpl(clientObject.getAvailableClusterVersions(), this); + this.availableClusterVersions + = new AvailableClusterVersionsImpl(clientObject.getAvailableClusterVersions(), this); } return availableClusterVersions; } @@ -373,7 +386,7 @@ public AvailableClusterVersions availableClusterVersions() { /** * Gets wrapped service client HDInsightContainersManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. - * + * * @return Wrapped service client HDInsightContainersManagementClient. */ public HDInsightContainersManagementClient serviceClient() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterPoolVersionsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterPoolVersionsClient.java index 884a18b08dbb1..c88550abec117 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterPoolVersionsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterPoolVersionsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -/** An instance of this class provides access to all the operations defined in AvailableClusterPoolVersionsClient. */ +/** + * An instance of this class provides access to all the operations defined in AvailableClusterPoolVersionsClient. + */ public interface AvailableClusterPoolVersionsClient { /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -26,7 +28,7 @@ public interface AvailableClusterPoolVersionsClient { /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterVersionsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterVersionsClient.java index e4a849c6c7857..ade4b45436b07 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterVersionsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/AvailableClusterVersionsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -/** An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient. */ +/** + * An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient. + */ public interface AvailableClusterVersionsClient { /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -26,7 +28,7 @@ public interface AvailableClusterVersionsClient { /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterAvailableUpgradesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterAvailableUpgradesClient.java new file mode 100644 index 0000000000000..c4e794b8385a5 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterAvailableUpgradesClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; + +/** + * An instance of this class provides access to all the operations defined in ClusterAvailableUpgradesClient. + */ +public interface ClusterAvailableUpgradesClient { + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterPoolName, + String clusterName); + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterPoolName, + String clusterName, Context context); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterJobsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterJobsClient.java index 6c97551434ead..931dd88ea3327 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterJobsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterJobsClient.java @@ -12,11 +12,13 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -/** An instance of this class provides access to all the operations defined in ClusterJobsClient. */ +/** + * An instance of this class provides access to all the operations defined in ClusterJobsClient. + */ public interface ClusterJobsClient { /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -27,12 +29,12 @@ public interface ClusterJobsClient { * @return the {@link SyncPoller} for polling of cluster job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterJobInner> beginRunJob( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob); + SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterJobInner clusterJob); /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -44,16 +46,12 @@ SyncPoller, ClusterJobInner> beginRunJob( * @return the {@link SyncPoller} for polling of cluster job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterJobInner> beginRunJob( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context); + SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterJobInner clusterJob, Context context); /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -64,12 +62,12 @@ SyncPoller, ClusterJobInner> beginRunJob( * @return cluster job. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterJobInner runJob( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob); + ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob); /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -81,16 +79,12 @@ ClusterJobInner runJob( * @return cluster job. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterJobInner runJob( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context); + ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob, Context context); /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -104,10 +98,12 @@ ClusterJobInner runJob( /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. + * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq + * {jobName}' or 'jarName eq {jarName}'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -115,6 +111,6 @@ ClusterJobInner runJob( * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, + String filter, Context context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolAvailableUpgradesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolAvailableUpgradesClient.java new file mode 100644 index 0000000000000..b6190cf52402d --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolAvailableUpgradesClient.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; + +/** + * An instance of this class provides access to all the operations defined in ClusterPoolAvailableUpgradesClient. + */ +public interface ClusterPoolAvailableUpgradesClient { + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterPoolName); + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String clusterPoolName, + Context context); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolsClient.java index 3ad36b39f301e..782e4a9fc8f67 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolsClient.java @@ -12,13 +12,16 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; -/** An instance of this class provides access to all the operations defined in ClusterPoolsClient. */ +/** + * An instance of this class provides access to all the operations defined in ClusterPoolsClient. + */ public interface ClusterPoolsClient { /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -28,12 +31,12 @@ public interface ClusterPoolsClient { * @return a cluster pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterPoolName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, + Context context); /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -46,7 +49,7 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -56,12 +59,12 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginCreateOrUpdate( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool); + SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, + String clusterPoolName, ClusterPoolInner clusterPool); /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -72,12 +75,12 @@ SyncPoller, ClusterPoolInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginCreateOrUpdate( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context); + SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, + String clusterPoolName, ClusterPoolInner clusterPool, Context context); /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -91,7 +94,7 @@ SyncPoller, ClusterPoolInner> beginCreateOrUpdate( /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -102,12 +105,12 @@ SyncPoller, ClusterPoolInner> beginCreateOrUpdate( * @return cluster pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner createOrUpdate( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context); + ClusterPoolInner createOrUpdate(String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, + Context context); /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -117,12 +120,12 @@ ClusterPoolInner createOrUpdate( * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginUpdateTags( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags); + SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags); /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -133,12 +136,12 @@ SyncPoller, ClusterPoolInner> beginUpdateTags( * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterPoolInner> beginUpdateTags( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, Context context); + SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags, Context context); /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -152,7 +155,7 @@ SyncPoller, ClusterPoolInner> beginUpdateTags( /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -163,12 +166,12 @@ SyncPoller, ClusterPoolInner> beginUpdateTags( * @return cluster pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterPoolInner updateTags( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, Context context); + ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, + Context context); /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,7 +184,7 @@ ClusterPoolInner updateTags( /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -195,7 +198,7 @@ ClusterPoolInner updateTags( /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -207,7 +210,7 @@ ClusterPoolInner updateTags( /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -220,7 +223,7 @@ ClusterPoolInner updateTags( /** * Gets the list of Cluster Pools within a Subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. @@ -230,7 +233,7 @@ ClusterPoolInner updateTags( /** * Gets the list of Cluster Pools within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -242,7 +245,7 @@ ClusterPoolInner updateTags( /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -254,7 +257,7 @@ ClusterPoolInner updateTags( /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -264,4 +267,66 @@ ClusterPoolInner updateTags( */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cluster pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, + String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest); + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cluster pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, + String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context); + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest); + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClustersClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClustersClient.java index 07e6bd2d067e0..36f90598a2f8e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClustersClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClustersClient.java @@ -16,12 +16,15 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatch; import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; -/** An instance of this class provides access to all the operations defined in ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public interface ClustersClient { /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,7 +37,7 @@ public interface ClustersClient { /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -44,12 +47,78 @@ public interface ClustersClient { * @return the list cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByClusterPoolName( - String resourceGroupName, String clusterPoolName, Context context); + PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, + Context context); + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterUpgrade clusterUpgradeRequest); + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context); + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest); + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest, Context context); /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -60,12 +129,12 @@ PagedIterable listByClusterPoolName( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginResize( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest); + SyncPoller, ClusterInner> beginResize(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterResizeData clusterResizeRequest); /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -77,16 +146,12 @@ SyncPoller, ClusterInner> beginResize( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginResize( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context); + SyncPoller, ClusterInner> beginResize(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterResizeData clusterResizeRequest, Context context); /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -97,12 +162,12 @@ SyncPoller, ClusterInner> beginResize( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner resize( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest); + ClusterInner resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest); /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -114,16 +179,12 @@ ClusterInner resize( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner resize( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context); + ClusterInner resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest, Context context); /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -134,12 +195,12 @@ ClusterInner resize( * @return a HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, + Context context); /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -153,7 +214,7 @@ Response getWithResponse( /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -164,12 +225,12 @@ Response getWithResponse( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterInner hDInsightCluster); + SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterInner hDInsightCluster); /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -181,16 +242,12 @@ SyncPoller, ClusterInner> beginCreate( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterInner hDInsightCluster, - Context context); + SyncPoller, ClusterInner> beginCreate(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterInner hDInsightCluster, Context context); /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -201,12 +258,12 @@ SyncPoller, ClusterInner> beginCreate( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner create( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterInner hDInsightCluster); + ClusterInner create(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterInner hDInsightCluster); /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -218,16 +275,12 @@ ClusterInner create( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner create( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterInner hDInsightCluster, - Context context); + ClusterInner create(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterInner hDInsightCluster, Context context); /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -238,12 +291,12 @@ ClusterInner create( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterPatch clusterPatchRequest); /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -255,16 +308,12 @@ SyncPoller, ClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterPatch clusterPatchRequest, - Context context); + SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterPatch clusterPatchRequest, Context context); /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -275,12 +324,12 @@ SyncPoller, ClusterInner> beginUpdate( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest); + ClusterInner update(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterPatch clusterPatchRequest); /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -292,16 +341,12 @@ ClusterInner update( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInner update( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterPatch clusterPatchRequest, - Context context); + ClusterInner update(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterPatch clusterPatchRequest, Context context); /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -311,12 +356,12 @@ ClusterInner update( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterPoolName, String clusterName); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterPoolName, + String clusterName); /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -327,12 +372,12 @@ SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String clusterPoolName, String clusterName, + Context context); /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -345,7 +390,7 @@ SyncPoller, Void> beginDelete( /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -359,7 +404,7 @@ SyncPoller, Void> beginDelete( /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -369,12 +414,12 @@ SyncPoller, Void> beginDelete( * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName); + PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName); /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -385,12 +430,12 @@ PagedIterable listServiceConfigs( * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName, Context context); /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -400,12 +445,12 @@ PagedIterable listServiceConfigs( * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName); + PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, + String clusterName); /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -416,12 +461,12 @@ PagedIterable listInstanceViews( * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, + String clusterName, Context context); /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -432,12 +477,12 @@ PagedIterable listInstanceViews( * @return the status of a cluster instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getInstanceViewWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + Response getInstanceViewWithResponse(String resourceGroupName, + String clusterPoolName, String clusterName, Context context); /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -447,6 +492,6 @@ Response getInstanceViewWithResponse( * @return the status of a cluster instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - ClusterInstanceViewResultInner getInstanceView( - String resourceGroupName, String clusterPoolName, String clusterName); + ClusterInstanceViewResultInner getInstanceView(String resourceGroupName, String clusterPoolName, + String clusterName); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/HDInsightContainersManagementClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/HDInsightContainersManagementClient.java index 0b9b953e19b7e..091ad26b7807b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/HDInsightContainersManagementClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/HDInsightContainersManagementClient.java @@ -7,88 +7,104 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for HDInsightContainersManagementClient class. */ +/** + * The interface for HDInsightContainersManagementClient class. + */ public interface HDInsightContainersManagementClient { /** * Gets The ID of the target subscription. The value must be an UUID. - * + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the ClusterPoolsClient object to access its operations. - * + * * @return the ClusterPoolsClient object. */ ClusterPoolsClient getClusterPools(); + /** + * Gets the ClusterPoolAvailableUpgradesClient object to access its operations. + * + * @return the ClusterPoolAvailableUpgradesClient object. + */ + ClusterPoolAvailableUpgradesClient getClusterPoolAvailableUpgrades(); + /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ ClustersClient getClusters(); + /** + * Gets the ClusterAvailableUpgradesClient object to access its operations. + * + * @return the ClusterAvailableUpgradesClient object. + */ + ClusterAvailableUpgradesClient getClusterAvailableUpgrades(); + /** * Gets the ClusterJobsClient object to access its operations. - * + * * @return the ClusterJobsClient object. */ ClusterJobsClient getClusterJobs(); /** * Gets the LocationsClient object to access its operations. - * + * * @return the LocationsClient object. */ LocationsClient getLocations(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the AvailableClusterPoolVersionsClient object to access its operations. - * + * * @return the AvailableClusterPoolVersionsClient object. */ AvailableClusterPoolVersionsClient getAvailableClusterPoolVersions(); /** * Gets the AvailableClusterVersionsClient object to access its operations. - * + * * @return the AvailableClusterVersionsClient object. */ AvailableClusterVersionsClient getAvailableClusterVersions(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/LocationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/LocationsClient.java index f111b12e8d20f..8e02e5edf0fab 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/LocationsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/LocationsClient.java @@ -11,11 +11,13 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -/** An instance of this class provides access to all the operations defined in LocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LocationsClient. + */ public interface LocationsClient { /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -25,12 +27,12 @@ public interface LocationsClient { * @return result of check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters nameAvailabilityParameters, Context context); + Response checkNameAvailabilityWithResponse(String location, + NameAvailabilityParameters nameAvailabilityParameters, Context context); /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -39,6 +41,6 @@ Response checkNameAvailabilityWithResponse( * @return result of check name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - NameAvailabilityResultInner checkNameAvailability( - String location, NameAvailabilityParameters nameAvailabilityParameters); + NameAvailabilityResultInner checkNameAvailability(String location, + NameAvailabilityParameters nameAvailabilityParameters); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/OperationsClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/OperationsClient.java index 7fa05ec084a19..64495db5f7a34 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/OperationsClient.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Returns list of operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java new file mode 100644 index 0000000000000..0a2d6aaa8b99c --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster available upgrade. + */ +@Fluent +public final class ClusterAvailableUpgradeInner extends ProxyResource { + /* + * Gets or sets the properties. Define cluster upgrade specific properties. + */ + @JsonProperty(value = "properties") + private ClusterAvailableUpgradeProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ClusterAvailableUpgradeInner class. + */ + public ClusterAvailableUpgradeInner() { + } + + /** + * Get the properties property: Gets or sets the properties. Define cluster upgrade specific properties. + * + * @return the properties value. + */ + public ClusterAvailableUpgradeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Gets or sets the properties. Define cluster upgrade specific properties. + * + * @param properties the properties value to set. + * @return the ClusterAvailableUpgradeInner object itself. + */ + public ClusterAvailableUpgradeInner withProperties(ClusterAvailableUpgradeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java index 467d208900415..0710c0e9cd65e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInner.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The cluster. */ +/** + * The cluster. + */ @Fluent public final class ClusterInner extends Resource { /* @@ -28,13 +30,15 @@ public final class ClusterInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ClusterInner class. */ + /** + * Creates an instance of ClusterInner class. + */ public ClusterInner() { } /** * Get the innerProperties property: Gets or sets the properties. Define cluster specific properties. - * + * * @return the innerProperties value. */ private ClusterResourceProperties innerProperties() { @@ -43,21 +47,25 @@ private ClusterResourceProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInner withTags(Map tags) { super.withTags(tags); @@ -66,7 +74,7 @@ public ClusterInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningStatus provisioningState() { @@ -75,7 +83,7 @@ public ProvisioningStatus provisioningState() { /** * Get the clusterType property: The type of cluster. - * + * * @return the clusterType value. */ public String clusterType() { @@ -84,7 +92,7 @@ public String clusterType() { /** * Set the clusterType property: The type of cluster. - * + * * @param clusterType the clusterType value to set. * @return the ClusterInner object itself. */ @@ -98,7 +106,7 @@ public ClusterInner withClusterType(String clusterType) { /** * Get the deploymentId property: A unique id generated by the RP to identify the resource. - * + * * @return the deploymentId value. */ public String deploymentId() { @@ -107,7 +115,7 @@ public String deploymentId() { /** * Get the computeProfile property: The compute profile. - * + * * @return the computeProfile value. */ public ComputeProfile computeProfile() { @@ -116,7 +124,7 @@ public ComputeProfile computeProfile() { /** * Set the computeProfile property: The compute profile. - * + * * @param computeProfile the computeProfile value to set. * @return the ClusterInner object itself. */ @@ -130,7 +138,7 @@ public ClusterInner withComputeProfile(ComputeProfile computeProfile) { /** * Get the clusterProfile property: Cluster profile. - * + * * @return the clusterProfile value. */ public ClusterProfile clusterProfile() { @@ -139,7 +147,7 @@ public ClusterProfile clusterProfile() { /** * Set the clusterProfile property: Cluster profile. - * + * * @param clusterProfile the clusterProfile value to set. * @return the ClusterInner object itself. */ @@ -153,7 +161,7 @@ public ClusterInner withClusterProfile(ClusterProfile clusterProfile) { /** * Get the status property: Business status of the resource. - * + * * @return the status value. */ public String status() { @@ -162,7 +170,7 @@ public String status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultInner.java index ac86618fece9d..df5290969e581 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster Instance View. */ +/** + * Cluster Instance View. + */ @Fluent public final class ClusterInstanceViewResultInner { /* @@ -26,13 +28,15 @@ public final class ClusterInstanceViewResultInner { @JsonProperty(value = "properties", required = true) private ClusterInstanceViewResultProperties innerProperties = new ClusterInstanceViewResultProperties(); - /** Creates an instance of ClusterInstanceViewResultInner class. */ + /** + * Creates an instance of ClusterInstanceViewResultInner class. + */ public ClusterInstanceViewResultInner() { } /** * Get the name property: Name of the instance view. - * + * * @return the name value. */ public String name() { @@ -41,7 +45,7 @@ public String name() { /** * Set the name property: Name of the instance view. - * + * * @param name the name value to set. * @return the ClusterInstanceViewResultInner object itself. */ @@ -52,7 +56,7 @@ public ClusterInstanceViewResultInner withName(String name) { /** * Get the innerProperties property: Properties of the instance view. - * + * * @return the innerProperties value. */ private ClusterInstanceViewResultProperties innerProperties() { @@ -61,7 +65,7 @@ private ClusterInstanceViewResultProperties innerProperties() { /** * Get the status property: Status of the instance view. - * + * * @return the status value. */ public ClusterInstanceViewPropertiesStatus status() { @@ -70,7 +74,7 @@ public ClusterInstanceViewPropertiesStatus status() { /** * Set the status property: Status of the instance view. - * + * * @param status the status value to set. * @return the ClusterInstanceViewResultInner object itself. */ @@ -83,9 +87,9 @@ public ClusterInstanceViewResultInner withStatus(ClusterInstanceViewPropertiesSt } /** - * Get the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on aks cluster - * to surface to the customer. - * + * Get the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on AKS + * cluster to surface to the customer. + * * @return the serviceStatuses value. */ public List serviceStatuses() { @@ -93,9 +97,9 @@ public List serviceStatuses() { } /** - * Set the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on aks cluster - * to surface to the customer. - * + * Set the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on AKS + * cluster to surface to the customer. + * * @param serviceStatuses the serviceStatuses value to set. * @return the ClusterInstanceViewResultInner object itself. */ @@ -109,21 +113,17 @@ public ClusterInstanceViewResultInner withServiceStatuses(List se /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property name in model ClusterInstanceViewResultInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ClusterInstanceViewResultInner")); } if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model ClusterInstanceViewResultInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property innerProperties in model ClusterInstanceViewResultInner")); } else { innerProperties().validate(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultProperties.java index 9fabab175be33..841ad84694fda 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterInstanceViewResultProperties.java @@ -10,21 +10,29 @@ import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; import java.util.List; -/** Properties of the instance view. */ +/** + * Properties of the instance view. + */ @Fluent public final class ClusterInstanceViewResultProperties extends ClusterInstanceViewProperties { - /** Creates an instance of ClusterInstanceViewResultProperties class. */ + /** + * Creates an instance of ClusterInstanceViewResultProperties class. + */ public ClusterInstanceViewResultProperties() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInstanceViewResultProperties withStatus(ClusterInstanceViewPropertiesStatus status) { super.withStatus(status); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInstanceViewResultProperties withServiceStatuses(List serviceStatuses) { super.withServiceStatuses(serviceStatuses); @@ -33,7 +41,7 @@ public ClusterInstanceViewResultProperties withServiceStatuses(List tags) { super.withTags(tags); @@ -69,7 +77,7 @@ public ClusterPoolInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningStatus provisioningState() { @@ -78,7 +86,7 @@ public ProvisioningStatus provisioningState() { /** * Get the deploymentId property: A unique id generated by the RP to identify the resource. - * + * * @return the deploymentId value. */ public String deploymentId() { @@ -90,7 +98,7 @@ public String deploymentId() { * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name * restriction. - * + * * @return the managedResourceGroupName value. */ public String managedResourceGroupName() { @@ -102,7 +110,7 @@ public String managedResourceGroupName() { * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name * restriction. - * + * * @param managedResourceGroupName the managedResourceGroupName value to set. * @return the ClusterPoolInner object itself. */ @@ -118,7 +126,7 @@ public ClusterPoolInner withManagedResourceGroupName(String managedResourceGroup * Get the aksManagedResourceGroupName property: A resource group created by AKS, to hold the infrastructure * resources created by AKS on-behalf of customers. It is generated by cluster pool name and managed resource group * name by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}. - * + * * @return the aksManagedResourceGroupName value. */ public String aksManagedResourceGroupName() { @@ -127,7 +135,7 @@ public String aksManagedResourceGroupName() { /** * Get the clusterPoolProfile property: CLuster pool profile. - * + * * @return the clusterPoolProfile value. */ public ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile() { @@ -136,7 +144,7 @@ public ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile() { /** * Set the clusterPoolProfile property: CLuster pool profile. - * + * * @param clusterPoolProfile the clusterPoolProfile value to set. * @return the ClusterPoolInner object itself. */ @@ -150,7 +158,7 @@ public ClusterPoolInner withClusterPoolProfile(ClusterPoolResourcePropertiesClus /** * Get the computeProfile property: CLuster pool compute profile. - * + * * @return the computeProfile value. */ public ClusterPoolResourcePropertiesComputeProfile computeProfile() { @@ -159,7 +167,7 @@ public ClusterPoolResourcePropertiesComputeProfile computeProfile() { /** * Set the computeProfile property: CLuster pool compute profile. - * + * * @param computeProfile the computeProfile value to set. * @return the ClusterPoolInner object itself. */ @@ -173,7 +181,7 @@ public ClusterPoolInner withComputeProfile(ClusterPoolResourcePropertiesComputeP /** * Get the aksClusterProfile property: Properties of underlying AKS cluster. - * + * * @return the aksClusterProfile value. */ public ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile() { @@ -182,7 +190,7 @@ public ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile() { /** * Get the networkProfile property: Cluster pool network profile. - * + * * @return the networkProfile value. */ public ClusterPoolResourcePropertiesNetworkProfile networkProfile() { @@ -191,7 +199,7 @@ public ClusterPoolResourcePropertiesNetworkProfile networkProfile() { /** * Set the networkProfile property: Cluster pool network profile. - * + * * @param networkProfile the networkProfile value to set. * @return the ClusterPoolInner object itself. */ @@ -205,7 +213,7 @@ public ClusterPoolInner withNetworkProfile(ClusterPoolResourcePropertiesNetworkP /** * Get the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster. - * + * * @return the logAnalyticsProfile value. */ public ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile() { @@ -214,12 +222,12 @@ public ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile() { /** * Set the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster. - * + * * @param logAnalyticsProfile the logAnalyticsProfile value to set. * @return the ClusterPoolInner object itself. */ - public ClusterPoolInner withLogAnalyticsProfile( - ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) { + public ClusterPoolInner + withLogAnalyticsProfile(ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) { if (this.innerProperties() == null) { this.innerProperties = new ClusterPoolResourceProperties(); } @@ -229,7 +237,7 @@ public ClusterPoolInner withLogAnalyticsProfile( /** * Get the status property: Business status of the resource. - * + * * @return the status value. */ public String status() { @@ -238,7 +246,7 @@ public String status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolResourceProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolResourceProperties.java index 2e65104190ca6..70c23f0da7115 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolResourceProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolResourceProperties.java @@ -14,7 +14,9 @@ import com.azure.resourcemanager.hdinsight.containers.models.ProvisioningStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster pool resource properties. */ +/** + * Cluster pool resource properties. + */ @Fluent public final class ClusterPoolResourceProperties { /* @@ -81,13 +83,15 @@ public final class ClusterPoolResourceProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; - /** Creates an instance of ClusterPoolResourceProperties class. */ + /** + * Creates an instance of ClusterPoolResourceProperties class. + */ public ClusterPoolResourceProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningStatus provisioningState() { @@ -96,7 +100,7 @@ public ProvisioningStatus provisioningState() { /** * Get the deploymentId property: A unique id generated by the RP to identify the resource. - * + * * @return the deploymentId value. */ public String deploymentId() { @@ -108,7 +112,7 @@ public String deploymentId() { * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name * restriction. - * + * * @return the managedResourceGroupName value. */ public String managedResourceGroupName() { @@ -120,7 +124,7 @@ public String managedResourceGroupName() { * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name * restriction. - * + * * @param managedResourceGroupName the managedResourceGroupName value to set. * @return the ClusterPoolResourceProperties object itself. */ @@ -133,7 +137,7 @@ public ClusterPoolResourceProperties withManagedResourceGroupName(String managed * Get the aksManagedResourceGroupName property: A resource group created by AKS, to hold the infrastructure * resources created by AKS on-behalf of customers. It is generated by cluster pool name and managed resource group * name by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}. - * + * * @return the aksManagedResourceGroupName value. */ public String aksManagedResourceGroupName() { @@ -142,7 +146,7 @@ public String aksManagedResourceGroupName() { /** * Get the clusterPoolProfile property: CLuster pool profile. - * + * * @return the clusterPoolProfile value. */ public ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile() { @@ -151,19 +155,19 @@ public ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile() { /** * Set the clusterPoolProfile property: CLuster pool profile. - * + * * @param clusterPoolProfile the clusterPoolProfile value to set. * @return the ClusterPoolResourceProperties object itself. */ - public ClusterPoolResourceProperties withClusterPoolProfile( - ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile) { + public ClusterPoolResourceProperties + withClusterPoolProfile(ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile) { this.clusterPoolProfile = clusterPoolProfile; return this; } /** * Get the computeProfile property: CLuster pool compute profile. - * + * * @return the computeProfile value. */ public ClusterPoolResourcePropertiesComputeProfile computeProfile() { @@ -172,19 +176,19 @@ public ClusterPoolResourcePropertiesComputeProfile computeProfile() { /** * Set the computeProfile property: CLuster pool compute profile. - * + * * @param computeProfile the computeProfile value to set. * @return the ClusterPoolResourceProperties object itself. */ - public ClusterPoolResourceProperties withComputeProfile( - ClusterPoolResourcePropertiesComputeProfile computeProfile) { + public ClusterPoolResourceProperties + withComputeProfile(ClusterPoolResourcePropertiesComputeProfile computeProfile) { this.computeProfile = computeProfile; return this; } /** * Get the aksClusterProfile property: Properties of underlying AKS cluster. - * + * * @return the aksClusterProfile value. */ public ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile() { @@ -193,7 +197,7 @@ public ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile() { /** * Get the networkProfile property: Cluster pool network profile. - * + * * @return the networkProfile value. */ public ClusterPoolResourcePropertiesNetworkProfile networkProfile() { @@ -202,19 +206,19 @@ public ClusterPoolResourcePropertiesNetworkProfile networkProfile() { /** * Set the networkProfile property: Cluster pool network profile. - * + * * @param networkProfile the networkProfile value to set. * @return the ClusterPoolResourceProperties object itself. */ - public ClusterPoolResourceProperties withNetworkProfile( - ClusterPoolResourcePropertiesNetworkProfile networkProfile) { + public ClusterPoolResourceProperties + withNetworkProfile(ClusterPoolResourcePropertiesNetworkProfile networkProfile) { this.networkProfile = networkProfile; return this; } /** * Get the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster. - * + * * @return the logAnalyticsProfile value. */ public ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile() { @@ -223,19 +227,19 @@ public ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile() { /** * Set the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster. - * + * * @param logAnalyticsProfile the logAnalyticsProfile value to set. * @return the ClusterPoolResourceProperties object itself. */ - public ClusterPoolResourceProperties withLogAnalyticsProfile( - ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) { + public ClusterPoolResourceProperties + withLogAnalyticsProfile(ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) { this.logAnalyticsProfile = logAnalyticsProfile; return this; } /** * Get the status property: Business status of the resource. - * + * * @return the status value. */ public String status() { @@ -244,7 +248,7 @@ public String status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -252,10 +256,8 @@ public void validate() { clusterPoolProfile().validate(); } if (computeProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property computeProfile in model ClusterPoolResourceProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property computeProfile in model ClusterPoolResourceProperties")); } else { computeProfile().validate(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java index 6646dbb7f770e..c1a5f5abfa3ee 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionInner.java @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Available cluster pool version. */ +/** + * Available cluster pool version. + */ @Fluent public final class ClusterPoolVersionInner extends ProxyResource { /* @@ -17,22 +20,39 @@ public final class ClusterPoolVersionInner extends ProxyResource { @JsonProperty(value = "properties") private ClusterPoolVersionProperties innerProperties; - /** Creates an instance of ClusterPoolVersionInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ClusterPoolVersionInner class. + */ public ClusterPoolVersionInner() { } /** * Get the innerProperties property: Cluster pool version properties. - * + * * @return the innerProperties value. */ private ClusterPoolVersionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the clusterPoolVersion property: Cluster pool version is a 2-part version. - * + * * @return the clusterPoolVersion value. */ public String clusterPoolVersion() { @@ -41,7 +61,7 @@ public String clusterPoolVersion() { /** * Set the clusterPoolVersion property: Cluster pool version is a 2-part version. - * + * * @param clusterPoolVersion the clusterPoolVersion value to set. * @return the ClusterPoolVersionInner object itself. */ @@ -55,7 +75,7 @@ public ClusterPoolVersionInner withClusterPoolVersion(String clusterPoolVersion) /** * Get the aksVersion property: AKS version. - * + * * @return the aksVersion value. */ public String aksVersion() { @@ -64,7 +84,7 @@ public String aksVersion() { /** * Set the aksVersion property: AKS version. - * + * * @param aksVersion the aksVersion value to set. * @return the ClusterPoolVersionInner object itself. */ @@ -78,7 +98,7 @@ public ClusterPoolVersionInner withAksVersion(String aksVersion) { /** * Get the isPreview property: Indicate if this version is in preview or not. - * + * * @return the isPreview value. */ public Boolean isPreview() { @@ -87,7 +107,7 @@ public Boolean isPreview() { /** * Set the isPreview property: Indicate if this version is in preview or not. - * + * * @param isPreview the isPreview value to set. * @return the ClusterPoolVersionInner object itself. */ @@ -101,7 +121,7 @@ public ClusterPoolVersionInner withIsPreview(Boolean isPreview) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionProperties.java index 3375fb751108c..9203706018c8c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolVersionProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster pool version properties. */ +/** + * Cluster pool version properties. + */ @Fluent public final class ClusterPoolVersionProperties { /* @@ -28,13 +30,15 @@ public final class ClusterPoolVersionProperties { @JsonProperty(value = "isPreview") private Boolean isPreview; - /** Creates an instance of ClusterPoolVersionProperties class. */ + /** + * Creates an instance of ClusterPoolVersionProperties class. + */ public ClusterPoolVersionProperties() { } /** * Get the clusterPoolVersion property: Cluster pool version is a 2-part version. - * + * * @return the clusterPoolVersion value. */ public String clusterPoolVersion() { @@ -43,7 +47,7 @@ public String clusterPoolVersion() { /** * Set the clusterPoolVersion property: Cluster pool version is a 2-part version. - * + * * @param clusterPoolVersion the clusterPoolVersion value to set. * @return the ClusterPoolVersionProperties object itself. */ @@ -54,7 +58,7 @@ public ClusterPoolVersionProperties withClusterPoolVersion(String clusterPoolVer /** * Get the aksVersion property: AKS version. - * + * * @return the aksVersion value. */ public String aksVersion() { @@ -63,7 +67,7 @@ public String aksVersion() { /** * Set the aksVersion property: AKS version. - * + * * @param aksVersion the aksVersion value to set. * @return the ClusterPoolVersionProperties object itself. */ @@ -74,7 +78,7 @@ public ClusterPoolVersionProperties withAksVersion(String aksVersion) { /** * Get the isPreview property: Indicate if this version is in preview or not. - * + * * @return the isPreview value. */ public Boolean isPreview() { @@ -83,7 +87,7 @@ public Boolean isPreview() { /** * Set the isPreview property: Indicate if this version is in preview or not. - * + * * @param isPreview the isPreview value to set. * @return the ClusterPoolVersionProperties object itself. */ @@ -94,7 +98,7 @@ public ClusterPoolVersionProperties withIsPreview(Boolean isPreview) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResizeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResizeProperties.java index 8d9cb6f9269b5..016f6499ad532 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResizeProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResizeProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The properties for resizing a cluster. */ +/** + * The properties for resizing a cluster. + */ @Fluent public final class ClusterResizeProperties { /* @@ -16,13 +18,15 @@ public final class ClusterResizeProperties { @JsonProperty(value = "targetWorkerNodeCount", required = true) private int targetWorkerNodeCount; - /** Creates an instance of ClusterResizeProperties class. */ + /** + * Creates an instance of ClusterResizeProperties class. + */ public ClusterResizeProperties() { } /** * Get the targetWorkerNodeCount property: Target node count of worker node. - * + * * @return the targetWorkerNodeCount value. */ public int targetWorkerNodeCount() { @@ -31,7 +35,7 @@ public int targetWorkerNodeCount() { /** * Set the targetWorkerNodeCount property: Target node count of worker node. - * + * * @param targetWorkerNodeCount the targetWorkerNodeCount value to set. * @return the ClusterResizeProperties object itself. */ @@ -42,7 +46,7 @@ public ClusterResizeProperties withTargetWorkerNodeCount(int targetWorkerNodeCou /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResourceProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResourceProperties.java index b83b00d02acb7..ab4396750cffa 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResourceProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterResourceProperties.java @@ -11,7 +11,9 @@ import com.azure.resourcemanager.hdinsight.containers.models.ProvisioningStatus; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster resource properties. */ +/** + * Cluster resource properties. + */ @Fluent public final class ClusterResourceProperties { /* @@ -50,13 +52,15 @@ public final class ClusterResourceProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private String status; - /** Creates an instance of ClusterResourceProperties class. */ + /** + * Creates an instance of ClusterResourceProperties class. + */ public ClusterResourceProperties() { } /** * Get the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ public ProvisioningStatus provisioningState() { @@ -65,7 +69,7 @@ public ProvisioningStatus provisioningState() { /** * Get the clusterType property: The type of cluster. - * + * * @return the clusterType value. */ public String clusterType() { @@ -74,7 +78,7 @@ public String clusterType() { /** * Set the clusterType property: The type of cluster. - * + * * @param clusterType the clusterType value to set. * @return the ClusterResourceProperties object itself. */ @@ -85,7 +89,7 @@ public ClusterResourceProperties withClusterType(String clusterType) { /** * Get the deploymentId property: A unique id generated by the RP to identify the resource. - * + * * @return the deploymentId value. */ public String deploymentId() { @@ -94,7 +98,7 @@ public String deploymentId() { /** * Get the computeProfile property: The compute profile. - * + * * @return the computeProfile value. */ public ComputeProfile computeProfile() { @@ -103,7 +107,7 @@ public ComputeProfile computeProfile() { /** * Set the computeProfile property: The compute profile. - * + * * @param computeProfile the computeProfile value to set. * @return the ClusterResourceProperties object itself. */ @@ -114,7 +118,7 @@ public ClusterResourceProperties withComputeProfile(ComputeProfile computeProfil /** * Get the clusterProfile property: Cluster profile. - * + * * @return the clusterProfile value. */ public ClusterProfile clusterProfile() { @@ -123,7 +127,7 @@ public ClusterProfile clusterProfile() { /** * Set the clusterProfile property: Cluster profile. - * + * * @param clusterProfile the clusterProfile value to set. * @return the ClusterResourceProperties object itself. */ @@ -134,7 +138,7 @@ public ClusterResourceProperties withClusterProfile(ClusterProfile clusterProfil /** * Get the status property: Business status of the resource. - * + * * @return the status value. */ public String status() { @@ -143,29 +147,23 @@ public String status() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (clusterType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clusterType in model ClusterResourceProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clusterType in model ClusterResourceProperties")); } if (computeProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property computeProfile in model ClusterResourceProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property computeProfile in model ClusterResourceProperties")); } else { computeProfile().validate(); } if (clusterProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clusterProfile in model ClusterResourceProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clusterProfile in model ClusterResourceProperties")); } else { clusterProfile().validate(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java index aac0d1127b130..d0073de7a9393 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionInner.java @@ -6,11 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.hdinsight.containers.models.ClusterComponentsItem; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Available cluster version. */ +/** + * Available cluster version. + */ @Fluent public final class ClusterVersionInner extends ProxyResource { /* @@ -19,22 +22,39 @@ public final class ClusterVersionInner extends ProxyResource { @JsonProperty(value = "properties") private ClusterVersionProperties innerProperties; - /** Creates an instance of ClusterVersionInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ClusterVersionInner class. + */ public ClusterVersionInner() { } /** * Get the innerProperties property: Cluster version properties. - * + * * @return the innerProperties value. */ private ClusterVersionProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the clusterType property: The type of cluster. - * + * * @return the clusterType value. */ public String clusterType() { @@ -43,7 +63,7 @@ public String clusterType() { /** * Set the clusterType property: The type of cluster. - * + * * @param clusterType the clusterType value to set. * @return the ClusterVersionInner object itself. */ @@ -57,7 +77,7 @@ public ClusterVersionInner withClusterType(String clusterType) { /** * Get the clusterVersion property: Version with three part. - * + * * @return the clusterVersion value. */ public String clusterVersion() { @@ -66,7 +86,7 @@ public String clusterVersion() { /** * Set the clusterVersion property: Version with three part. - * + * * @param clusterVersion the clusterVersion value to set. * @return the ClusterVersionInner object itself. */ @@ -80,7 +100,7 @@ public ClusterVersionInner withClusterVersion(String clusterVersion) { /** * Get the ossVersion property: Version with three part. - * + * * @return the ossVersion value. */ public String ossVersion() { @@ -89,7 +109,7 @@ public String ossVersion() { /** * Set the ossVersion property: Version with three part. - * + * * @param ossVersion the ossVersion value to set. * @return the ClusterVersionInner object itself. */ @@ -104,7 +124,7 @@ public ClusterVersionInner withOssVersion(String ossVersion) { /** * Get the clusterPoolVersion property: The two part cluster pool version. If the cluster version is before cluster * pool version on-board, the return value will be empty string. - * + * * @return the clusterPoolVersion value. */ public String clusterPoolVersion() { @@ -114,7 +134,7 @@ public String clusterPoolVersion() { /** * Set the clusterPoolVersion property: The two part cluster pool version. If the cluster version is before cluster * pool version on-board, the return value will be empty string. - * + * * @param clusterPoolVersion the clusterPoolVersion value to set. * @return the ClusterVersionInner object itself. */ @@ -128,7 +148,7 @@ public ClusterVersionInner withClusterPoolVersion(String clusterPoolVersion) { /** * Get the isPreview property: Indicate if this version is in preview or not. - * + * * @return the isPreview value. */ public Boolean isPreview() { @@ -137,7 +157,7 @@ public Boolean isPreview() { /** * Set the isPreview property: Indicate if this version is in preview or not. - * + * * @param isPreview the isPreview value to set. * @return the ClusterVersionInner object itself. */ @@ -151,7 +171,7 @@ public ClusterVersionInner withIsPreview(Boolean isPreview) { /** * Get the components property: Component list of this cluster type and version. - * + * * @return the components value. */ public List components() { @@ -160,7 +180,7 @@ public List components() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionProperties.java index b7d3233057d96..fe04a5391d2c3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterVersionProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster version properties. */ +/** + * Cluster version properties. + */ @Fluent public final class ClusterVersionProperties { /* @@ -49,13 +51,15 @@ public final class ClusterVersionProperties { @JsonProperty(value = "components", access = JsonProperty.Access.WRITE_ONLY) private List components; - /** Creates an instance of ClusterVersionProperties class. */ + /** + * Creates an instance of ClusterVersionProperties class. + */ public ClusterVersionProperties() { } /** * Get the clusterType property: The type of cluster. - * + * * @return the clusterType value. */ public String clusterType() { @@ -64,7 +68,7 @@ public String clusterType() { /** * Set the clusterType property: The type of cluster. - * + * * @param clusterType the clusterType value to set. * @return the ClusterVersionProperties object itself. */ @@ -75,7 +79,7 @@ public ClusterVersionProperties withClusterType(String clusterType) { /** * Get the clusterVersion property: Version with three part. - * + * * @return the clusterVersion value. */ public String clusterVersion() { @@ -84,7 +88,7 @@ public String clusterVersion() { /** * Set the clusterVersion property: Version with three part. - * + * * @param clusterVersion the clusterVersion value to set. * @return the ClusterVersionProperties object itself. */ @@ -95,7 +99,7 @@ public ClusterVersionProperties withClusterVersion(String clusterVersion) { /** * Get the ossVersion property: Version with three part. - * + * * @return the ossVersion value. */ public String ossVersion() { @@ -104,7 +108,7 @@ public String ossVersion() { /** * Set the ossVersion property: Version with three part. - * + * * @param ossVersion the ossVersion value to set. * @return the ClusterVersionProperties object itself. */ @@ -116,7 +120,7 @@ public ClusterVersionProperties withOssVersion(String ossVersion) { /** * Get the clusterPoolVersion property: The two part cluster pool version. If the cluster version is before cluster * pool version on-board, the return value will be empty string. - * + * * @return the clusterPoolVersion value. */ public String clusterPoolVersion() { @@ -126,7 +130,7 @@ public String clusterPoolVersion() { /** * Set the clusterPoolVersion property: The two part cluster pool version. If the cluster version is before cluster * pool version on-board, the return value will be empty string. - * + * * @param clusterPoolVersion the clusterPoolVersion value to set. * @return the ClusterVersionProperties object itself. */ @@ -137,7 +141,7 @@ public ClusterVersionProperties withClusterPoolVersion(String clusterPoolVersion /** * Get the isPreview property: Indicate if this version is in preview or not. - * + * * @return the isPreview value. */ public Boolean isPreview() { @@ -146,7 +150,7 @@ public Boolean isPreview() { /** * Set the isPreview property: Indicate if this version is in preview or not. - * + * * @param isPreview the isPreview value to set. * @return the ClusterVersionProperties object itself. */ @@ -157,7 +161,7 @@ public ClusterVersionProperties withIsPreview(Boolean isPreview) { /** * Get the components property: Component list of this cluster type and version. - * + * * @return the components value. */ public List components() { @@ -166,7 +170,7 @@ public List components() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/NameAvailabilityResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/NameAvailabilityResultInner.java index 8666a98edf680..4c72dfe084109 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/NameAvailabilityResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/NameAvailabilityResultInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Result of check name availability. */ +/** + * Result of check name availability. + */ @Fluent public final class NameAvailabilityResultInner { /* @@ -28,13 +30,15 @@ public final class NameAvailabilityResultInner { @JsonProperty(value = "message") private String message; - /** Creates an instance of NameAvailabilityResultInner class. */ + /** + * Creates an instance of NameAvailabilityResultInner class. + */ public NameAvailabilityResultInner() { } /** * Get the nameAvailable property: Indicator of availability of the Microsoft.HDInsight resource name. - * + * * @return the nameAvailable value. */ public Boolean nameAvailable() { @@ -43,7 +47,7 @@ public Boolean nameAvailable() { /** * Set the nameAvailable property: Indicator of availability of the Microsoft.HDInsight resource name. - * + * * @param nameAvailable the nameAvailable value to set. * @return the NameAvailabilityResultInner object itself. */ @@ -54,7 +58,7 @@ public NameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { /** * Get the reason property: The reason of unavailability. - * + * * @return the reason value. */ public String reason() { @@ -63,7 +67,7 @@ public String reason() { /** * Set the reason property: The reason of unavailability. - * + * * @param reason the reason value to set. * @return the NameAvailabilityResultInner object itself. */ @@ -74,7 +78,7 @@ public NameAvailabilityResultInner withReason(String reason) { /** * Get the message property: The error message of unavailability. - * + * * @return the message value. */ public String message() { @@ -83,7 +87,7 @@ public String message() { /** * Set the message property: The error message of unavailability. - * + * * @param message the message value to set. * @return the NameAvailabilityResultInner object itself. */ @@ -94,7 +98,7 @@ public NameAvailabilityResultInner withMessage(String message) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/OperationInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/OperationInner.java index 8f87ceb3dc536..9ae10698caea8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/OperationInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/OperationInner.java @@ -12,8 +12,8 @@ /** * REST API Operation - * - *

Details of a REST API operation, returned from the Resource Provider Operations API. + * + * Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent public final class OperationInner { @@ -50,14 +50,16 @@ public final class OperationInner { @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -67,7 +69,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -76,7 +78,7 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -85,7 +87,7 @@ public OperationDisplay display() { /** * Set the display property: Localized display information for this particular operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -97,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -107,7 +109,7 @@ public Origin origin() { /** * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ public ActionType actionType() { @@ -116,7 +118,7 @@ public ActionType actionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ServiceConfigResultInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ServiceConfigResultInner.java index 06676f5f88dbc..1d2397620029a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ServiceConfigResultInner.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ServiceConfigResultInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Cluster instance service config. */ +/** + * Cluster instance service config. + */ @Fluent public final class ServiceConfigResultInner { /* @@ -18,13 +20,15 @@ public final class ServiceConfigResultInner { @JsonProperty(value = "properties") private ServiceConfigResultProperties innerProperties; - /** Creates an instance of ServiceConfigResultInner class. */ + /** + * Creates an instance of ServiceConfigResultInner class. + */ public ServiceConfigResultInner() { } /** * Get the innerProperties property: Cluster instance service config properties. - * + * * @return the innerProperties value. */ private ServiceConfigResultProperties innerProperties() { @@ -33,7 +37,7 @@ private ServiceConfigResultProperties innerProperties() { /** * Get the serviceName property: Service Config Name. - * + * * @return the serviceName value. */ public String serviceName() { @@ -42,7 +46,7 @@ public String serviceName() { /** * Set the serviceName property: Service Config Name. - * + * * @param serviceName the serviceName value to set. * @return the ServiceConfigResultInner object itself. */ @@ -56,7 +60,7 @@ public ServiceConfigResultInner withServiceName(String serviceName) { /** * Get the fileName property: File Name. - * + * * @return the fileName value. */ public String fileName() { @@ -65,7 +69,7 @@ public String fileName() { /** * Set the fileName property: File Name. - * + * * @param fileName the fileName value to set. * @return the ServiceConfigResultInner object itself. */ @@ -79,7 +83,7 @@ public ServiceConfigResultInner withFileName(String fileName) { /** * Get the content property: Content in the service config file. - * + * * @return the content value. */ public String content() { @@ -88,7 +92,7 @@ public String content() { /** * Set the content property: Content in the service config file. - * + * * @param content the content value to set. * @return the ServiceConfigResultInner object itself. */ @@ -102,7 +106,7 @@ public ServiceConfigResultInner withContent(String content) { /** * Get the componentName property: Component Name. - * + * * @return the componentName value. */ public String componentName() { @@ -111,7 +115,7 @@ public String componentName() { /** * Set the componentName property: Component Name. - * + * * @param componentName the componentName value to set. * @return the ServiceConfigResultInner object itself. */ @@ -125,7 +129,7 @@ public ServiceConfigResultInner withComponentName(String componentName) { /** * Get the type property: Config type. - * + * * @return the type value. */ public String type() { @@ -134,7 +138,7 @@ public String type() { /** * Set the type property: Config type. - * + * * @param type the type value to set. * @return the ServiceConfigResultInner object itself. */ @@ -148,7 +152,7 @@ public ServiceConfigResultInner withType(String type) { /** * Get the path property: Config file path. - * + * * @return the path value. */ public String path() { @@ -157,7 +161,7 @@ public String path() { /** * Set the path property: Config file path. - * + * * @param path the path value to set. * @return the ServiceConfigResultInner object itself. */ @@ -171,7 +175,7 @@ public ServiceConfigResultInner withPath(String path) { /** * Get the customKeys property: The custom keys. - * + * * @return the customKeys value. */ public Map customKeys() { @@ -180,7 +184,7 @@ public Map customKeys() { /** * Set the customKeys property: The custom keys. - * + * * @param customKeys the customKeys value to set. * @return the ServiceConfigResultInner object itself. */ @@ -194,7 +198,7 @@ public ServiceConfigResultInner withCustomKeys(Map customKeys) { /** * Get the defaultKeys property: The default keys. - * + * * @return the defaultKeys value. */ public Map defaultKeys() { @@ -203,7 +207,7 @@ public Map defaultKeys() { /** * Set the defaultKeys property: The default keys. - * + * * @param defaultKeys the defaultKeys value to set. * @return the ServiceConfigResultInner object itself. */ @@ -217,7 +221,7 @@ public ServiceConfigResultInner withDefaultKeys(Map customKeys) { super.withCustomKeys(customKeys); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ServiceConfigResultProperties withDefaultKeys(Map defaultKeys) { super.withDefaultKeys(defaultKeys); @@ -74,7 +94,7 @@ public ServiceConfigResultProperties withDefaultKeys(Map> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a list of cluster pool versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), + location, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a list of cluster pool versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationSinglePageAsync( - String location, Context context) { + private Mono> listByLocationSinglePageAsync(String location, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -165,27 +139,15 @@ private Mono> listByLocationSinglePageAsy final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -194,13 +156,13 @@ private Mono> listByLocationSinglePageAsy */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(location), nextLink -> listByLocationNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -210,14 +172,13 @@ private PagedFlux listByLocationAsync(String location) */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(location, context), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -231,7 +192,7 @@ public PagedIterable listByLocation(String location) { /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,14 +207,15 @@ public PagedIterable listByLocation(String location, Co /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a list of cluster pool versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -261,62 +223,44 @@ private Mono> listByLocationNextSinglePag return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return represents a list of cluster pool versions along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsImpl.java index 2e64d8c876656..6519e06537965 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsImpl.java @@ -19,8 +19,7 @@ public final class AvailableClusterPoolVersionsImpl implements AvailableClusterP private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - public AvailableClusterPoolVersionsImpl( - AvailableClusterPoolVersionsClient innerClient, + public AvailableClusterPoolVersionsImpl(AvailableClusterPoolVersionsClient innerClient, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public AvailableClusterPoolVersionsImpl( public PagedIterable listByLocation(String location) { PagedIterable inner = this.serviceClient().listByLocation(location); - return Utils.mapPage(inner, inner1 -> new ClusterPoolVersionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolVersionImpl(inner1, this.manager())); } public PagedIterable listByLocation(String location, Context context) { PagedIterable inner = this.serviceClient().listByLocation(location, context); - return Utils.mapPage(inner, inner1 -> new ClusterPoolVersionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolVersionImpl(inner1, this.manager())); } private AvailableClusterPoolVersionsClient serviceClient() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsClientImpl.java index 9d1757b35e2bc..08f804bd43652 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsClientImpl.java @@ -30,23 +30,28 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionsListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient. */ +/** + * An instance of this class provides access to all the operations defined in AvailableClusterVersionsClient. + */ public final class AvailableClusterVersionsClientImpl implements AvailableClusterVersionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AvailableClusterVersionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HDInsightContainersManagementClientImpl client; /** * Initializes an instance of AvailableClusterVersionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AvailableClusterVersionsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = - RestProxy - .create(AvailableClusterVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AvailableClusterVersionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,105 +62,75 @@ public final class AvailableClusterVersionsClientImpl implements AvailableCluste @Host("{$host}") @ServiceInterface(name = "HDInsightContainersM") public interface AvailableClusterVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/availableClusterVersions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByLocation( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByLocation(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByLocationNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByLocation( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), + location, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -163,27 +138,15 @@ private Mono> listByLocationSinglePageAsync(S final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByLocation( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByLocation(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -192,13 +155,13 @@ private Mono> listByLocationSinglePageAsync(S */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(location), nextLink -> listByLocationNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location), + nextLink -> listByLocationNextSinglePageAsync(nextLink)); } /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -208,14 +171,13 @@ private PagedFlux listByLocationAsync(String location) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByLocationAsync(String location, Context context) { - return new PagedFlux<>( - () -> listByLocationSinglePageAsync(location, context), + return new PagedFlux<>(() -> listByLocationSinglePageAsync(location, context), nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); } /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -229,7 +191,7 @@ public PagedIterable listByLocation(String location) { /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -244,14 +206,15 @@ public PagedIterable listByLocation(String location, Contex /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByLocationNextSinglePageAsync(String nextLink) { @@ -259,62 +222,44 @@ private Mono> listByLocationNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return represents a list of cluster versions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByLocationNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByLocationNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsImpl.java index cfc94fbf502b2..db08ea18ee98f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterVersionsImpl.java @@ -19,8 +19,7 @@ public final class AvailableClusterVersionsImpl implements AvailableClusterVersi private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - public AvailableClusterVersionsImpl( - AvailableClusterVersionsClient innerClient, + public AvailableClusterVersionsImpl(AvailableClusterVersionsClient innerClient, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public AvailableClusterVersionsImpl( public PagedIterable listByLocation(String location) { PagedIterable inner = this.serviceClient().listByLocation(location); - return Utils.mapPage(inner, inner1 -> new ClusterVersionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterVersionImpl(inner1, this.manager())); } public PagedIterable listByLocation(String location, Context context) { PagedIterable inner = this.serviceClient().listByLocation(location, context); - return Utils.mapPage(inner, inner1 -> new ClusterVersionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterVersionImpl(inner1, this.manager())); } private AvailableClusterVersionsClient serviceClient() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradeImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradeImpl.java new file mode 100644 index 0000000000000..ab837db0beb78 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradeImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrade; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties; + +public final class ClusterAvailableUpgradeImpl implements ClusterAvailableUpgrade { + private ClusterAvailableUpgradeInner innerObject; + + private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; + + ClusterAvailableUpgradeImpl(ClusterAvailableUpgradeInner innerObject, + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ClusterAvailableUpgradeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ClusterAvailableUpgradeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesClientImpl.java new file mode 100644 index 0000000000000..4c700857f0f29 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesClientImpl.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterAvailableUpgradesClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ClusterAvailableUpgradesClient. + */ +public final class ClusterAvailableUpgradesClientImpl implements ClusterAvailableUpgradesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ClusterAvailableUpgradesService service; + + /** + * The service client containing this operation class. + */ + private final HDInsightContainersManagementClientImpl client; + + /** + * Initializes an instance of ClusterAvailableUpgradesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClusterAvailableUpgradesClientImpl(HDInsightContainersManagementClientImpl client) { + this.service = RestProxy.create(ClusterAvailableUpgradesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HDInsightContainersManagementClientClusterAvailableUpgrades to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HDInsightContainersM") + public interface ClusterAvailableUpgradesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/availableUpgrades") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterPoolName, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, + String clusterName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterPoolName, + String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName)); + } + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesImpl.java new file mode 100644 index 0000000000000..d5ab2fa7a6d96 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterAvailableUpgradesImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterAvailableUpgradesClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrade; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgrades; + +public final class ClusterAvailableUpgradesImpl implements ClusterAvailableUpgrades { + private static final ClientLogger LOGGER = new ClientLogger(ClusterAvailableUpgradesImpl.class); + + private final ClusterAvailableUpgradesClient innerClient; + + private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; + + public ClusterAvailableUpgradesImpl(ClusterAvailableUpgradesClient innerClient, + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String clusterPoolName, + String clusterName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterAvailableUpgradeImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterAvailableUpgradeImpl(inner1, this.manager())); + } + + private ClusterAvailableUpgradesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterImpl.java index b69dfe4e51c9d..062392fc0eee3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatch; import com.azure.resourcemanager.hdinsight.containers.models.ClusterProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.ComputeProfile; import com.azure.resourcemanager.hdinsight.containers.models.ProvisioningStatus; import com.azure.resourcemanager.hdinsight.containers.models.UpdatableClusterProfile; @@ -111,20 +112,14 @@ public ClusterImpl withExistingClusterpool(String resourceGroupName, String clus } public Cluster create() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .create(resourceGroupName, clusterPoolName, clusterName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusters().create(resourceGroupName, clusterPoolName, + clusterName, this.innerModel(), Context.NONE); return this; } public Cluster create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .create(resourceGroupName, clusterPoolName, clusterName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getClusters().create(resourceGroupName, clusterPoolName, + clusterName, this.innerModel(), context); return this; } @@ -140,61 +135,55 @@ public ClusterImpl update() { } public Cluster apply() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, clusterPoolName, clusterName, updateClusterPatchRequest, Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusters().update(resourceGroupName, clusterPoolName, + clusterName, updateClusterPatchRequest, Context.NONE); return this; } public Cluster apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .update(resourceGroupName, clusterPoolName, clusterName, updateClusterPatchRequest, context); + this.innerObject = serviceManager.serviceClient().getClusters().update(resourceGroupName, clusterPoolName, + clusterName, updateClusterPatchRequest, context); return this; } - ClusterImpl( - ClusterInner innerObject, + ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterPoolName = Utils.getValueFromIdByName(innerObject.id(), "clusterpools"); - this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusterpools"); + this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters"); } public Cluster refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusters() + .getWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE).getValue(); return this; } public Cluster refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusters() - .getWithResponse(resourceGroupName, clusterPoolName, clusterName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusters() + .getWithResponse(resourceGroupName, clusterPoolName, clusterName, context).getValue(); return this; } + public Cluster upgrade(ClusterUpgrade clusterUpgradeRequest) { + return serviceManager.clusters().upgrade(resourceGroupName, clusterPoolName, clusterName, + clusterUpgradeRequest); + } + + public Cluster upgrade(ClusterUpgrade clusterUpgradeRequest, Context context) { + return serviceManager.clusters().upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, + context); + } + public Cluster resize(ClusterResizeData clusterResizeRequest) { return serviceManager.clusters().resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); } public Cluster resize(ClusterResizeData clusterResizeRequest, Context context) { - return serviceManager - .clusters() - .resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context); + return serviceManager.clusters().resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, + context); } public ClusterImpl withRegion(Region location) { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterInstanceViewResultImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterInstanceViewResultImpl.java index 3bd33e2020c27..56df8092a16a3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterInstanceViewResultImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterInstanceViewResultImpl.java @@ -16,8 +16,7 @@ public final class ClusterInstanceViewResultImpl implements ClusterInstanceViewR private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - ClusterInstanceViewResultImpl( - ClusterInstanceViewResultInner innerObject, + ClusterInstanceViewResultImpl(ClusterInstanceViewResultInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobImpl.java index e48a1cd11cdaa..36a6516eae8a8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobImpl.java @@ -14,8 +14,7 @@ public final class ClusterJobImpl implements ClusterJob { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - ClusterJobImpl( - ClusterJobInner innerObject, + ClusterJobImpl(ClusterJobInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsClientImpl.java index e28b0fab50bdf..fb98f0c273380 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsClientImpl.java @@ -37,22 +37,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ClusterJobsClient. */ +/** + * An instance of this class provides access to all the operations defined in ClusterJobsClient. + */ public final class ClusterJobsClientImpl implements ClusterJobsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ClusterJobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HDInsightContainersManagementClientImpl client; /** * Initializes an instance of ClusterJobsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ClusterJobsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = - RestProxy.create(ClusterJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ClusterJobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -63,51 +69,38 @@ public final class ClusterJobsClientImpl implements ClusterJobsClient { @Host("{$host}") @ServiceInterface(name = "HDInsightContainersM") public interface ClusterJobsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/runJob") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/runJob") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> runJob( - @HostParam("$host") String endpoint, + Mono>> runJob(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterJobInner clusterJob, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterJobInner clusterJob, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/jobs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/jobs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -118,19 +111,15 @@ Mono> listNext( * @return cluster job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> runJobWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { + private Mono>> runJobWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterJobInner clusterJob) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -151,24 +140,14 @@ private Mono>> runJobWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .runJob( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - clusterJob, - accept, - context)) + context -> service.runJob(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, clusterJob, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -180,23 +159,15 @@ private Mono>> runJobWithResponseAsync( * @return cluster job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> runJobWithResponseAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context) { + private Mono>> runJobWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterJobInner clusterJob, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -216,22 +187,13 @@ private Mono>> runJobWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .runJob( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - clusterJob, - accept, - context); + return service.runJob(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, clusterJob, accept, context); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -242,23 +204,17 @@ private Mono>> runJobWithResponseAsync( * @return the {@link PollerFlux} for polling of cluster job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterJobInner> beginRunJobAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { - Mono>> mono = - runJobWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ClusterJobInner.class, - ClusterJobInner.class, - this.client.getContext()); + private PollerFlux, ClusterJobInner> beginRunJobAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { + Mono>> mono + = runJobWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterJobInner.class, ClusterJobInner.class, this.client.getContext()); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -270,24 +226,18 @@ private PollerFlux, ClusterJobInner> beginRunJobAsyn * @return the {@link PollerFlux} for polling of cluster job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterJobInner> beginRunJobAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context) { + private PollerFlux, ClusterJobInner> beginRunJobAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterJobInner clusterJob, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - runJobWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterJobInner.class, ClusterJobInner.class, context); + Mono>> mono + = runJobWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterJobInner.class, ClusterJobInner.class, context); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -298,14 +248,14 @@ private PollerFlux, ClusterJobInner> beginRunJobAsyn * @return the {@link SyncPoller} for polling of cluster job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterJobInner> beginRunJob( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { + public SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { return this.beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob).getSyncPoller(); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -317,20 +267,15 @@ public SyncPoller, ClusterJobInner> beginRunJob( * @return the {@link SyncPoller} for polling of cluster job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterJobInner> beginRunJob( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context) { - return this - .beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context) + public SyncPoller, ClusterJobInner> beginRunJob(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterJobInner clusterJob, Context context) { + return this.beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context) .getSyncPoller(); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -341,16 +286,15 @@ public SyncPoller, ClusterJobInner> beginRunJob( * @return cluster job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runJobAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { - return beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob) - .last() + private Mono runJobAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob) { + return beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -362,20 +306,15 @@ private Mono runJobAsync( * @return cluster job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono runJobAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context) { - return beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context) - .last() + private Mono runJobAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob, Context context) { + return beginRunJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -386,14 +325,14 @@ private Mono runJobAsync( * @return cluster job. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterJobInner runJob( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { + public ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob) { return runJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob).block(); } /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -405,41 +344,35 @@ public ClusterJobInner runJob( * @return cluster job. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterJobInner runJob( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context) { + public ClusterJobInner runJob(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob, Context context) { return runJobAsync(resourceGroupName, clusterPoolName, clusterName, clusterJob, context).block(); } /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. + * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq + * {jobName}' or 'jarName eq {jarName}'. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return jobs of HDInsight on AKS cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { + private Mono> listSinglePageAsync(String resourceGroupName, String clusterPoolName, + String clusterName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -454,57 +387,38 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. + * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq + * {jobName}' or 'jarName eq {jarName}'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return jobs of HDInsight on AKS cluster along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return jobs of HDInsight on AKS cluster along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String clusterPoolName, + String clusterName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -520,29 +434,35 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get jobs of HDInsight on AKS cluster. - * + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq + * {jobName}' or 'jarName eq {jarName}'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, String clusterName, + String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, filter), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get jobs of HDInsight on AKS cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -553,17 +473,19 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, String clusterName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, filter), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. + * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq + * {jobName}' or 'jarName eq {jarName}'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -571,16 +493,16 @@ private PagedFlux listAsync(String resourceGroupName, String cl * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, String clusterName, + String filter, Context context) { return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, context), + () -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -591,15 +513,18 @@ private PagedFlux listAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName)); + final String filter = null; + return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, filter)); } /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. + * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq + * {jobName}' or 'jarName eq {jarName}'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -607,16 +532,17 @@ public PagedIterable list(String resourceGroupName, String clus * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, context)); + public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, + String filter, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, filter, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -628,31 +554,22 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -665,23 +582,13 @@ private Mono> listNextSinglePageAsync(String next return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsImpl.java index 93803afe503f1..f803420f91002 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsImpl.java @@ -19,17 +19,16 @@ public final class ClusterJobsImpl implements ClusterJobs { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - public ClusterJobsImpl( - ClusterJobsClient innerClient, + public ClusterJobsImpl(ClusterJobsClient innerClient, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public ClusterJob runJob( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob) { - ClusterJobInner inner = - this.serviceClient().runJob(resourceGroupName, clusterPoolName, clusterName, clusterJob); + public ClusterJob runJob(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob) { + ClusterJobInner inner + = this.serviceClient().runJob(resourceGroupName, clusterPoolName, clusterName, clusterJob); if (inner != null) { return new ClusterJobImpl(inner, this.manager()); } else { @@ -37,14 +36,10 @@ public ClusterJob runJob( } } - public ClusterJob runJob( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, - Context context) { - ClusterJobInner inner = - this.serviceClient().runJob(resourceGroupName, clusterPoolName, clusterName, clusterJob, context); + public ClusterJob runJob(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterJobInner clusterJob, Context context) { + ClusterJobInner inner + = this.serviceClient().runJob(resourceGroupName, clusterPoolName, clusterName, clusterJob, context); if (inner != null) { return new ClusterJobImpl(inner, this.manager()); } else { @@ -53,16 +48,16 @@ public ClusterJob runJob( } public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName); - return Utils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, + String filter, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterJobImpl(inner1, this.manager())); } private ClusterJobsClient serviceClient() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradeImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradeImpl.java new file mode 100644 index 0000000000000..0d6852ee2b307 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradeImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrade; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties; + +public final class ClusterPoolAvailableUpgradeImpl implements ClusterPoolAvailableUpgrade { + private ClusterPoolAvailableUpgradeInner innerObject; + + private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; + + ClusterPoolAvailableUpgradeImpl(ClusterPoolAvailableUpgradeInner innerObject, + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public ClusterPoolAvailableUpgradeProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ClusterPoolAvailableUpgradeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesClientImpl.java new file mode 100644 index 0000000000000..19df8bc9e9ce7 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesClientImpl.java @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolAvailableUpgradesClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeList; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ClusterPoolAvailableUpgradesClient. + */ +public final class ClusterPoolAvailableUpgradesClientImpl implements ClusterPoolAvailableUpgradesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ClusterPoolAvailableUpgradesService service; + + /** + * The service client containing this operation class. + */ + private final HDInsightContainersManagementClientImpl client; + + /** + * Initializes an instance of ClusterPoolAvailableUpgradesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClusterPoolAvailableUpgradesClientImpl(HDInsightContainersManagementClientImpl client) { + this.service = RestProxy.create(ClusterPoolAvailableUpgradesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for HDInsightContainersManagementClientClusterPoolAvailableUpgrades to + * be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "HDInsightContainersM") + public interface ClusterPoolAvailableUpgradesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/availableUpgrades") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterPoolName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String clusterPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterPoolName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String clusterPoolName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterPoolName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName)); + } + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String clusterPoolName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesImpl.java new file mode 100644 index 0000000000000..5e746ced82ea5 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolAvailableUpgradesImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolAvailableUpgradesClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrade; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrades; + +public final class ClusterPoolAvailableUpgradesImpl implements ClusterPoolAvailableUpgrades { + private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolAvailableUpgradesImpl.class); + + private final ClusterPoolAvailableUpgradesClient innerClient; + + private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; + + public ClusterPoolAvailableUpgradesImpl(ClusterPoolAvailableUpgradesClient innerClient, + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String clusterPoolName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterPoolName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ClusterPoolAvailableUpgradeImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String clusterPoolName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, clusterPoolName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ClusterPoolAvailableUpgradeImpl(inner1, this.manager())); + } + + private ClusterPoolAvailableUpgradesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolImpl.java index 9753f424c0da7..bb8a3f2e80f82 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolImpl.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.ProvisioningStatus; import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; import java.util.Collections; @@ -125,25 +126,19 @@ public ClusterPoolImpl withExistingResourceGroup(String resourceGroupName) { } public ClusterPool create() { - this.innerObject = - serviceManager - .serviceClient() - .getClusterPools() - .createOrUpdate(resourceGroupName, clusterPoolName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusterPools().createOrUpdate(resourceGroupName, + clusterPoolName, this.innerModel(), Context.NONE); return this; } public ClusterPool create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusterPools() - .createOrUpdate(resourceGroupName, clusterPoolName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getClusterPools().createOrUpdate(resourceGroupName, + clusterPoolName, this.innerModel(), context); return this; } - ClusterPoolImpl( - String name, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { + ClusterPoolImpl(String name, + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = new ClusterPoolInner(); this.serviceManager = serviceManager; this.clusterPoolName = name; @@ -155,52 +150,46 @@ public ClusterPoolImpl update() { } public ClusterPool apply() { - this.innerObject = - serviceManager - .serviceClient() - .getClusterPools() - .updateTags(resourceGroupName, clusterPoolName, updateClusterPoolTags, Context.NONE); + this.innerObject = serviceManager.serviceClient().getClusterPools().updateTags(resourceGroupName, + clusterPoolName, updateClusterPoolTags, Context.NONE); return this; } public ClusterPool apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusterPools() - .updateTags(resourceGroupName, clusterPoolName, updateClusterPoolTags, context); + this.innerObject = serviceManager.serviceClient().getClusterPools().updateTags(resourceGroupName, + clusterPoolName, updateClusterPoolTags, context); return this; } - ClusterPoolImpl( - ClusterPoolInner innerObject, + ClusterPoolImpl(ClusterPoolInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.clusterPoolName = Utils.getValueFromIdByName(innerObject.id(), "clusterpools"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.clusterPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusterpools"); } public ClusterPool refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getClusterPools() - .getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusterPools() + .getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, Context.NONE).getValue(); return this; } public ClusterPool refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getClusterPools() - .getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getClusterPools() + .getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context).getValue(); return this; } + public ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest) { + return serviceManager.clusterPools().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest); + } + + public ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { + return serviceManager.clusterPools().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, + context); + } + public ClusterPoolImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -241,8 +230,8 @@ public ClusterPoolImpl withNetworkProfile(ClusterPoolResourcePropertiesNetworkPr return this; } - public ClusterPoolImpl withLogAnalyticsProfile( - ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) { + public ClusterPoolImpl + withLogAnalyticsProfile(ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile) { this.innerModel().withLogAnalyticsProfile(logAnalyticsProfile); return this; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolVersionImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolVersionImpl.java index ed6a54b251666..484152b40d6c2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolVersionImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolVersionImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.hdinsight.containers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersion; @@ -12,8 +13,7 @@ public final class ClusterPoolVersionImpl implements ClusterPoolVersion { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - ClusterPoolVersionImpl( - ClusterPoolVersionInner innerObject, + ClusterPoolVersionImpl(ClusterPoolVersionInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -31,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String clusterPoolVersion() { return this.innerModel().clusterPoolVersion(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsClientImpl.java index c92bddd6e05e1..a1b1afb8a6545 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsClientImpl.java @@ -14,6 +14,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -35,27 +36,34 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolListResult; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ClusterPoolsClient. */ +/** + * An instance of this class provides access to all the operations defined in ClusterPoolsClient. + */ public final class ClusterPoolsClientImpl implements ClusterPoolsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ClusterPoolsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HDInsightContainersManagementClientImpl client; /** * Initializes an instance of ClusterPoolsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ClusterPoolsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = - RestProxy.create(ClusterPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ClusterPoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -66,112 +74,94 @@ public final class ClusterPoolsClientImpl implements ClusterPoolsClient { @Host("{$host}") @ServiceInterface(name = "HDInsightContainersM") public interface ClusterPoolsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, @PathParam("clusterPoolName") String clusterPoolName, - @BodyParam("application/json") ClusterPoolInner clusterPool, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterPoolInner clusterPool, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateTags( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("clusterPoolName") String clusterPoolName, - @BodyParam("application/json") TagsObject clusterPoolTags, - @HeaderParam("Accept") String accept, + Mono>> updateTags(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, + @BodyParam("application/json") TagsObject clusterPoolTags, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusterpools") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/upgrade") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> upgrade(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, + @BodyParam("application/json") ClusterPoolUpgrade clusterPoolUpgradeRequest, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -180,19 +170,15 @@ Mono> listByResourceGroupNext( * @return a cluster pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String clusterPoolName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -205,22 +191,14 @@ private Mono> getByResourceGroupWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -230,19 +208,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return a cluster pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String clusterPoolName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String clusterPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -254,20 +228,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, accept, context); } /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,7 +250,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -293,14 +260,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, * @return a cluster pool along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterPoolName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, clusterPoolName, context).block(); } /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,7 +282,7 @@ public ClusterPoolInner getByResourceGroup(String resourceGroupName, String clus /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -325,19 +292,15 @@ public ClusterPoolInner getByResourceGroup(String resourceGroupName, String clus * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterPoolName, ClusterPoolInner clusterPool) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,24 +317,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterPool, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterPool, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -382,19 +335,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String clusterPoolName, ClusterPoolInner clusterPool, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -411,21 +360,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterPool, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterPool, accept, context); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -435,23 +376,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, clusterPoolName, clusterPool); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ClusterPoolInner.class, - ClusterPoolInner.class, - this.client.getContext()); + private PollerFlux, ClusterPoolInner> + beginCreateOrUpdateAsync(String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterPoolName, clusterPool); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterPoolInner.class, ClusterPoolInner.class, this.client.getContext()); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -465,17 +400,15 @@ private PollerFlux, ClusterPoolInner> beginCreateOr private PollerFlux, ClusterPoolInner> beginCreateOrUpdateAsync( String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, clusterPoolName, clusterPool, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterPoolInner.class, ClusterPoolInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, clusterPoolName, clusterPool, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterPoolInner.class, ClusterPoolInner.class, context); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -485,14 +418,14 @@ private PollerFlux, ClusterPoolInner> beginCreateOr * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginCreateOrUpdate( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool) { + public SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, + String clusterPoolName, ClusterPoolInner clusterPool) { return this.beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool).getSyncPoller(); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -503,14 +436,14 @@ public SyncPoller, ClusterPoolInner> beginCreateOrU * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginCreateOrUpdate( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context) { + public SyncPoller, ClusterPoolInner> beginCreateOrUpdate(String resourceGroupName, + String clusterPoolName, ClusterPoolInner clusterPool, Context context) { return this.beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool, context).getSyncPoller(); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -520,16 +453,15 @@ public SyncPoller, ClusterPoolInner> beginCreateOrU * @return cluster pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String clusterPoolName, + ClusterPoolInner clusterPool) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -540,16 +472,15 @@ private Mono createOrUpdateAsync( * @return cluster pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String clusterPoolName, + ClusterPoolInner clusterPool, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -559,14 +490,14 @@ private Mono createOrUpdateAsync( * @return cluster pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner createOrUpdate( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool) { + public ClusterPoolInner createOrUpdate(String resourceGroupName, String clusterPoolName, + ClusterPoolInner clusterPool) { return createOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool).block(); } /** * Creates or updates a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPool The Cluster Pool to create. @@ -577,14 +508,14 @@ public ClusterPoolInner createOrUpdate( * @return cluster pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner createOrUpdate( - String resourceGroupName, String clusterPoolName, ClusterPoolInner clusterPool, Context context) { + public ClusterPoolInner createOrUpdate(String resourceGroupName, String clusterPoolName, + ClusterPoolInner clusterPool, Context context) { return createOrUpdateAsync(resourceGroupName, clusterPoolName, clusterPool, context).block(); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -594,23 +525,19 @@ public ClusterPoolInner createOrUpdate( * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags) { + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (clusterPoolName == null) { return Mono @@ -625,23 +552,14 @@ private Mono>> updateTagsWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - clusterPoolName, - clusterPoolTags, - accept, - context)) + context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), clusterPoolName, clusterPoolTags, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -652,23 +570,19 @@ private Mono>> updateTagsWithResponseAsync( * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateTagsWithResponseAsync( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, Context context) { + private Mono>> updateTagsWithResponseAsync(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (clusterPoolName == null) { return Mono @@ -682,21 +596,13 @@ private Mono>> updateTagsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - clusterPoolName, - clusterPoolTags, - accept, - context); + return service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), clusterPoolName, clusterPoolTags, accept, context); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -706,23 +612,17 @@ private Mono>> updateTagsWithResponseAsync( * @return the {@link PollerFlux} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginUpdateTagsAsync( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags) { - Mono>> mono = - updateTagsWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolTags); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ClusterPoolInner.class, - ClusterPoolInner.class, - this.client.getContext()); + private PollerFlux, ClusterPoolInner> beginUpdateTagsAsync(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags) { + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolTags); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterPoolInner.class, ClusterPoolInner.class, this.client.getContext()); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -733,20 +633,18 @@ private PollerFlux, ClusterPoolInner> beginUpdateTa * @return the {@link PollerFlux} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterPoolInner> beginUpdateTagsAsync( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, Context context) { + private PollerFlux, ClusterPoolInner> beginUpdateTagsAsync(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateTagsWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterPoolInner.class, ClusterPoolInner.class, context); + Mono>> mono + = updateTagsWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterPoolInner.class, ClusterPoolInner.class, context); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -756,14 +654,14 @@ private PollerFlux, ClusterPoolInner> beginUpdateTa * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginUpdateTags( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags) { + public SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags) { return this.beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags).getSyncPoller(); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -774,14 +672,14 @@ public SyncPoller, ClusterPoolInner> beginUpdateTag * @return the {@link SyncPoller} for polling of cluster pool. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterPoolInner> beginUpdateTags( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, Context context) { + public SyncPoller, ClusterPoolInner> beginUpdateTags(String resourceGroupName, + String clusterPoolName, TagsObject clusterPoolTags, Context context) { return this.beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context).getSyncPoller(); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -791,16 +689,15 @@ public SyncPoller, ClusterPoolInner> beginUpdateTag * @return cluster pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags) { - return beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags) - .last() + private Mono updateTagsAsync(String resourceGroupName, String clusterPoolName, + TagsObject clusterPoolTags) { + return beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -811,16 +708,15 @@ private Mono updateTagsAsync( * @return cluster pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, Context context) { - return beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context) - .last() + private Mono updateTagsAsync(String resourceGroupName, String clusterPoolName, + TagsObject clusterPoolTags, Context context) { + return beginUpdateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -836,7 +732,7 @@ public ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolN /** * Updates an existing Cluster Pool Tags. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterPoolTags Parameters supplied to update tags. @@ -847,14 +743,14 @@ public ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolN * @return cluster pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterPoolInner updateTags( - String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, Context context) { + public ClusterPoolInner updateTags(String resourceGroupName, String clusterPoolName, TagsObject clusterPoolTags, + Context context) { return updateTagsAsync(resourceGroupName, clusterPoolName, clusterPoolTags, context).block(); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -865,16 +761,12 @@ public ClusterPoolInner updateTags( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -886,23 +778,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -912,19 +795,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterPoolName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -936,20 +815,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, accept, context); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -960,15 +832,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterPoolName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterPoolName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -978,18 +848,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterPoolName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterPoolName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterPoolName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1004,7 +873,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -1014,14 +883,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterPoolName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterPoolName, + Context context) { return this.beginDeleteAsync(resourceGroupName, clusterPoolName, context).getSyncPoller(); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1031,14 +900,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterPoolName) { - return beginDeleteAsync(resourceGroupName, clusterPoolName) - .last() + return beginDeleteAsync(resourceGroupName, clusterPoolName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -1049,14 +917,13 @@ private Mono deleteAsync(String resourceGroupName, String clusterPoolName) */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterPoolName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterPoolName, context) - .last() + return beginDeleteAsync(resourceGroupName, clusterPoolName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1070,7 +937,7 @@ public void delete(String resourceGroupName, String clusterPoolName) { /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -1085,109 +952,76 @@ public void delete(String resourceGroupName, String clusterPoolName, Context con /** * Gets the list of Cluster Pools within a Subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Cluster Pools within a Subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of Cluster Pools within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Cluster Pools within a Subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the list of Cluster Pools within a Subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Gets the list of Cluster Pools within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1196,13 +1030,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Gets the list of Cluster Pools within a Subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. @@ -1214,7 +1048,7 @@ public PagedIterable list() { /** * Gets the list of Cluster Pools within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1228,27 +1062,23 @@ public PagedIterable list(Context context) { /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1256,53 +1086,34 @@ private Mono> listByResourceGroupSinglePageAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1311,27 +1122,15 @@ private Mono> listByResourceGroupSinglePageAsync final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1340,14 +1139,13 @@ private Mono> listByResourceGroupSinglePageAsync */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1357,14 +1155,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGrou */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1378,7 +1175,7 @@ public PagedIterable listByResourceGroup(String resourceGroupN /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1391,16 +1188,254 @@ public PagedIterable listByResourceGroup(String resourceGroupN return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (clusterPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + if (clusterPoolUpgradeRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter clusterPoolUpgradeRequest is required and cannot be null.")); + } else { + clusterPoolUpgradeRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.upgrade(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), clusterPoolName, clusterPoolUpgradeRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (clusterPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + if (clusterPoolUpgradeRequest == null) { + return Mono.error( + new IllegalArgumentException("Parameter clusterPoolUpgradeRequest is required and cannot be null.")); + } else { + clusterPoolUpgradeRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.upgrade(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), clusterPoolName, clusterPoolUpgradeRequest, accept, context); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cluster pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterPoolInner> beginUpgradeAsync(String resourceGroupName, + String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest) { + Mono>> mono + = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterPoolInner.class, ClusterPoolInner.class, this.client.getContext()); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of cluster pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterPoolInner> beginUpgradeAsync(String resourceGroupName, + String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterPoolInner.class, ClusterPoolInner.class, context); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cluster pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, + String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest) { + return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest).getSyncPoller(); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of cluster pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterPoolInner> beginUpgrade(String resourceGroupName, + String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { + return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context) + .getSyncPoller(); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest) { + return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { + return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest) { + return upgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest).block(); + } + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { + return upgradeAsync(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context).block(); + } + /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1408,76 +1443,59 @@ private Mono> listBySubscriptionNextSinglePageAs return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1485,63 +1503,45 @@ private Mono> listByResourceGroupNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list cluster pools operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java index f28467cfae556..e093e25fc4792 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools; public final class ClusterPoolsImpl implements ClusterPools { @@ -21,22 +22,18 @@ public final class ClusterPoolsImpl implements ClusterPools { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - public ClusterPoolsImpl( - ClusterPoolsClient innerClient, + public ClusterPoolsImpl(ClusterPoolsClient innerClient, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterPoolName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ClusterPoolImpl(inner.getValue(), this.manager())); } else { return null; @@ -62,96 +59,98 @@ public void delete(String resourceGroupName, String clusterPoolName, Context con public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterPoolImpl(inner1, this.manager())); + } + + public ClusterPool upgrade(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest) { + ClusterPoolInner inner + = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest); + if (inner != null) { + return new ClusterPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public ClusterPool upgrade(String resourceGroupName, String clusterPoolName, + ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) { + ClusterPoolInner inner + = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context); + if (inner != null) { + return new ClusterPoolImpl(inner, this.manager()); + } else { + return null; + } } public ClusterPool getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, clusterPoolName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } this.delete(resourceGroupName, clusterPoolName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } this.delete(resourceGroupName, clusterPoolName, context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterVersionImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterVersionImpl.java index a84ad6535fb0b..d63abaa2eaba9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterVersionImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterVersionImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.hdinsight.containers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; import com.azure.resourcemanager.hdinsight.containers.models.ClusterComponentsItem; import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersion; @@ -15,8 +16,7 @@ public final class ClusterVersionImpl implements ClusterVersion { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - ClusterVersionImpl( - ClusterVersionInner innerObject, + ClusterVersionImpl(ClusterVersionInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -34,6 +34,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String clusterType() { return this.innerModel().clusterType(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersClientImpl.java index 0bfb88e12e4e9..0e55286f50056 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersClientImpl.java @@ -41,22 +41,29 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterListResult; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPatch; import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ClustersClient. */ +/** + * An instance of this class provides access to all the operations defined in ClustersClient. + */ public final class ClustersClientImpl implements ClustersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ClustersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HDInsightContainersManagementClientImpl client; /** * Initializes an instance of ClustersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ClustersClientImpl(HDInsightContainersManagementClientImpl client) { @@ -71,199 +78,156 @@ public final class ClustersClientImpl implements ClustersClient { @Host("{$host}") @ServiceInterface(name = "HDInsightContainersM") public interface ClustersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByClusterPoolName( - @HostParam("$host") String endpoint, + Mono> listByClusterPoolName(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/resize") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/upgrade") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resize( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("clusterPoolName") String clusterPoolName, + Mono>> upgrade(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterResizeData clusterResizeRequest, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterUpgrade clusterUpgradeRequest, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/resize") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, + Mono>> resize(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterResizeData clusterResizeRequest, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterInner hDInsightCluster, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, + Mono>> create(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @BodyParam("application/json") ClusterPatch clusterPatchRequest, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @BodyParam("application/json") ClusterInner hDInsightCluster, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") ClusterPatch clusterPatchRequest, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/serviceConfigs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}") + @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listServiceConfigs( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/serviceConfigs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listInstanceViews( - @HostParam("$host") String endpoint, + Mono> listServiceConfigs(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews/default") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getInstanceView( - @HostParam("$host") String endpoint, + Mono> listInstanceViews(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("clusterPoolName") String clusterPoolName, - @PathParam("clusterName") String clusterName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/instanceViews/default") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceView(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("clusterPoolName") String clusterPoolName, @PathParam("clusterName") String clusterName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByClusterPoolNameNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listServiceConfigsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listInstanceViewsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the list cluster operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterPoolNameSinglePageAsync( - String resourceGroupName, String clusterPoolName) { + private Mono> listByClusterPoolNameSinglePageAsync(String resourceGroupName, + String clusterPoolName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -276,54 +240,35 @@ private Mono> listByClusterPoolNameSinglePageAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByClusterPoolName( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByClusterPoolName(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the list cluster operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterPoolNameSinglePageAsync( - String resourceGroupName, String clusterPoolName, Context context) { + private Mono> listByClusterPoolNameSinglePageAsync(String resourceGroupName, + String clusterPoolName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -336,28 +281,15 @@ private Mono> listByClusterPoolNameSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByClusterPoolName( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByClusterPoolName(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -367,14 +299,13 @@ private Mono> listByClusterPoolNameSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByClusterPoolNameAsync(String resourceGroupName, String clusterPoolName) { - return new PagedFlux<>( - () -> listByClusterPoolNameSinglePageAsync(resourceGroupName, clusterPoolName), + return new PagedFlux<>(() -> listByClusterPoolNameSinglePageAsync(resourceGroupName, clusterPoolName), nextLink -> listByClusterPoolNameNextSinglePageAsync(nextLink)); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -384,16 +315,15 @@ private PagedFlux listByClusterPoolNameAsync(String resourceGroupN * @return the list cluster operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByClusterPoolNameAsync( - String resourceGroupName, String clusterPoolName, Context context) { - return new PagedFlux<>( - () -> listByClusterPoolNameSinglePageAsync(resourceGroupName, clusterPoolName, context), + private PagedFlux listByClusterPoolNameAsync(String resourceGroupName, String clusterPoolName, + Context context) { + return new PagedFlux<>(() -> listByClusterPoolNameSinglePageAsync(resourceGroupName, clusterPoolName, context), nextLink -> listByClusterPoolNameNextSinglePageAsync(nextLink, context)); } /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -408,7 +338,7 @@ public PagedIterable listByClusterPoolName(String resourceGroupNam /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -418,41 +348,291 @@ public PagedIterable listByClusterPoolName(String resourceGroupNam * @return the list cluster operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByClusterPoolName( - String resourceGroupName, String clusterPoolName, Context context) { + public PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, + Context context) { return new PagedIterable<>(listByClusterPoolNameAsync(resourceGroupName, clusterPoolName, context)); } /** - * Resize an existing Cluster. - * + * Upgrade a cluster. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. - * @param clusterResizeRequest Resize a cluster. + * @param clusterUpgradeRequest Upgrade a cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resizeWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { + private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterUpgrade clusterUpgradeRequest) { if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (clusterPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (clusterUpgradeRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterUpgradeRequest is required and cannot be null.")); + } else { + clusterUpgradeRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.upgrade(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), clusterPoolName, clusterName, + clusterUpgradeRequest, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> upgradeWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (clusterPoolName == null) { return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + .error(new IllegalArgumentException("Parameter clusterPoolName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (clusterUpgradeRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterUpgradeRequest is required and cannot be null.")); + } else { + clusterUpgradeRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.upgrade(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), clusterPoolName, clusterName, clusterUpgradeRequest, accept, context); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginUpgradeAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest) { + Mono>> mono + = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ClusterInner> beginUpgradeAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = upgradeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest) { + return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest) + .getSyncPoller(); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the cluster. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ClusterInner> beginUpgrade(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterUpgrade clusterUpgradeRequest, Context context) { + return this.beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context) + .getSyncPoller(); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest) { + return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono upgradeAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest, Context context) { + return beginUpgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest) { + return upgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest).block(); + } + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest, Context context) { + return upgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context).block(); + } + + /** + * Resize an existing Cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterResizeRequest Resize a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> resizeWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterResizeData clusterResizeRequest) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (clusterPoolName == null) { return Mono @@ -469,25 +649,15 @@ private Mono>> resizeWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .resize( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - clusterPoolName, - clusterName, - clusterResizeRequest, - accept, - context)) + .withContext(context -> service.resize(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), clusterPoolName, clusterName, + clusterResizeRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -499,27 +669,19 @@ private Mono>> resizeWithResponseAsync( * @return the cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resizeWithResponseAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context) { + private Mono>> resizeWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterResizeData clusterResizeRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (clusterPoolName == null) { return Mono @@ -536,22 +698,13 @@ private Mono>> resizeWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .resize( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - clusterPoolName, - clusterName, - clusterResizeRequest, - accept, - context); + return service.resize(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), clusterPoolName, clusterName, clusterResizeRequest, accept, context); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -562,19 +715,17 @@ private Mono>> resizeWithResponseAsync( * @return the {@link PollerFlux} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginResizeAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { - Mono>> mono = - resizeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + private PollerFlux, ClusterInner> beginResizeAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { + Mono>> mono + = resizeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -586,24 +737,18 @@ private PollerFlux, ClusterInner> beginResizeAsync( * @return the {@link PollerFlux} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginResizeAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context) { + private PollerFlux, ClusterInner> beginResizeAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - resizeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = resizeWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -614,16 +759,15 @@ private PollerFlux, ClusterInner> beginResizeAsync( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginResize( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { - return this - .beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest) + public SyncPoller, ClusterInner> beginResize(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { + return this.beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest) .getSyncPoller(); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -635,20 +779,15 @@ public SyncPoller, ClusterInner> beginResize( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginResize( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context) { - return this - .beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context) + public SyncPoller, ClusterInner> beginResize(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest, Context context) { + return this.beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context) .getSyncPoller(); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -659,16 +798,15 @@ public SyncPoller, ClusterInner> beginResize( * @return the cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resizeAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { - return beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest) - .last() + private Mono resizeAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest) { + return beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -680,20 +818,15 @@ private Mono resizeAsync( * @return the cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resizeAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context) { - return beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context) - .last() + private Mono resizeAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest, Context context) { + return beginResizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -704,14 +837,14 @@ private Mono resizeAsync( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner resize( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { + public ClusterInner resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest) { return resizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest).block(); } /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -723,18 +856,14 @@ public ClusterInner resize( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner resize( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context) { + public ClusterInner resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest, Context context) { return resizeAsync(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context).block(); } /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -744,19 +873,15 @@ public ClusterInner resize( * @return a HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -771,24 +896,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -799,19 +914,15 @@ private Mono> getWithResponseAsync( * @return a HDInsight cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -826,21 +937,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, accept, context); } /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -857,7 +960,7 @@ private Mono getAsync(String resourceGroupName, String clusterPool /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -868,14 +971,14 @@ private Mono getAsync(String resourceGroupName, String clusterPool * @return a HDInsight cluster along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + public Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, + Context context) { return getWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, context).block(); } /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -891,7 +994,7 @@ public ClusterInner get(String resourceGroupName, String clusterPoolName, String /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -902,19 +1005,15 @@ public ClusterInner get(String resourceGroupName, String clusterPoolName, String * @return the cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterInner hDInsightCluster) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -936,24 +1035,14 @@ private Mono>> createWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - hDInsightCluster, - accept, - context)) + context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, hDInsightCluster, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -965,23 +1054,15 @@ private Mono>> createWithResponseAsync( * @return the cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterInner hDInsightCluster, - Context context) { + private Mono>> createWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterInner hDInsightCluster, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1002,22 +1083,13 @@ private Mono>> createWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - hDInsightCluster, - accept, - context); + return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, hDInsightCluster, accept, context); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1028,19 +1100,17 @@ private Mono>> createWithResponseAsync( * @return the {@link PollerFlux} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { - Mono>> mono = - createWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + private PollerFlux, ClusterInner> beginCreateAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { + Mono>> mono + = createWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1052,24 +1122,18 @@ private PollerFlux, ClusterInner> beginCreateAsync( * @return the {@link PollerFlux} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginCreateAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterInner hDInsightCluster, - Context context) { + private PollerFlux, ClusterInner> beginCreateAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterInner hDInsightCluster, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = createWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1080,14 +1144,14 @@ private PollerFlux, ClusterInner> beginCreateAsync( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { + public SyncPoller, ClusterInner> beginCreate(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { return this.beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster).getSyncPoller(); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1099,20 +1163,15 @@ public SyncPoller, ClusterInner> beginCreate( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginCreate( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterInner hDInsightCluster, - Context context) { - return this - .beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context) + public SyncPoller, ClusterInner> beginCreate(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterInner hDInsightCluster, Context context) { + return this.beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context) .getSyncPoller(); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1123,16 +1182,15 @@ public SyncPoller, ClusterInner> beginCreate( * @return the cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { - return beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster) - .last() + private Mono createAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterInner hDInsightCluster) { + return beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1144,20 +1202,15 @@ private Mono createAsync( * @return the cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterInner hDInsightCluster, - Context context) { - return beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context) - .last() + private Mono createAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterInner hDInsightCluster, Context context) { + return beginCreateAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1168,14 +1221,14 @@ private Mono createAsync( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner create( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterInner hDInsightCluster) { + public ClusterInner create(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterInner hDInsightCluster) { return createAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster).block(); } /** * Creates a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1187,18 +1240,14 @@ public ClusterInner create( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner create( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterInner hDInsightCluster, - Context context) { + public ClusterInner create(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterInner hDInsightCluster, Context context) { return createAsync(resourceGroupName, clusterPoolName, clusterName, hDInsightCluster, context).block(); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1209,23 +1258,19 @@ public ClusterInner create( * @return the cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterPatch clusterPatchRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (clusterPoolName == null) { return Mono @@ -1242,25 +1287,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - clusterPoolName, - clusterName, - clusterPatchRequest, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), clusterPoolName, clusterName, + clusterPatchRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1272,27 +1307,19 @@ private Mono>> updateWithResponseAsync( * @return the cluster along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterPatch clusterPatchRequest, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, ClusterPatch clusterPatchRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (clusterPoolName == null) { return Mono @@ -1309,22 +1336,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - clusterPoolName, - clusterName, - clusterPatchRequest, - accept, - context); + return service.update(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), clusterPoolName, clusterName, clusterPatchRequest, accept, context); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1335,19 +1353,17 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, this.client.getContext()); + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, this.client.getContext()); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1359,24 +1375,18 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ClusterInner> beginUpdateAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterPatch clusterPatchRequest, - Context context) { + private PollerFlux, ClusterInner> beginUpdateAsync(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ClusterInner.class, ClusterInner.class, context); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1387,16 +1397,15 @@ private PollerFlux, ClusterInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { - return this - .beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { + return this.beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest) .getSyncPoller(); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1408,20 +1417,15 @@ public SyncPoller, ClusterInner> beginUpdate( * @return the {@link SyncPoller} for polling of the cluster. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ClusterInner> beginUpdate( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterPatch clusterPatchRequest, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context) + public SyncPoller, ClusterInner> beginUpdate(String resourceGroupName, + String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest, Context context) { + return this.beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context) .getSyncPoller(); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1432,16 +1436,15 @@ public SyncPoller, ClusterInner> beginUpdate( * @return the cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { - return beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest) - .last() + private Mono updateAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterPatch clusterPatchRequest) { + return beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1453,20 +1456,15 @@ private Mono updateAsync( * @return the cluster on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterPatch clusterPatchRequest, - Context context) { - return beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context) - .last() + private Mono updateAsync(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterPatch clusterPatchRequest, Context context) { + return beginUpdateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1477,14 +1475,14 @@ private Mono updateAsync( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterPatch clusterPatchRequest) { + public ClusterInner update(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterPatch clusterPatchRequest) { return updateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest).block(); } /** * Updates an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1496,18 +1494,14 @@ public ClusterInner update( * @return the cluster. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner update( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterPatch clusterPatchRequest, - Context context) { + public ClusterInner update(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterPatch clusterPatchRequest, Context context) { return updateAsync(resourceGroupName, clusterPoolName, clusterName, clusterPatchRequest, context).block(); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1517,19 +1511,15 @@ public ClusterInner update( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1544,24 +1534,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1572,19 +1552,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1599,21 +1575,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, accept, context); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1623,19 +1591,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, clusterPoolName, clusterName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterPoolName, + String clusterName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterPoolName, clusterName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1646,19 +1612,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1668,14 +1633,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterPoolName, String clusterName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterPoolName, + String clusterName) { return this.beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName).getSyncPoller(); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1686,14 +1651,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { return this.beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName, context).getSyncPoller(); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1704,14 +1669,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String clusterPoolName, String clusterName) { - return beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName) - .last() + return beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1722,16 +1686,15 @@ private Mono deleteAsync(String resourceGroupName, String clusterPoolName, * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String clusterPoolName, String clusterName, + Context context) { + return beginDeleteAsync(resourceGroupName, clusterPoolName, clusterName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1746,7 +1709,7 @@ public void delete(String resourceGroupName, String clusterPoolName, String clus /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1762,7 +1725,7 @@ public void delete(String resourceGroupName, String clusterPoolName, String clus /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1770,22 +1733,18 @@ public void delete(String resourceGroupName, String clusterPoolName, String clus * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceConfigsSinglePageAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { + private Mono> listServiceConfigsSinglePageAsync(String resourceGroupName, + String clusterPoolName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1801,32 +1760,16 @@ private Mono> listServiceConfigsSinglePa final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listServiceConfigs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listServiceConfigs(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1835,22 +1778,18 @@ private Mono> listServiceConfigsSinglePa * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceConfigsSinglePageAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private Mono> listServiceConfigsSinglePageAsync(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1866,29 +1805,15 @@ private Mono> listServiceConfigsSinglePa final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listServiceConfigs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listServiceConfigs(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1898,16 +1823,15 @@ private Mono> listServiceConfigsSinglePa * @return cluster instance service configs api response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listServiceConfigsAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { - return new PagedFlux<>( - () -> listServiceConfigsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), + private PagedFlux listServiceConfigsAsync(String resourceGroupName, + String clusterPoolName, String clusterName) { + return new PagedFlux<>(() -> listServiceConfigsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), nextLink -> listServiceConfigsNextSinglePageAsync(nextLink)); } /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1918,8 +1842,8 @@ private PagedFlux listServiceConfigsAsync( * @return cluster instance service configs api response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listServiceConfigsAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private PagedFlux listServiceConfigsAsync(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { return new PagedFlux<>( () -> listServiceConfigsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, context), nextLink -> listServiceConfigsNextSinglePageAsync(nextLink, context)); @@ -1927,7 +1851,7 @@ private PagedFlux listServiceConfigsAsync( /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1937,14 +1861,14 @@ private PagedFlux listServiceConfigsAsync( * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName) { + public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName) { return new PagedIterable<>(listServiceConfigsAsync(resourceGroupName, clusterPoolName, clusterName)); } /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1955,14 +1879,14 @@ public PagedIterable listServiceConfigs( * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { return new PagedIterable<>(listServiceConfigsAsync(resourceGroupName, clusterPoolName, clusterName, context)); } /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -1970,22 +1894,18 @@ public PagedIterable listServiceConfigs( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInstanceViewsSinglePageAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { + private Mono> + listInstanceViewsSinglePageAsync(String resourceGroupName, String clusterPoolName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2001,32 +1921,16 @@ private Mono> listInstanceViewsSin final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listInstanceViews( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listInstanceViews(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2035,22 +1939,18 @@ private Mono> listInstanceViewsSin * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInstanceViewsSinglePageAsync( String resourceGroupName, String clusterPoolName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2066,29 +1966,15 @@ private Mono> listInstanceViewsSin final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listInstanceViews( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listInstanceViews(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2098,16 +1984,15 @@ private Mono> listInstanceViewsSin * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listInstanceViewsAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { - return new PagedFlux<>( - () -> listInstanceViewsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), + private PagedFlux listInstanceViewsAsync(String resourceGroupName, + String clusterPoolName, String clusterName) { + return new PagedFlux<>(() -> listInstanceViewsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName), nextLink -> listInstanceViewsNextSinglePageAsync(nextLink)); } /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2118,8 +2003,8 @@ private PagedFlux listInstanceViewsAsync( * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listInstanceViewsAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private PagedFlux listInstanceViewsAsync(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { return new PagedFlux<>( () -> listInstanceViewsSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, context), nextLink -> listInstanceViewsNextSinglePageAsync(nextLink, context)); @@ -2127,7 +2012,7 @@ private PagedFlux listInstanceViewsAsync( /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2137,14 +2022,14 @@ private PagedFlux listInstanceViewsAsync( * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName) { + public PagedIterable listInstanceViews(String resourceGroupName, + String clusterPoolName, String clusterName) { return new PagedIterable<>(listInstanceViewsAsync(resourceGroupName, clusterPoolName, clusterName)); } /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2155,14 +2040,14 @@ public PagedIterable listInstanceViews( * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + public PagedIterable listInstanceViews(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { return new PagedIterable<>(listInstanceViewsAsync(resourceGroupName, clusterPoolName, clusterName, context)); } /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2172,19 +2057,15 @@ public PagedIterable listInstanceViews( * @return the status of a cluster instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInstanceViewWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { + private Mono> getInstanceViewWithResponseAsync(String resourceGroupName, + String clusterPoolName, String clusterName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2199,24 +2080,14 @@ private Mono> getInstanceViewWithRespon } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getInstanceView( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context)) + .withContext(context -> service.getInstanceView(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2227,19 +2098,15 @@ private Mono> getInstanceViewWithRespon * @return the status of a cluster instance along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getInstanceViewWithResponseAsync( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + private Mono> getInstanceViewWithResponseAsync(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2254,21 +2121,13 @@ private Mono> getInstanceViewWithRespon } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getInstanceView( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - clusterPoolName, - clusterName, - accept, - context); + return service.getInstanceView(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), clusterPoolName, clusterName, accept, context); } /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2278,15 +2137,15 @@ private Mono> getInstanceViewWithRespon * @return the status of a cluster instance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getInstanceViewAsync( - String resourceGroupName, String clusterPoolName, String clusterName) { + private Mono getInstanceViewAsync(String resourceGroupName, String clusterPoolName, + String clusterName) { return getInstanceViewWithResponseAsync(resourceGroupName, clusterPoolName, clusterName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2297,14 +2156,14 @@ private Mono getInstanceViewAsync( * @return the status of a cluster instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getInstanceViewWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { + public Response getInstanceViewWithResponse(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { return getInstanceViewWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, context).block(); } /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -2314,21 +2173,22 @@ public Response getInstanceViewWithResponse( * @return the status of a cluster instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInstanceViewResultInner getInstanceView( - String resourceGroupName, String clusterPoolName, String clusterName) { + public ClusterInstanceViewResultInner getInstanceView(String resourceGroupName, String clusterPoolName, + String clusterName) { return getInstanceViewWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the list cluster operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByClusterPoolNameNextSinglePageAsync(String nextLink) { @@ -2336,76 +2196,59 @@ private Mono> listByClusterPoolNameNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByClusterPoolNameNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list cluster operation response along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the list cluster operation response along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByClusterPoolNameNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByClusterPoolNameNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByClusterPoolNameNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByClusterPoolNameNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listServiceConfigsNextSinglePageAsync(String nextLink) { @@ -2413,76 +2256,59 @@ private Mono> listServiceConfigsNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listServiceConfigsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cluster instance service configs api response along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceConfigsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listServiceConfigsNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listServiceConfigsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listServiceConfigsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listInstanceViewsNextSinglePageAsync(String nextLink) { @@ -2490,62 +2316,44 @@ private Mono> listInstanceViewsNex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listInstanceViewsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instance view of a HDInsight Cluster along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listInstanceViewsNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listInstanceViewsNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listInstanceViewsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listInstanceViewsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java index 7e1a594dfb535..4cd62c1d7e18f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersImpl.java @@ -16,6 +16,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.Cluster; import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; import com.azure.resourcemanager.hdinsight.containers.models.Clusters; import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigResult; @@ -26,30 +27,29 @@ public final class ClustersImpl implements Clusters { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - public ClustersImpl( - ClustersClient innerClient, + public ClustersImpl(ClustersClient innerClient, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName) { - PagedIterable inner = - this.serviceClient().listByClusterPoolName(resourceGroupName, clusterPoolName); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByClusterPoolName(resourceGroupName, clusterPoolName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } - public PagedIterable listByClusterPoolName( - String resourceGroupName, String clusterPoolName, Context context) { - PagedIterable inner = - this.serviceClient().listByClusterPoolName(resourceGroupName, clusterPoolName, context); - return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); + public PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, + Context context) { + PagedIterable inner + = this.serviceClient().listByClusterPoolName(resourceGroupName, clusterPoolName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager())); } - public Cluster resize( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest) { - ClusterInner inner = - this.serviceClient().resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); + public Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest) { + ClusterInner inner + = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest); if (inner != null) { return new ClusterImpl(inner, this.manager()); } else { @@ -57,14 +57,21 @@ public Cluster resize( } } - public Cluster resize( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context) { - ClusterInner inner = - this.serviceClient().resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context); + public Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest, Context context) { + ClusterInner inner = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterName, + clusterUpgradeRequest, context); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest) { + ClusterInner inner + = this.serviceClient().resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest); if (inner != null) { return new ClusterImpl(inner, this.manager()); } else { @@ -72,15 +79,23 @@ public Cluster resize( } } - public Response getWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, clusterPoolName, clusterName, context); + public Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest, Context context) { + ClusterInner inner = this.serviceClient().resize(resourceGroupName, clusterPoolName, clusterName, + clusterResizeRequest, context); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, clusterPoolName, clusterName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ClusterImpl(inner.getValue(), this.manager())); } else { return null; @@ -104,53 +119,50 @@ public void delete(String resourceGroupName, String clusterPoolName, String clus this.serviceClient().delete(resourceGroupName, clusterPoolName, clusterName, context); } - public PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName) { - PagedIterable inner = - this.serviceClient().listServiceConfigs(resourceGroupName, clusterPoolName, clusterName); - return Utils.mapPage(inner, inner1 -> new ServiceConfigResultImpl(inner1, this.manager())); + public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName) { + PagedIterable inner + = this.serviceClient().listServiceConfigs(resourceGroupName, clusterPoolName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceConfigResultImpl(inner1, this.manager())); } - public PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().listServiceConfigs(resourceGroupName, clusterPoolName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new ServiceConfigResultImpl(inner1, this.manager())); + public PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { + PagedIterable inner + = this.serviceClient().listServiceConfigs(resourceGroupName, clusterPoolName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceConfigResultImpl(inner1, this.manager())); } - public PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName) { - PagedIterable inner = - this.serviceClient().listInstanceViews(resourceGroupName, clusterPoolName, clusterName); - return Utils.mapPage(inner, inner1 -> new ClusterInstanceViewResultImpl(inner1, this.manager())); + public PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, + String clusterName) { + PagedIterable inner + = this.serviceClient().listInstanceViews(resourceGroupName, clusterPoolName, clusterName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterInstanceViewResultImpl(inner1, this.manager())); } - public PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - PagedIterable inner = - this.serviceClient().listInstanceViews(resourceGroupName, clusterPoolName, clusterName, context); - return Utils.mapPage(inner, inner1 -> new ClusterInstanceViewResultImpl(inner1, this.manager())); + public PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, + String clusterName, Context context) { + PagedIterable inner + = this.serviceClient().listInstanceViews(resourceGroupName, clusterPoolName, clusterName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterInstanceViewResultImpl(inner1, this.manager())); } - public Response getInstanceViewWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context) { - Response inner = - this.serviceClient().getInstanceViewWithResponse(resourceGroupName, clusterPoolName, clusterName, context); + public Response getInstanceViewWithResponse(String resourceGroupName, + String clusterPoolName, String clusterName, Context context) { + Response inner = this.serviceClient() + .getInstanceViewWithResponse(resourceGroupName, clusterPoolName, clusterName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ClusterInstanceViewResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public ClusterInstanceViewResult getInstanceView( - String resourceGroupName, String clusterPoolName, String clusterName) { - ClusterInstanceViewResultInner inner = - this.serviceClient().getInstanceView(resourceGroupName, clusterPoolName, clusterName); + public ClusterInstanceViewResult getInstanceView(String resourceGroupName, String clusterPoolName, + String clusterName) { + ClusterInstanceViewResultInner inner + = this.serviceClient().getInstanceView(resourceGroupName, clusterPoolName, clusterName); if (inner != null) { return new ClusterInstanceViewResultImpl(inner, this.manager()); } else { @@ -159,105 +171,77 @@ public ClusterInstanceViewResult getInstanceView( } public Cluster getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } return this.getWithResponse(resourceGroupName, clusterPoolName, clusterName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } return this.getWithResponse(resourceGroupName, clusterPoolName, clusterName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } this.delete(resourceGroupName, clusterPoolName, clusterName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String clusterPoolName = Utils.getValueFromIdByName(id, "clusterpools"); + String clusterPoolName = ResourceManagerUtils.getValueFromIdByName(id, "clusterpools"); if (clusterPoolName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusterpools'.", id))); } - String clusterName = Utils.getValueFromIdByName(id, "clusters"); + String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } this.delete(resourceGroupName, clusterPoolName, clusterName, context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientBuilder.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientBuilder.java index cb363a760c755..36c934c0ea257 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientBuilder.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the HDInsightContainersManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {HDInsightContainersManagementClientImpl.class}) +/** + * A builder for creating a new instance of the HDInsightContainersManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { HDInsightContainersManagementClientImpl.class }) public final class HDInsightContainersManagementClientBuilder { /* * The ID of the target subscription. The value must be an UUID. @@ -24,7 +26,7 @@ public final class HDInsightContainersManagementClientBuilder { /** * Sets The ID of the target subscription. The value must be an UUID. - * + * * @param subscriptionId the subscriptionId value. * @return the HDInsightContainersManagementClientBuilder. */ @@ -40,7 +42,7 @@ public HDInsightContainersManagementClientBuilder subscriptionId(String subscrip /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the HDInsightContainersManagementClientBuilder. */ @@ -56,7 +58,7 @@ public HDInsightContainersManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the HDInsightContainersManagementClientBuilder. */ @@ -72,7 +74,7 @@ public HDInsightContainersManagementClientBuilder environment(AzureEnvironment e /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the HDInsightContainersManagementClientBuilder. */ @@ -88,7 +90,7 @@ public HDInsightContainersManagementClientBuilder pipeline(HttpPipeline pipeline /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the HDInsightContainersManagementClientBuilder. */ @@ -104,7 +106,7 @@ public HDInsightContainersManagementClientBuilder defaultPollInterval(Duration d /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the HDInsightContainersManagementClientBuilder. */ @@ -115,30 +117,20 @@ public HDInsightContainersManagementClientBuilder serializerAdapter(SerializerAd /** * Builds an instance of HDInsightContainersManagementClientImpl with the provided parameters. - * + * * @return an instance of HDInsightContainersManagementClientImpl. */ public HDInsightContainersManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - HDInsightContainersManagementClientImpl client = - new HDInsightContainersManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + HDInsightContainersManagementClientImpl client = new HDInsightContainersManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java index ec03eecdf7641..46e2cce5ca846 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/HDInsightContainersManagementClientImpl.java @@ -24,7 +24,9 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.hdinsight.containers.fluent.AvailableClusterPoolVersionsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.AvailableClusterVersionsClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterAvailableUpgradesClient; import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterJobsClient; +import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolAvailableUpgradesClient; import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient; import com.azure.resourcemanager.hdinsight.containers.fluent.ClustersClient; import com.azure.resourcemanager.hdinsight.containers.fluent.HDInsightContainersManagementClient; @@ -39,159 +41,215 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the HDInsightContainersManagementClientImpl type. */ +/** + * Initializes a new instance of the HDInsightContainersManagementClientImpl type. + */ @ServiceClient(builder = HDInsightContainersManagementClientBuilder.class) public final class HDInsightContainersManagementClientImpl implements HDInsightContainersManagementClient { - /** The ID of the target subscription. The value must be an UUID. */ + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** * Gets The ID of the target subscription. The value must be an UUID. - * + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The ClusterPoolsClient object to access its operations. */ + /** + * The ClusterPoolsClient object to access its operations. + */ private final ClusterPoolsClient clusterPools; /** * Gets the ClusterPoolsClient object to access its operations. - * + * * @return the ClusterPoolsClient object. */ public ClusterPoolsClient getClusterPools() { return this.clusterPools; } - /** The ClustersClient object to access its operations. */ + /** + * The ClusterPoolAvailableUpgradesClient object to access its operations. + */ + private final ClusterPoolAvailableUpgradesClient clusterPoolAvailableUpgrades; + + /** + * Gets the ClusterPoolAvailableUpgradesClient object to access its operations. + * + * @return the ClusterPoolAvailableUpgradesClient object. + */ + public ClusterPoolAvailableUpgradesClient getClusterPoolAvailableUpgrades() { + return this.clusterPoolAvailableUpgrades; + } + + /** + * The ClustersClient object to access its operations. + */ private final ClustersClient clusters; /** * Gets the ClustersClient object to access its operations. - * + * * @return the ClustersClient object. */ public ClustersClient getClusters() { return this.clusters; } - /** The ClusterJobsClient object to access its operations. */ + /** + * The ClusterAvailableUpgradesClient object to access its operations. + */ + private final ClusterAvailableUpgradesClient clusterAvailableUpgrades; + + /** + * Gets the ClusterAvailableUpgradesClient object to access its operations. + * + * @return the ClusterAvailableUpgradesClient object. + */ + public ClusterAvailableUpgradesClient getClusterAvailableUpgrades() { + return this.clusterAvailableUpgrades; + } + + /** + * The ClusterJobsClient object to access its operations. + */ private final ClusterJobsClient clusterJobs; /** * Gets the ClusterJobsClient object to access its operations. - * + * * @return the ClusterJobsClient object. */ public ClusterJobsClient getClusterJobs() { return this.clusterJobs; } - /** The LocationsClient object to access its operations. */ + /** + * The LocationsClient object to access its operations. + */ private final LocationsClient locations; /** * Gets the LocationsClient object to access its operations. - * + * * @return the LocationsClient object. */ public LocationsClient getLocations() { return this.locations; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The AvailableClusterPoolVersionsClient object to access its operations. */ + /** + * The AvailableClusterPoolVersionsClient object to access its operations. + */ private final AvailableClusterPoolVersionsClient availableClusterPoolVersions; /** * Gets the AvailableClusterPoolVersionsClient object to access its operations. - * + * * @return the AvailableClusterPoolVersionsClient object. */ public AvailableClusterPoolVersionsClient getAvailableClusterPoolVersions() { return this.availableClusterPoolVersions; } - /** The AvailableClusterVersionsClient object to access its operations. */ + /** + * The AvailableClusterVersionsClient object to access its operations. + */ private final AvailableClusterVersionsClient availableClusterVersions; /** * Gets the AvailableClusterVersionsClient object to access its operations. - * + * * @return the AvailableClusterVersionsClient object. */ public AvailableClusterVersionsClient getAvailableClusterVersions() { @@ -200,7 +258,7 @@ public AvailableClusterVersionsClient getAvailableClusterVersions() { /** * Initializes an instance of HDInsightContainersManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. @@ -208,21 +266,18 @@ public AvailableClusterVersionsClient getAvailableClusterVersions() { * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - HDInsightContainersManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + HDInsightContainersManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-06-01-preview"; + this.apiVersion = "2023-11-01-preview"; this.clusterPools = new ClusterPoolsClientImpl(this); + this.clusterPoolAvailableUpgrades = new ClusterPoolAvailableUpgradesClientImpl(this); this.clusters = new ClustersClientImpl(this); + this.clusterAvailableUpgrades = new ClusterAvailableUpgradesClientImpl(this); this.clusterJobs = new ClusterJobsClientImpl(this); this.locations = new LocationsClientImpl(this); this.operations = new OperationsClientImpl(this); @@ -232,7 +287,7 @@ public AvailableClusterVersionsClient getAvailableClusterVersions() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -241,7 +296,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -251,7 +306,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -261,26 +316,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -293,19 +337,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsClientImpl.java index a761f99ceed65..d6e3786562efd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsClientImpl.java @@ -27,22 +27,28 @@ import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in LocationsClient. */ +/** + * An instance of this class provides access to all the operations defined in LocationsClient. + */ public final class LocationsClientImpl implements LocationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LocationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HDInsightContainersManagementClientImpl client; /** * Initializes an instance of LocationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LocationsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = - RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -53,24 +59,20 @@ public final class LocationsClientImpl implements LocationsClient { @Host("{$host}") @ServiceInterface(name = "HDInsightContainersM") public interface LocationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("location") String location, @BodyParam("application/json") NameAvailabilityParameters nameAvailabilityParameters, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,50 +81,36 @@ Mono> checkNameAvailability( * @return result of check name availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, NameAvailabilityParameters nameAvailabilityParameters) { + private Mono> checkNameAvailabilityWithResponseAsync(String location, + NameAvailabilityParameters nameAvailabilityParameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (nameAvailabilityParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter nameAvailabilityParameters is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter nameAvailabilityParameters is required and cannot be null.")); } else { nameAvailabilityParameters.validate(); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - location, - nameAvailabilityParameters, - accept, - context)) + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), location, nameAvailabilityParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -132,47 +120,34 @@ private Mono> checkNameAvailabilityWithRes * @return result of check name availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String location, NameAvailabilityParameters nameAvailabilityParameters, Context context) { + private Mono> checkNameAvailabilityWithResponseAsync(String location, + NameAvailabilityParameters nameAvailabilityParameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } if (nameAvailabilityParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter nameAvailabilityParameters is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter nameAvailabilityParameters is required and cannot be null.")); } else { nameAvailabilityParameters.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - location, - nameAvailabilityParameters, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), location, nameAvailabilityParameters, accept, context); } /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,15 +156,15 @@ private Mono> checkNameAvailabilityWithRes * @return result of check name availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String location, NameAvailabilityParameters nameAvailabilityParameters) { + private Mono checkNameAvailabilityAsync(String location, + NameAvailabilityParameters nameAvailabilityParameters) { return checkNameAvailabilityWithResponseAsync(location, nameAvailabilityParameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -199,14 +174,14 @@ private Mono checkNameAvailabilityAsync( * @return result of check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters nameAvailabilityParameters, Context context) { + public Response checkNameAvailabilityWithResponse(String location, + NameAvailabilityParameters nameAvailabilityParameters, Context context) { return checkNameAvailabilityWithResponseAsync(location, nameAvailabilityParameters, context).block(); } /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -215,8 +190,8 @@ public Response checkNameAvailabilityWithResponse( * @return result of check name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - public NameAvailabilityResultInner checkNameAvailability( - String location, NameAvailabilityParameters nameAvailabilityParameters) { + public NameAvailabilityResultInner checkNameAvailability(String location, + NameAvailabilityParameters nameAvailabilityParameters) { return checkNameAvailabilityWithResponse(location, nameAvailabilityParameters, Context.NONE).getValue(); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsImpl.java index 51b2ffc20764a..eb75b5db8f78b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/LocationsImpl.java @@ -21,32 +21,28 @@ public final class LocationsImpl implements Locations { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - public LocationsImpl( - LocationsClient innerClient, + public LocationsImpl(LocationsClient innerClient, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters nameAvailabilityParameters, Context context) { - Response inner = - this.serviceClient().checkNameAvailabilityWithResponse(location, nameAvailabilityParameters, context); + public Response checkNameAvailabilityWithResponse(String location, + NameAvailabilityParameters nameAvailabilityParameters, Context context) { + Response inner + = this.serviceClient().checkNameAvailabilityWithResponse(location, nameAvailabilityParameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new NameAvailabilityResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public NameAvailabilityResult checkNameAvailability( - String location, NameAvailabilityParameters nameAvailabilityParameters) { - NameAvailabilityResultInner inner = - this.serviceClient().checkNameAvailability(location, nameAvailabilityParameters); + public NameAvailabilityResult checkNameAvailability(String location, + NameAvailabilityParameters nameAvailabilityParameters) { + NameAvailabilityResultInner inner + = this.serviceClient().checkNameAvailability(location, nameAvailabilityParameters); if (inner != null) { return new NameAvailabilityResultImpl(inner, this.manager()); } else { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/NameAvailabilityResultImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/NameAvailabilityResultImpl.java index 4ecf9a767c658..f507570c7393e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/NameAvailabilityResultImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/NameAvailabilityResultImpl.java @@ -12,8 +12,7 @@ public final class NameAvailabilityResultImpl implements NameAvailabilityResult private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - NameAvailabilityResultImpl( - NameAvailabilityResultInner innerObject, + NameAvailabilityResultImpl(NameAvailabilityResultInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationImpl.java index 1922283fc545c..c185664e6c578 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationImpl.java @@ -15,8 +15,7 @@ public final class OperationImpl implements Operation { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - OperationImpl( - OperationInner innerObject, + OperationImpl(OperationInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsClientImpl.java index 20349a742a9fc..2bbdae9a5cde1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsClientImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsClientImpl.java @@ -30,125 +30,106 @@ import com.azure.resourcemanager.hdinsight.containers.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final HDInsightContainersManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(HDInsightContainersManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for HDInsightContainersManagementClientOperations to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for HDInsightContainersManagementClientOperations to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "HDInsightContainersM") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.HDInsight/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Returns list of operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns list of operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -157,27 +138,27 @@ private PagedFlux listAsync() { /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns list of operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -186,13 +167,13 @@ public PagedIterable list() { /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -201,14 +182,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -216,37 +198,28 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -254,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsImpl.java index b9f8c4cb831ac..06bfa4f8c13d8 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/OperationsImpl.java @@ -19,8 +19,7 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, + public OperationsImpl(OperationsClient innerClient, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public OperationsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/Utils.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java similarity index 80% rename from sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/Utils.java rename to sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java index c57920d977974..d82914d0b7f41 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/Utils.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ServiceConfigResultImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ServiceConfigResultImpl.java index f079593a27c20..0bfeb02874998 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ServiceConfigResultImpl.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ServiceConfigResultImpl.java @@ -15,8 +15,7 @@ public final class ServiceConfigResultImpl implements ServiceConfigResult { private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager; - ServiceConfigResultImpl( - ServiceConfigResultInner innerObject, + ServiceConfigResultImpl(ServiceConfigResultInner innerObject, com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/package-info.java index 44bc300497811..2fe549fa9a323 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/package-info.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/package-info.java @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the implementations for HDInsightContainersManagementClient. HDInsight Containers Management - * Client. + * Package containing the implementations for HDInsightContainersManagementClient. + * HDInsight Containers Management Client. */ package com.azure.resourcemanager.hdinsight.containers.implementation; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Action.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Action.java index 50681ea78cc87..550eef95bf6cd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Action.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Action.java @@ -13,36 +13,64 @@ * values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, LIST_SAVEPOINT, or DELETE. */ public final class Action extends ExpandableStringEnum { - /** Static value NEW for Action. */ + /** + * Static value NEW for Action. + */ public static final Action NEW = fromString("NEW"); - /** Static value UPDATE for Action. */ + /** + * Static value UPDATE for Action. + */ public static final Action UPDATE = fromString("UPDATE"); - /** Static value STATELESS_UPDATE for Action. */ + /** + * Static value STATELESS_UPDATE for Action. + */ public static final Action STATELESS_UPDATE = fromString("STATELESS_UPDATE"); - /** Static value STOP for Action. */ + /** + * Static value STOP for Action. + */ public static final Action STOP = fromString("STOP"); - /** Static value START for Action. */ + /** + * Static value START for Action. + */ public static final Action START = fromString("START"); - /** Static value CANCEL for Action. */ + /** + * Static value CANCEL for Action. + */ public static final Action CANCEL = fromString("CANCEL"); - /** Static value SAVEPOINT for Action. */ + /** + * Static value SAVEPOINT for Action. + */ public static final Action SAVEPOINT = fromString("SAVEPOINT"); - /** Static value LIST_SAVEPOINT for Action. */ + /** + * Static value LIST_SAVEPOINT for Action. + */ public static final Action LIST_SAVEPOINT = fromString("LIST_SAVEPOINT"); - /** Static value DELETE for Action. */ + /** + * Static value DELETE for Action. + */ public static final Action DELETE = fromString("DELETE"); + /** + * Static value LAST_STATE_UPDATE for Action. + */ + public static final Action LAST_STATE_UPDATE = fromString("LAST_STATE_UPDATE"); + + /** + * Static value RE_LAUNCH for Action. + */ + public static final Action RE_LAUNCH = fromString("RE_LAUNCH"); + /** * Creates a new instance of Action value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -51,7 +79,7 @@ public Action() { /** * Creates or finds a Action from its string representation. - * + * * @param name a name to look for. * @return the corresponding Action. */ @@ -62,7 +90,7 @@ public static Action fromString(String name) { /** * Gets known Action values. - * + * * @return known Action values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ActionType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ActionType.java index 6e19c2c0e96f0..a580638e04500 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ActionType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ActionType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ public static final ActionType INTERNAL = fromString("Internal"); /** * Creates a new instance of ActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ActionType() { /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -35,7 +39,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfile.java index 7aafcb5acda5a..cf1c29acbab2f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of the cluster pool underlying AKS cluster. */ +/** + * Properties of the cluster pool underlying AKS cluster. + */ @Fluent public class AksClusterProfile { /* @@ -28,13 +30,15 @@ public class AksClusterProfile { @JsonProperty(value = "aksVersion", access = JsonProperty.Access.WRITE_ONLY) private String aksVersion; - /** Creates an instance of AksClusterProfile class. */ + /** + * Creates an instance of AksClusterProfile class. + */ public AksClusterProfile() { } /** * Get the aksClusterResourceId property: ARM Resource ID of the AKS cluster. - * + * * @return the aksClusterResourceId value. */ public String aksClusterResourceId() { @@ -43,7 +47,7 @@ public String aksClusterResourceId() { /** * Set the aksClusterResourceId property: ARM Resource ID of the AKS cluster. - * + * * @param aksClusterResourceId the aksClusterResourceId value to set. * @return the AksClusterProfile object itself. */ @@ -54,7 +58,7 @@ public AksClusterProfile withAksClusterResourceId(String aksClusterResourceId) { /** * Get the aksClusterAgentPoolIdentityProfile property: Identity properties of the AKS cluster agentpool MSI. - * + * * @return the aksClusterAgentPoolIdentityProfile value. */ public AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile() { @@ -63,7 +67,7 @@ public AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolId /** * Set the aksClusterAgentPoolIdentityProfile property: Identity properties of the AKS cluster agentpool MSI. - * + * * @param aksClusterAgentPoolIdentityProfile the aksClusterAgentPoolIdentityProfile value to set. * @return the AksClusterProfile object itself. */ @@ -75,7 +79,7 @@ public AksClusterProfile withAksClusterAgentPoolIdentityProfile( /** * Get the aksVersion property: AKS control plane and default node pool version of this ClusterPool. - * + * * @return the aksVersion value. */ public String aksVersion() { @@ -84,7 +88,7 @@ public String aksVersion() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java index 5bc683c1f3830..bb9742fc107cc 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java @@ -6,28 +6,38 @@ import com.azure.core.annotation.Fluent; -/** Identity properties of the AKS cluster agentpool MSI. */ +/** + * Identity properties of the AKS cluster agentpool MSI. + */ @Fluent public final class AksClusterProfileAksClusterAgentPoolIdentityProfile extends IdentityProfile { - /** Creates an instance of AksClusterProfileAksClusterAgentPoolIdentityProfile class. */ + /** + * Creates an instance of AksClusterProfileAksClusterAgentPoolIdentityProfile class. + */ public AksClusterProfileAksClusterAgentPoolIdentityProfile() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiResourceId(String msiResourceId) { super.withMsiResourceId(msiResourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiClientId(String msiClientId) { super.withMsiClientId(msiClientId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiObjectId(String msiObjectId) { super.withMsiObjectId(msiObjectId); @@ -36,7 +46,7 @@ public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiObjectId(Strin /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AuthorizationProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AuthorizationProfile.java index 01f38b0de2fdf..616c74406f217 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AuthorizationProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AuthorizationProfile.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. */ +/** + * Authorization profile with details of AAD user Ids and group Ids authorized for data plane access. + */ @Fluent public final class AuthorizationProfile { /* @@ -23,13 +25,15 @@ public final class AuthorizationProfile { @JsonProperty(value = "groupIds") private List groupIds; - /** Creates an instance of AuthorizationProfile class. */ + /** + * Creates an instance of AuthorizationProfile class. + */ public AuthorizationProfile() { } /** * Get the userIds property: AAD user Ids authorized for data plane access. - * + * * @return the userIds value. */ public List userIds() { @@ -38,7 +42,7 @@ public List userIds() { /** * Set the userIds property: AAD user Ids authorized for data plane access. - * + * * @param userIds the userIds value to set. * @return the AuthorizationProfile object itself. */ @@ -49,7 +53,7 @@ public AuthorizationProfile withUserIds(List userIds) { /** * Get the groupIds property: AAD group Ids authorized for data plane access. - * + * * @return the groupIds value. */ public List groupIds() { @@ -58,7 +62,7 @@ public List groupIds() { /** * Set the groupIds property: AAD group Ids authorized for data plane access. - * + * * @param groupIds the groupIds value to set. * @return the AuthorizationProfile object itself. */ @@ -69,7 +73,7 @@ public AuthorizationProfile withGroupIds(List groupIds) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleProfile.java index b56b36738e70e..9298321ca2139 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. */ +/** + * This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale. + */ @Fluent public final class AutoscaleProfile { /* @@ -43,13 +45,15 @@ public final class AutoscaleProfile { @JsonProperty(value = "loadBasedConfig") private LoadBasedConfig loadBasedConfig; - /** Creates an instance of AutoscaleProfile class. */ + /** + * Creates an instance of AutoscaleProfile class. + */ public AutoscaleProfile() { } /** * Get the enabled property: This indicates whether auto scale is enabled on HDInsight on AKS cluster. - * + * * @return the enabled value. */ public boolean enabled() { @@ -58,7 +62,7 @@ public boolean enabled() { /** * Set the enabled property: This indicates whether auto scale is enabled on HDInsight on AKS cluster. - * + * * @param enabled the enabled value to set. * @return the AutoscaleProfile object itself. */ @@ -70,9 +74,9 @@ public AutoscaleProfile withEnabled(boolean enabled) { /** * Get the gracefulDecommissionTimeout property: This property is for graceful decommission timeout; It has a * default setting of 3600 seconds before forced shutdown takes place. This is the maximal time to wait for running - * containers and applications to complete before transition a DECOMMISSIONING node into DECOMMISSIONED. The default - * value is 3600 seconds. Negative value (like -1) is handled as infinite timeout. - * + * containers and applications to complete before transition a DECOMMISSIONING node into DECOMMISSIONED. The + * default value is 3600 seconds. Negative value (like -1) is handled as infinite timeout. + * * @return the gracefulDecommissionTimeout value. */ public Integer gracefulDecommissionTimeout() { @@ -82,9 +86,9 @@ public Integer gracefulDecommissionTimeout() { /** * Set the gracefulDecommissionTimeout property: This property is for graceful decommission timeout; It has a * default setting of 3600 seconds before forced shutdown takes place. This is the maximal time to wait for running - * containers and applications to complete before transition a DECOMMISSIONING node into DECOMMISSIONED. The default - * value is 3600 seconds. Negative value (like -1) is handled as infinite timeout. - * + * containers and applications to complete before transition a DECOMMISSIONING node into DECOMMISSIONED. The + * default value is 3600 seconds. Negative value (like -1) is handled as infinite timeout. + * * @param gracefulDecommissionTimeout the gracefulDecommissionTimeout value to set. * @return the AutoscaleProfile object itself. */ @@ -96,7 +100,7 @@ public AutoscaleProfile withGracefulDecommissionTimeout(Integer gracefulDecommis /** * Get the autoscaleType property: User to specify which type of Autoscale to be implemented - Scheduled Based or * Load Based. - * + * * @return the autoscaleType value. */ public AutoscaleType autoscaleType() { @@ -106,7 +110,7 @@ public AutoscaleType autoscaleType() { /** * Set the autoscaleType property: User to specify which type of Autoscale to be implemented - Scheduled Based or * Load Based. - * + * * @param autoscaleType the autoscaleType value to set. * @return the AutoscaleProfile object itself. */ @@ -117,7 +121,7 @@ public AutoscaleProfile withAutoscaleType(AutoscaleType autoscaleType) { /** * Get the scheduleBasedConfig property: Profiles of schedule based Autoscale. - * + * * @return the scheduleBasedConfig value. */ public ScheduleBasedConfig scheduleBasedConfig() { @@ -126,7 +130,7 @@ public ScheduleBasedConfig scheduleBasedConfig() { /** * Set the scheduleBasedConfig property: Profiles of schedule based Autoscale. - * + * * @param scheduleBasedConfig the scheduleBasedConfig value to set. * @return the AutoscaleProfile object itself. */ @@ -137,7 +141,7 @@ public AutoscaleProfile withScheduleBasedConfig(ScheduleBasedConfig scheduleBase /** * Get the loadBasedConfig property: Profiles of load based Autoscale. - * + * * @return the loadBasedConfig value. */ public LoadBasedConfig loadBasedConfig() { @@ -146,7 +150,7 @@ public LoadBasedConfig loadBasedConfig() { /** * Set the loadBasedConfig property: Profiles of load based Autoscale. - * + * * @param loadBasedConfig the loadBasedConfig value to set. * @return the AutoscaleProfile object itself. */ @@ -157,7 +161,7 @@ public AutoscaleProfile withLoadBasedConfig(LoadBasedConfig loadBasedConfig) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleType.java index 721c7e49f2d16..fd52e266d057b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AutoscaleType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. */ +/** + * User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based. + */ public final class AutoscaleType extends ExpandableStringEnum { - /** Static value ScheduleBased for AutoscaleType. */ + /** + * Static value ScheduleBased for AutoscaleType. + */ public static final AutoscaleType SCHEDULE_BASED = fromString("ScheduleBased"); - /** Static value LoadBased for AutoscaleType. */ + /** + * Static value LoadBased for AutoscaleType. + */ public static final AutoscaleType LOAD_BASED = fromString("LoadBased"); /** * Creates a new instance of AutoscaleType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AutoscaleType() { /** * Creates or finds a AutoscaleType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AutoscaleType. */ @@ -38,7 +44,7 @@ public static AutoscaleType fromString(String name) { /** * Gets known AutoscaleType values. - * + * * @return known AutoscaleType values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterPoolVersions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterPoolVersions.java index c6c42f888bce1..4a939db36afd0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterPoolVersions.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterPoolVersions.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of AvailableClusterPoolVersions. */ +/** + * Resource collection API of AvailableClusterPoolVersions. + */ public interface AvailableClusterPoolVersions { /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +24,7 @@ public interface AvailableClusterPoolVersions { /** * Returns a list of available cluster pool versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterVersions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterVersions.java index a25493692415b..12bf185415ddb 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterVersions.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AvailableClusterVersions.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of AvailableClusterVersions. */ +/** + * Resource collection API of AvailableClusterVersions. + */ public interface AvailableClusterVersions { /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +24,7 @@ public interface AvailableClusterVersions { /** * Returns a list of available cluster versions. - * + * * @param location The name of the Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CatalogOptions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CatalogOptions.java index ff9c1df460c8f..23d9492e98adf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CatalogOptions.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CatalogOptions.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Trino cluster catalog options. */ +/** + * Trino cluster catalog options. + */ @Fluent public final class CatalogOptions { /* @@ -17,13 +19,15 @@ public final class CatalogOptions { @JsonProperty(value = "hive") private List hive; - /** Creates an instance of CatalogOptions class. */ + /** + * Creates an instance of CatalogOptions class. + */ public CatalogOptions() { } /** * Get the hive property: hive catalog options. - * + * * @return the hive value. */ public List hive() { @@ -32,7 +36,7 @@ public List hive() { /** * Set the hive property: hive catalog options. - * + * * @param hive the hive value to set. * @return the CatalogOptions object itself. */ @@ -43,7 +47,7 @@ public CatalogOptions withHive(List hive) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Cluster.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Cluster.java index 3a86098220fb8..d7eeceee2d437 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Cluster.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Cluster.java @@ -10,139 +10,146 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner; import java.util.Map; -/** An immutable client-side representation of Cluster. */ +/** + * An immutable client-side representation of Cluster. + */ public interface Cluster { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningStatus provisioningState(); /** * Gets the clusterType property: The type of cluster. - * + * * @return the clusterType value. */ String clusterType(); /** * Gets the deploymentId property: A unique id generated by the RP to identify the resource. - * + * * @return the deploymentId value. */ String deploymentId(); /** * Gets the computeProfile property: The compute profile. - * + * * @return the computeProfile value. */ ComputeProfile computeProfile(); /** * Gets the clusterProfile property: Cluster profile. - * + * * @return the clusterProfile value. */ ClusterProfile clusterProfile(); /** * Gets the status property: Business status of the resource. - * + * * @return the status value. */ String status(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner object. - * + * * @return the inner object. */ ClusterInner innerModel(); - /** The entirety of the Cluster definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { + /** + * The entirety of the Cluster definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Cluster definition stages. */ + /** + * The Cluster definition stages. + */ interface DefinitionStages { - /** The first stage of the Cluster definition. */ + /** + * The first stage of the Cluster definition. + */ interface Blank extends WithLocation { } - /** The stage of the Cluster definition allowing to specify location. */ + /** + * The stage of the Cluster definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -150,18 +157,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithParentResource withRegion(String location); } - /** The stage of the Cluster definition allowing to specify parent resource. */ + /** + * The stage of the Cluster definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, clusterPoolName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @return the next definition stage. @@ -173,65 +182,70 @@ interface WithParentResource { * The stage of the Cluster definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithClusterType, - DefinitionStages.WithComputeProfile, - DefinitionStages.WithClusterProfile { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithClusterType, + DefinitionStages.WithComputeProfile, DefinitionStages.WithClusterProfile { /** * Executes the create request. - * + * * @return the created resource. */ Cluster create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Cluster create(Context context); } - /** The stage of the Cluster definition allowing to specify tags. */ + /** + * The stage of the Cluster definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Cluster definition allowing to specify clusterType. */ + /** + * The stage of the Cluster definition allowing to specify clusterType. + */ interface WithClusterType { /** * Specifies the clusterType property: The type of cluster.. - * + * * @param clusterType The type of cluster. * @return the next definition stage. */ WithCreate withClusterType(String clusterType); } - /** The stage of the Cluster definition allowing to specify computeProfile. */ + /** + * The stage of the Cluster definition allowing to specify computeProfile. + */ interface WithComputeProfile { /** * Specifies the computeProfile property: The compute profile.. - * + * * @param computeProfile The compute profile. * @return the next definition stage. */ WithCreate withComputeProfile(ComputeProfile computeProfile); } - /** The stage of the Cluster definition allowing to specify clusterProfile. */ + /** + * The stage of the Cluster definition allowing to specify clusterProfile. + */ interface WithClusterProfile { /** * Specifies the clusterProfile property: Cluster profile.. - * + * * @param clusterProfile Cluster profile. * @return the next definition stage. */ @@ -241,47 +255,55 @@ interface WithClusterProfile { /** * Begins update for the Cluster resource. - * + * * @return the stage of resource update. */ Cluster.Update update(); - /** The template for Cluster update. */ + /** + * The template for Cluster update. + */ interface Update extends UpdateStages.WithTags, UpdateStages.WithClusterProfile { /** * Executes the update request. - * + * * @return the updated resource. */ Cluster apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Cluster apply(Context context); } - /** The Cluster update stages. */ + /** + * The Cluster update stages. + */ interface UpdateStages { - /** The stage of the Cluster update allowing to specify tags. */ + /** + * The stage of the Cluster update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Cluster update allowing to specify clusterProfile. */ + /** + * The stage of the Cluster update allowing to specify clusterProfile. + */ interface WithClusterProfile { /** * Specifies the clusterProfile property: Cluster resource patch properties.. - * + * * @param clusterProfile Cluster resource patch properties. * @return the next definition stage. */ @@ -291,22 +313,45 @@ interface WithClusterProfile { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Cluster refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ Cluster refresh(Context context); + /** + * Upgrade a cluster. + * + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + Cluster upgrade(ClusterUpgrade clusterUpgradeRequest); + + /** + * Upgrade a cluster. + * + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + Cluster upgrade(ClusterUpgrade clusterUpgradeRequest, Context context); + /** * Resize an existing Cluster. - * + * * @param clusterResizeRequest Resize a cluster. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -317,7 +362,7 @@ interface WithClusterProfile { /** * Resize an existing Cluster. - * + * * @param clusterResizeRequest Resize a cluster. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAccessProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAccessProfile.java new file mode 100644 index 0000000000000..bd89f1b68d272 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAccessProfile.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster access profile. + */ +@Fluent +public final class ClusterAccessProfile { + /* + * Whether to create cluster using private IP instead of public IP. This property must be set at create time. + */ + @JsonProperty(value = "enableInternalIngress", required = true) + private boolean enableInternalIngress; + + /* + * Private link service resource ID. Only when enableInternalIngress is true, this property will be returned. + */ + @JsonProperty(value = "privateLinkServiceId", access = JsonProperty.Access.WRITE_ONLY) + private String privateLinkServiceId; + + /** + * Creates an instance of ClusterAccessProfile class. + */ + public ClusterAccessProfile() { + } + + /** + * Get the enableInternalIngress property: Whether to create cluster using private IP instead of public IP. This + * property must be set at create time. + * + * @return the enableInternalIngress value. + */ + public boolean enableInternalIngress() { + return this.enableInternalIngress; + } + + /** + * Set the enableInternalIngress property: Whether to create cluster using private IP instead of public IP. This + * property must be set at create time. + * + * @param enableInternalIngress the enableInternalIngress value to set. + * @return the ClusterAccessProfile object itself. + */ + public ClusterAccessProfile withEnableInternalIngress(boolean enableInternalIngress) { + this.enableInternalIngress = enableInternalIngress; + return this; + } + + /** + * Get the privateLinkServiceId property: Private link service resource ID. Only when enableInternalIngress is + * true, this property will be returned. + * + * @return the privateLinkServiceId value. + */ + public String privateLinkServiceId() { + return this.privateLinkServiceId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java new file mode 100644 index 0000000000000..eb0236cb1be52 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of upgrading cluster's AKS patch version. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("AKSPatchUpgrade") +@Immutable +public final class ClusterAksPatchVersionUpgradeProperties extends ClusterUpgradeProperties { + /** + * Creates an instance of ClusterAksPatchVersionUpgradeProperties class. + */ + public ClusterAksPatchVersionUpgradeProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrade.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrade.java new file mode 100644 index 0000000000000..1412720b4a91d --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrade.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; + +/** + * An immutable client-side representation of ClusterAvailableUpgrade. + */ +public interface ClusterAvailableUpgrade { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Gets or sets the properties. Define cluster upgrade specific properties. + * + * @return the properties value. + */ + ClusterAvailableUpgradeProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner object. + * + * @return the inner object. + */ + ClusterAvailableUpgradeInner innerModel(); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java new file mode 100644 index 0000000000000..0357db6013cf7 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Cluster available AKS patch version upgrade. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("AKSPatchUpgrade") +@Fluent +public final class ClusterAvailableUpgradeAksPatchUpgradeProperties extends ClusterAvailableUpgradeProperties { + /* + * Current node pool version. + */ + @JsonProperty(value = "currentVersion") + private String currentVersion; + + /* + * Current AKS version's status: whether it is deprecated or supported + */ + @JsonProperty(value = "currentVersionStatus") + private CurrentClusterAksVersionStatus currentVersionStatus; + + /* + * Latest available version, which should be equal to AKS control plane version if it's not deprecated. + */ + @JsonProperty(value = "latestVersion") + private String latestVersion; + + /** + * Creates an instance of ClusterAvailableUpgradeAksPatchUpgradeProperties class. + */ + public ClusterAvailableUpgradeAksPatchUpgradeProperties() { + } + + /** + * Get the currentVersion property: Current node pool version. + * + * @return the currentVersion value. + */ + public String currentVersion() { + return this.currentVersion; + } + + /** + * Set the currentVersion property: Current node pool version. + * + * @param currentVersion the currentVersion value to set. + * @return the ClusterAvailableUpgradeAksPatchUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeAksPatchUpgradeProperties withCurrentVersion(String currentVersion) { + this.currentVersion = currentVersion; + return this; + } + + /** + * Get the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. + * + * @return the currentVersionStatus value. + */ + public CurrentClusterAksVersionStatus currentVersionStatus() { + return this.currentVersionStatus; + } + + /** + * Set the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. + * + * @param currentVersionStatus the currentVersionStatus value to set. + * @return the ClusterAvailableUpgradeAksPatchUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeAksPatchUpgradeProperties + withCurrentVersionStatus(CurrentClusterAksVersionStatus currentVersionStatus) { + this.currentVersionStatus = currentVersionStatus; + return this; + } + + /** + * Get the latestVersion property: Latest available version, which should be equal to AKS control plane version if + * it's not deprecated. + * + * @return the latestVersion value. + */ + public String latestVersion() { + return this.latestVersion; + } + + /** + * Set the latestVersion property: Latest available version, which should be equal to AKS control plane version if + * it's not deprecated. + * + * @param latestVersion the latestVersion value to set. + * @return the ClusterAvailableUpgradeAksPatchUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(String latestVersion) { + this.latestVersion = latestVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java new file mode 100644 index 0000000000000..2e88b74167969 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; + +/** + * Cluster available hotfix version upgrade. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("HotfixUpgrade") +@Fluent +public final class ClusterAvailableUpgradeHotfixUpgradeProperties extends ClusterAvailableUpgradeProperties { + /* + * Hotfix version upgrade description. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Source OSS version of current cluster component. + */ + @JsonProperty(value = "sourceOssVersion") + private String sourceOssVersion; + + /* + * Source cluster version of current cluster component. + */ + @JsonProperty(value = "sourceClusterVersion") + private String sourceClusterVersion; + + /* + * Source build number of current cluster component. + */ + @JsonProperty(value = "sourceBuildNumber") + private String sourceBuildNumber; + + /* + * Target OSS version of component to be upgraded. + */ + @JsonProperty(value = "targetOssVersion") + private String targetOssVersion; + + /* + * Target cluster version of component to be upgraded. + */ + @JsonProperty(value = "targetClusterVersion") + private String targetClusterVersion; + + /* + * Target build number of component to be upgraded. + */ + @JsonProperty(value = "targetBuildNumber") + private String targetBuildNumber; + + /* + * Name of component to be upgraded. + */ + @JsonProperty(value = "componentName") + private String componentName; + + /* + * Severity of this upgrade. + */ + @JsonProperty(value = "severity") + private Severity severity; + + /* + * Extended properties of current available upgrade version + */ + @JsonProperty(value = "extendedProperties") + private String extendedProperties; + + /* + * Created time of current available upgrade version + */ + @JsonProperty(value = "createdTime") + private OffsetDateTime createdTime; + + /** + * Creates an instance of ClusterAvailableUpgradeHotfixUpgradeProperties class. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties() { + } + + /** + * Get the description property: Hotfix version upgrade description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Hotfix version upgrade description. + * + * @param description the description value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the sourceOssVersion property: Source OSS version of current cluster component. + * + * @return the sourceOssVersion value. + */ + public String sourceOssVersion() { + return this.sourceOssVersion; + } + + /** + * Set the sourceOssVersion property: Source OSS version of current cluster component. + * + * @param sourceOssVersion the sourceOssVersion value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceOssVersion(String sourceOssVersion) { + this.sourceOssVersion = sourceOssVersion; + return this; + } + + /** + * Get the sourceClusterVersion property: Source cluster version of current cluster component. + * + * @return the sourceClusterVersion value. + */ + public String sourceClusterVersion() { + return this.sourceClusterVersion; + } + + /** + * Set the sourceClusterVersion property: Source cluster version of current cluster component. + * + * @param sourceClusterVersion the sourceClusterVersion value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceClusterVersion(String sourceClusterVersion) { + this.sourceClusterVersion = sourceClusterVersion; + return this; + } + + /** + * Get the sourceBuildNumber property: Source build number of current cluster component. + * + * @return the sourceBuildNumber value. + */ + public String sourceBuildNumber() { + return this.sourceBuildNumber; + } + + /** + * Set the sourceBuildNumber property: Source build number of current cluster component. + * + * @param sourceBuildNumber the sourceBuildNumber value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceBuildNumber(String sourceBuildNumber) { + this.sourceBuildNumber = sourceBuildNumber; + return this; + } + + /** + * Get the targetOssVersion property: Target OSS version of component to be upgraded. + * + * @return the targetOssVersion value. + */ + public String targetOssVersion() { + return this.targetOssVersion; + } + + /** + * Set the targetOssVersion property: Target OSS version of component to be upgraded. + * + * @param targetOssVersion the targetOssVersion value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetOssVersion(String targetOssVersion) { + this.targetOssVersion = targetOssVersion; + return this; + } + + /** + * Get the targetClusterVersion property: Target cluster version of component to be upgraded. + * + * @return the targetClusterVersion value. + */ + public String targetClusterVersion() { + return this.targetClusterVersion; + } + + /** + * Set the targetClusterVersion property: Target cluster version of component to be upgraded. + * + * @param targetClusterVersion the targetClusterVersion value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetClusterVersion(String targetClusterVersion) { + this.targetClusterVersion = targetClusterVersion; + return this; + } + + /** + * Get the targetBuildNumber property: Target build number of component to be upgraded. + * + * @return the targetBuildNumber value. + */ + public String targetBuildNumber() { + return this.targetBuildNumber; + } + + /** + * Set the targetBuildNumber property: Target build number of component to be upgraded. + * + * @param targetBuildNumber the targetBuildNumber value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetBuildNumber(String targetBuildNumber) { + this.targetBuildNumber = targetBuildNumber; + return this; + } + + /** + * Get the componentName property: Name of component to be upgraded. + * + * @return the componentName value. + */ + public String componentName() { + return this.componentName; + } + + /** + * Set the componentName property: Name of component to be upgraded. + * + * @param componentName the componentName value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withComponentName(String componentName) { + this.componentName = componentName; + return this; + } + + /** + * Get the severity property: Severity of this upgrade. + * + * @return the severity value. + */ + public Severity severity() { + return this.severity; + } + + /** + * Set the severity property: Severity of this upgrade. + * + * @param severity the severity value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withSeverity(Severity severity) { + this.severity = severity; + return this; + } + + /** + * Get the extendedProperties property: Extended properties of current available upgrade version. + * + * @return the extendedProperties value. + */ + public String extendedProperties() { + return this.extendedProperties; + } + + /** + * Set the extendedProperties property: Extended properties of current available upgrade version. + * + * @param extendedProperties the extendedProperties value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withExtendedProperties(String extendedProperties) { + this.extendedProperties = extendedProperties; + return this; + } + + /** + * Get the createdTime property: Created time of current available upgrade version. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Set the createdTime property: Created time of current available upgrade version. + * + * @param createdTime the createdTime value to set. + * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself. + */ + public ClusterAvailableUpgradeHotfixUpgradeProperties withCreatedTime(OffsetDateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeList.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeList.java new file mode 100644 index 0000000000000..08d4f84b48da0 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeList.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Collection of cluster available upgrade. + */ +@Fluent +public final class ClusterAvailableUpgradeList { + /* + * Collection of Cluster available upgrade. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The URL of next result page. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ClusterAvailableUpgradeList class. + */ + public ClusterAvailableUpgradeList() { + } + + /** + * Get the value property: Collection of Cluster available upgrade. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of Cluster available upgrade. + * + * @param value the value value to set. + * @return the ClusterAvailableUpgradeList object itself. + */ + public ClusterAvailableUpgradeList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL of next result page. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL of next result page. + * + * @param nextLink the nextLink value to set. + * @return the ClusterAvailableUpgradeList object itself. + */ + public ClusterAvailableUpgradeList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ClusterAvailableUpgradeList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterAvailableUpgradeList.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeProperties.java new file mode 100644 index 0000000000000..d126e7b8e73e6 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Cluster available upgrade properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "upgradeType", + defaultImpl = ClusterAvailableUpgradeProperties.class) +@JsonTypeName("ClusterAvailableUpgradeProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AKSPatchUpgrade", value = ClusterAvailableUpgradeAksPatchUpgradeProperties.class), + @JsonSubTypes.Type(name = "HotfixUpgrade", value = ClusterAvailableUpgradeHotfixUpgradeProperties.class) }) +@Immutable +public class ClusterAvailableUpgradeProperties { + /** + * Creates an instance of ClusterAvailableUpgradeProperties class. + */ + public ClusterAvailableUpgradeProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeType.java new file mode 100644 index 0000000000000..cbaa69f834482 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of upgrade. + */ +public final class ClusterAvailableUpgradeType extends ExpandableStringEnum { + /** + * Static value AKSPatchUpgrade for ClusterAvailableUpgradeType. + */ + public static final ClusterAvailableUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); + + /** + * Static value HotfixUpgrade for ClusterAvailableUpgradeType. + */ + public static final ClusterAvailableUpgradeType HOTFIX_UPGRADE = fromString("HotfixUpgrade"); + + /** + * Creates a new instance of ClusterAvailableUpgradeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterAvailableUpgradeType() { + } + + /** + * Creates or finds a ClusterAvailableUpgradeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterAvailableUpgradeType. + */ + @JsonCreator + public static ClusterAvailableUpgradeType fromString(String name) { + return fromString(name, ClusterAvailableUpgradeType.class); + } + + /** + * Gets known ClusterAvailableUpgradeType values. + * + * @return known ClusterAvailableUpgradeType values. + */ + public static Collection values() { + return values(ClusterAvailableUpgradeType.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrades.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrades.java new file mode 100644 index 0000000000000..379592192fdc2 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgrades.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ClusterAvailableUpgrades. + */ +public interface ClusterAvailableUpgrades { + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName); + + /** + * List a cluster available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster available upgrade as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, + Context context); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterComponentsItem.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterComponentsItem.java index bd4b135bf3f3f..6bd732fb1ba76 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterComponentsItem.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterComponentsItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The ClusterComponentsItem model. */ +/** + * The ClusterComponentsItem model. + */ @Fluent public final class ClusterComponentsItem { /* @@ -22,13 +24,15 @@ public final class ClusterComponentsItem { @JsonProperty(value = "version") private String version; - /** Creates an instance of ClusterComponentsItem class. */ + /** + * Creates an instance of ClusterComponentsItem class. + */ public ClusterComponentsItem() { } /** * Get the name property: The name property. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: The name property. - * + * * @param name the name value to set. * @return the ClusterComponentsItem object itself. */ @@ -48,7 +52,7 @@ public ClusterComponentsItem withName(String name) { /** * Get the version property: The version property. - * + * * @return the version value. */ public String version() { @@ -57,7 +61,7 @@ public String version() { /** * Set the version property: The version property. - * + * * @param version the version value to set. * @return the ClusterComponentsItem object itself. */ @@ -68,7 +72,7 @@ public ClusterComponentsItem withVersion(String version) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterConfigFile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterConfigFile.java index 8535ca13a86d8..d0d6004a72700 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterConfigFile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterConfigFile.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Cluster configuration files. */ +/** + * Cluster configuration files. + */ @Fluent public final class ClusterConfigFile { /* @@ -46,13 +48,15 @@ public final class ClusterConfigFile { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map values; - /** Creates an instance of ClusterConfigFile class. */ + /** + * Creates an instance of ClusterConfigFile class. + */ public ClusterConfigFile() { } /** * Get the fileName property: Configuration file name. - * + * * @return the fileName value. */ public String fileName() { @@ -61,7 +65,7 @@ public String fileName() { /** * Set the fileName property: Configuration file name. - * + * * @param fileName the fileName value to set. * @return the ClusterConfigFile object itself. */ @@ -72,7 +76,7 @@ public ClusterConfigFile withFileName(String fileName) { /** * Get the content property: Free form content of the entire configuration file. - * + * * @return the content value. */ public String content() { @@ -81,7 +85,7 @@ public String content() { /** * Set the content property: Free form content of the entire configuration file. - * + * * @param content the content value to set. * @return the ClusterConfigFile object itself. */ @@ -93,7 +97,7 @@ public ClusterConfigFile withContent(String content) { /** * Get the encoding property: This property indicates if the content is encoded and is case-insensitive. Please set * the value to base64 if the content is base64 encoded. Set it to none or skip it if the content is plain text. - * + * * @return the encoding value. */ public ContentEncoding encoding() { @@ -103,7 +107,7 @@ public ContentEncoding encoding() { /** * Set the encoding property: This property indicates if the content is encoded and is case-insensitive. Please set * the value to base64 if the content is base64 encoded. Set it to none or skip it if the content is plain text. - * + * * @param encoding the encoding value to set. * @return the ClusterConfigFile object itself. */ @@ -114,7 +118,7 @@ public ClusterConfigFile withEncoding(ContentEncoding encoding) { /** * Get the path property: Path of the config file if content is specified. - * + * * @return the path value. */ public String path() { @@ -123,7 +127,7 @@ public String path() { /** * Set the path property: Path of the config file if content is specified. - * + * * @param path the path value to set. * @return the ClusterConfigFile object itself. */ @@ -133,9 +137,9 @@ public ClusterConfigFile withPath(String path) { } /** - * Get the values property: List of key value pairs where key represents a valid service configuration name and - * value represents the value of the config. - * + * Get the values property: List of key value pairs + * where key represents a valid service configuration name and value represents the value of the config. + * * @return the values value. */ public Map values() { @@ -143,9 +147,9 @@ public Map values() { } /** - * Set the values property: List of key value pairs where key represents a valid service configuration name and - * value represents the value of the config. - * + * Set the values property: List of key value pairs + * where key represents a valid service configuration name and value represents the value of the config. + * * @param values the values value to set. * @return the ClusterConfigFile object itself. */ @@ -156,14 +160,13 @@ public ClusterConfigFile withValues(Map values) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (fileName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property fileName in model ClusterConfigFile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property fileName in model ClusterConfigFile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java new file mode 100644 index 0000000000000..6dcf376e63ffb --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of upgrading cluster's hotfix. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("HotfixUpgrade") +@Fluent +public final class ClusterHotfixUpgradeProperties extends ClusterUpgradeProperties { + /* + * Target OSS version of component to be upgraded. + */ + @JsonProperty(value = "targetOssVersion") + private String targetOssVersion; + + /* + * Target cluster version of component to be upgraded. + */ + @JsonProperty(value = "targetClusterVersion") + private String targetClusterVersion; + + /* + * Target build number of component to be upgraded. + */ + @JsonProperty(value = "targetBuildNumber") + private String targetBuildNumber; + + /* + * Name of component to be upgraded. + */ + @JsonProperty(value = "componentName") + private String componentName; + + /** + * Creates an instance of ClusterHotfixUpgradeProperties class. + */ + public ClusterHotfixUpgradeProperties() { + } + + /** + * Get the targetOssVersion property: Target OSS version of component to be upgraded. + * + * @return the targetOssVersion value. + */ + public String targetOssVersion() { + return this.targetOssVersion; + } + + /** + * Set the targetOssVersion property: Target OSS version of component to be upgraded. + * + * @param targetOssVersion the targetOssVersion value to set. + * @return the ClusterHotfixUpgradeProperties object itself. + */ + public ClusterHotfixUpgradeProperties withTargetOssVersion(String targetOssVersion) { + this.targetOssVersion = targetOssVersion; + return this; + } + + /** + * Get the targetClusterVersion property: Target cluster version of component to be upgraded. + * + * @return the targetClusterVersion value. + */ + public String targetClusterVersion() { + return this.targetClusterVersion; + } + + /** + * Set the targetClusterVersion property: Target cluster version of component to be upgraded. + * + * @param targetClusterVersion the targetClusterVersion value to set. + * @return the ClusterHotfixUpgradeProperties object itself. + */ + public ClusterHotfixUpgradeProperties withTargetClusterVersion(String targetClusterVersion) { + this.targetClusterVersion = targetClusterVersion; + return this; + } + + /** + * Get the targetBuildNumber property: Target build number of component to be upgraded. + * + * @return the targetBuildNumber value. + */ + public String targetBuildNumber() { + return this.targetBuildNumber; + } + + /** + * Set the targetBuildNumber property: Target build number of component to be upgraded. + * + * @param targetBuildNumber the targetBuildNumber value to set. + * @return the ClusterHotfixUpgradeProperties object itself. + */ + public ClusterHotfixUpgradeProperties withTargetBuildNumber(String targetBuildNumber) { + this.targetBuildNumber = targetBuildNumber; + return this; + } + + /** + * Get the componentName property: Name of component to be upgraded. + * + * @return the componentName value. + */ + public String componentName() { + return this.componentName; + } + + /** + * Set the componentName property: Name of component to be upgraded. + * + * @param componentName the componentName value to set. + * @return the ClusterHotfixUpgradeProperties object itself. + */ + public ClusterHotfixUpgradeProperties withComponentName(String componentName) { + this.componentName = componentName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewProperties.java index dc960bed783a7..1186c891edbd7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster Instance View Properties. */ +/** + * Cluster Instance View Properties. + */ @Fluent public class ClusterInstanceViewProperties { /* @@ -19,18 +21,20 @@ public class ClusterInstanceViewProperties { private ClusterInstanceViewPropertiesStatus status; /* - * List of statuses of relevant services that make up the HDInsight on aks cluster to surface to the customer. + * List of statuses of relevant services that make up the HDInsight on AKS cluster to surface to the customer. */ @JsonProperty(value = "serviceStatuses", required = true) private List serviceStatuses; - /** Creates an instance of ClusterInstanceViewProperties class. */ + /** + * Creates an instance of ClusterInstanceViewProperties class. + */ public ClusterInstanceViewProperties() { } /** * Get the status property: Status of the instance view. - * + * * @return the status value. */ public ClusterInstanceViewPropertiesStatus status() { @@ -39,7 +43,7 @@ public ClusterInstanceViewPropertiesStatus status() { /** * Set the status property: Status of the instance view. - * + * * @param status the status value to set. * @return the ClusterInstanceViewProperties object itself. */ @@ -49,9 +53,9 @@ public ClusterInstanceViewProperties withStatus(ClusterInstanceViewPropertiesSta } /** - * Get the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on aks cluster - * to surface to the customer. - * + * Get the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on AKS + * cluster to surface to the customer. + * * @return the serviceStatuses value. */ public List serviceStatuses() { @@ -59,9 +63,9 @@ public List serviceStatuses() { } /** - * Set the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on aks cluster - * to surface to the customer. - * + * Set the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on AKS + * cluster to surface to the customer. + * * @param serviceStatuses the serviceStatuses value to set. * @return the ClusterInstanceViewProperties object itself. */ @@ -72,23 +76,19 @@ public ClusterInstanceViewProperties withServiceStatuses(List ser /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (status() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property status in model ClusterInstanceViewProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property status in model ClusterInstanceViewProperties")); } else { status().validate(); } if (serviceStatuses() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serviceStatuses in model ClusterInstanceViewProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property serviceStatuses in model ClusterInstanceViewProperties")); } else { serviceStatuses().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java index f70b1b3e1f629..d428f22dde121 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java @@ -6,28 +6,38 @@ import com.azure.core.annotation.Fluent; -/** Status of the instance view. */ +/** + * Status of the instance view. + */ @Fluent public final class ClusterInstanceViewPropertiesStatus extends ClusterInstanceViewStatus { - /** Creates an instance of ClusterInstanceViewPropertiesStatus class. */ + /** + * Creates an instance of ClusterInstanceViewPropertiesStatus class. + */ public ClusterInstanceViewPropertiesStatus() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInstanceViewPropertiesStatus withReady(String ready) { super.withReady(ready); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInstanceViewPropertiesStatus withReason(String reason) { super.withReason(reason); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterInstanceViewPropertiesStatus withMessage(String message) { super.withMessage(message); @@ -36,7 +46,7 @@ public ClusterInstanceViewPropertiesStatus withMessage(String message) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResult.java index 744cf6880f1af..820fbc82c354a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResult.java @@ -7,26 +7,28 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; import java.util.List; -/** An immutable client-side representation of ClusterInstanceViewResult. */ +/** + * An immutable client-side representation of ClusterInstanceViewResult. + */ public interface ClusterInstanceViewResult { /** * Gets the name property: Name of the instance view. - * + * * @return the name value. */ String name(); /** * Gets the status property: Status of the instance view. - * + * * @return the status value. */ ClusterInstanceViewPropertiesStatus status(); /** - * Gets the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on aks + * Gets the serviceStatuses property: List of statuses of relevant services that make up the HDInsight on AKS * cluster to surface to the customer. - * + * * @return the serviceStatuses value. */ List serviceStatuses(); @@ -34,7 +36,7 @@ public interface ClusterInstanceViewResult { /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner * object. - * + * * @return the inner object. */ ClusterInstanceViewResultInner innerModel(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewStatus.java index db6fde18caef6..84b84efd45a58 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewStatus.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewStatus.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Status of the instance view. */ +/** + * Status of the instance view. + */ @Fluent public class ClusterInstanceViewStatus { /* @@ -29,13 +31,15 @@ public class ClusterInstanceViewStatus { @JsonProperty(value = "message") private String message; - /** Creates an instance of ClusterInstanceViewStatus class. */ + /** + * Creates an instance of ClusterInstanceViewStatus class. + */ public ClusterInstanceViewStatus() { } /** * Get the ready property: The cluster ready status. - * + * * @return the ready value. */ public String ready() { @@ -44,7 +48,7 @@ public String ready() { /** * Set the ready property: The cluster ready status. - * + * * @param ready the ready value to set. * @return the ClusterInstanceViewStatus object itself. */ @@ -55,7 +59,7 @@ public ClusterInstanceViewStatus withReady(String ready) { /** * Get the reason property: The status reason. - * + * * @return the reason value. */ public String reason() { @@ -64,7 +68,7 @@ public String reason() { /** * Set the reason property: The status reason. - * + * * @param reason the reason value to set. * @return the ClusterInstanceViewStatus object itself. */ @@ -75,7 +79,7 @@ public ClusterInstanceViewStatus withReason(String reason) { /** * Get the message property: The additional message. - * + * * @return the message value. */ public String message() { @@ -84,7 +88,7 @@ public String message() { /** * Set the message property: The additional message. - * + * * @param message the message value to set. * @return the ClusterInstanceViewStatus object itself. */ @@ -95,14 +99,13 @@ public ClusterInstanceViewStatus withMessage(String message) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (ready() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property ready in model ClusterInstanceViewStatus")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ready in model ClusterInstanceViewStatus")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewsResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewsResult.java index cde37c3bf4c27..02f0bd9d0a29e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewsResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewsResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The instance view of a HDInsight Cluster. */ +/** + * The instance view of a HDInsight Cluster. + */ @Fluent public final class ClusterInstanceViewsResult { /* @@ -24,13 +26,15 @@ public final class ClusterInstanceViewsResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ClusterInstanceViewsResult class. */ + /** + * Creates an instance of ClusterInstanceViewsResult class. + */ public ClusterInstanceViewsResult() { } /** * Get the value property: Cluster instance view array. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Cluster instance view array. - * + * * @param value the value value to set. * @return the ClusterInstanceViewsResult object itself. */ @@ -50,7 +54,7 @@ public ClusterInstanceViewsResult withValue(List /** * Get the nextLink property: The link (url) to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJob.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJob.java index 56c77fcce1aaa..7e26bb29a78a7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJob.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJob.java @@ -7,46 +7,48 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -/** An immutable client-side representation of ClusterJob. */ +/** + * An immutable client-side representation of ClusterJob. + */ public interface ClusterJob { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Properties of cluster job. - * + * * @return the properties value. */ ClusterJobProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner object. - * + * * @return the inner object. */ ClusterJobInner innerModel(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobList.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobList.java index 749e89851cc03..92e54a186eb69 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobList.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobList.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of cluster job. */ +/** + * Collection of cluster job. + */ @Fluent public final class ClusterJobList { /* @@ -25,13 +27,15 @@ public final class ClusterJobList { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of ClusterJobList class. */ + /** + * Creates an instance of ClusterJobList class. + */ public ClusterJobList() { } /** * Get the value property: Collection of cluster job. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of cluster job. - * + * * @param value the value value to set. * @return the ClusterJobList object itself. */ @@ -51,7 +55,7 @@ public ClusterJobList withValue(List value) { /** * Get the nextLink property: The Url of next result page. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,7 +64,7 @@ public String nextLink() { /** * Set the nextLink property: The Url of next result page. - * + * * @param nextLink the nextLink value to set. * @return the ClusterJobList object itself. */ @@ -71,14 +75,13 @@ public ClusterJobList withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ClusterJobList")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ClusterJobList")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobProperties.java index 889c156f1f560..b61a2f37a0227 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobProperties.java @@ -9,23 +9,27 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** Properties of cluster job. */ +/** + * Properties of cluster job. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType", defaultImpl = ClusterJobProperties.class) @JsonTypeName("ClusterJobProperties") -@JsonSubTypes({@JsonSubTypes.Type(name = "FlinkJob", value = FlinkJobProperties.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "FlinkJob", value = FlinkJobProperties.class) }) @Immutable public class ClusterJobProperties { - /** Creates an instance of ClusterJobProperties class. */ + /** + * Creates an instance of ClusterJobProperties class. + */ public ClusterJobProperties() { } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobs.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobs.java index 2687079cc9a76..a14d7f5e2410f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobs.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterJobs.java @@ -8,11 +8,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -/** Resource collection API of ClusterJobs. */ +/** + * Resource collection API of ClusterJobs. + */ public interface ClusterJobs { /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -26,7 +28,7 @@ public interface ClusterJobs { /** * Operations on jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -37,16 +39,12 @@ public interface ClusterJobs { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cluster job. */ - ClusterJob runJob( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterJobInner clusterJob, + ClusterJob runJob(String resourceGroupName, String clusterPoolName, String clusterName, ClusterJobInner clusterJob, Context context); /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -59,16 +57,18 @@ ClusterJob runJob( /** * Get jobs of HDInsight on AKS cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. + * @param filter The system query option to filter job returned in the response. Allowed value is 'jobName eq + * {jobName}' or 'jarName eq {jarName}'. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return jobs of HDInsight on AKS cluster as paginated response with {@link PagedIterable}. */ - PagedIterable list( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName, String filter, + Context context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterListResult.java index bdfb7527ce835..39115fdaa01aa 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The list cluster operation response. */ +/** + * The list cluster operation response. + */ @Fluent public final class ClusterListResult { /* @@ -24,13 +26,15 @@ public final class ClusterListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ClusterListResult class. */ + /** + * Creates an instance of ClusterListResult class. + */ public ClusterListResult() { } /** * Get the value property: The list of clusters. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The list of clusters. - * + * * @param value the value value to set. * @return the ClusterListResult object itself. */ @@ -50,7 +54,7 @@ public ClusterListResult withValue(List value) { /** * Get the nextLink property: The link (url) to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsApplicationLogs.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsApplicationLogs.java index 276f76eabbb83..ca445dab915c3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsApplicationLogs.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsApplicationLogs.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Collection of logs to be enabled or disabled for log analytics. */ +/** + * Collection of logs to be enabled or disabled for log analytics. + */ @Fluent public final class ClusterLogAnalyticsApplicationLogs { /* @@ -22,13 +24,15 @@ public final class ClusterLogAnalyticsApplicationLogs { @JsonProperty(value = "stdErrorEnabled") private Boolean stdErrorEnabled; - /** Creates an instance of ClusterLogAnalyticsApplicationLogs class. */ + /** + * Creates an instance of ClusterLogAnalyticsApplicationLogs class. + */ public ClusterLogAnalyticsApplicationLogs() { } /** * Get the stdOutEnabled property: True if stdout is enabled, otherwise false. - * + * * @return the stdOutEnabled value. */ public Boolean stdOutEnabled() { @@ -37,7 +41,7 @@ public Boolean stdOutEnabled() { /** * Set the stdOutEnabled property: True if stdout is enabled, otherwise false. - * + * * @param stdOutEnabled the stdOutEnabled value to set. * @return the ClusterLogAnalyticsApplicationLogs object itself. */ @@ -48,7 +52,7 @@ public ClusterLogAnalyticsApplicationLogs withStdOutEnabled(Boolean stdOutEnable /** * Get the stdErrorEnabled property: True if stderror is enabled, otherwise false. - * + * * @return the stdErrorEnabled value. */ public Boolean stdErrorEnabled() { @@ -57,7 +61,7 @@ public Boolean stdErrorEnabled() { /** * Set the stdErrorEnabled property: True if stderror is enabled, otherwise false. - * + * * @param stdErrorEnabled the stdErrorEnabled value to set. * @return the ClusterLogAnalyticsApplicationLogs object itself. */ @@ -68,7 +72,7 @@ public ClusterLogAnalyticsApplicationLogs withStdErrorEnabled(Boolean stdErrorEn /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsProfile.java index 8e87ac38e784a..5f5bf60f32fef 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLogAnalyticsProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster log analytics profile to enable or disable OMS agent for cluster. */ +/** + * Cluster log analytics profile to enable or disable OMS agent for cluster. + */ @Fluent public final class ClusterLogAnalyticsProfile { /* @@ -28,13 +30,15 @@ public final class ClusterLogAnalyticsProfile { @JsonProperty(value = "metricsEnabled") private Boolean metricsEnabled; - /** Creates an instance of ClusterLogAnalyticsProfile class. */ + /** + * Creates an instance of ClusterLogAnalyticsProfile class. + */ public ClusterLogAnalyticsProfile() { } /** * Get the enabled property: True if log analytics is enabled for the cluster, otherwise false. - * + * * @return the enabled value. */ public boolean enabled() { @@ -43,7 +47,7 @@ public boolean enabled() { /** * Set the enabled property: True if log analytics is enabled for the cluster, otherwise false. - * + * * @param enabled the enabled value to set. * @return the ClusterLogAnalyticsProfile object itself. */ @@ -54,7 +58,7 @@ public ClusterLogAnalyticsProfile withEnabled(boolean enabled) { /** * Get the applicationLogs property: Collection of logs to be enabled or disabled for log analytics. - * + * * @return the applicationLogs value. */ public ClusterLogAnalyticsApplicationLogs applicationLogs() { @@ -63,7 +67,7 @@ public ClusterLogAnalyticsApplicationLogs applicationLogs() { /** * Set the applicationLogs property: Collection of logs to be enabled or disabled for log analytics. - * + * * @param applicationLogs the applicationLogs value to set. * @return the ClusterLogAnalyticsProfile object itself. */ @@ -74,7 +78,7 @@ public ClusterLogAnalyticsProfile withApplicationLogs(ClusterLogAnalyticsApplica /** * Get the metricsEnabled property: True if metrics are enabled, otherwise false. - * + * * @return the metricsEnabled value. */ public Boolean metricsEnabled() { @@ -83,7 +87,7 @@ public Boolean metricsEnabled() { /** * Set the metricsEnabled property: True if metrics are enabled, otherwise false. - * + * * @param metricsEnabled the metricsEnabled value to set. * @return the ClusterLogAnalyticsProfile object itself. */ @@ -94,7 +98,7 @@ public ClusterLogAnalyticsProfile withMetricsEnabled(Boolean metricsEnabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatch.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatch.java index 9574912dba28a..6bfec0e51b0de 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatch.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatch.java @@ -5,15 +5,16 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPatchProperties; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The patch for a cluster. */ +/** + * The patch for a cluster. + */ @Fluent -public final class ClusterPatch extends Resource { +public final class ClusterPatch { /* * Define cluster patch specific properties. */ @@ -21,18 +22,21 @@ public final class ClusterPatch extends Resource { private ClusterPatchProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Resource tags. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; - /** Creates an instance of ClusterPatch class. */ + /** + * Creates an instance of ClusterPatch class. + */ public ClusterPatch() { } /** * Get the innerProperties property: Define cluster patch specific properties. - * + * * @return the innerProperties value. */ private ClusterPatchProperties innerProperties() { @@ -40,31 +44,28 @@ private ClusterPatchProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + * Get the tags property: Resource tags. + * + * @return the tags value. */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ClusterPatch withLocation(String location) { - super.withLocation(location); - return this; + public Map tags() { + return this.tags; } - /** {@inheritDoc} */ - @Override + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the ClusterPatch object itself. + */ public ClusterPatch withTags(Map tags) { - super.withTags(tags); + this.tags = tags; return this; } /** * Get the clusterProfile property: Cluster resource patch properties. - * + * * @return the clusterProfile value. */ public UpdatableClusterProfile clusterProfile() { @@ -73,7 +74,7 @@ public UpdatableClusterProfile clusterProfile() { /** * Set the clusterProfile property: Cluster resource patch properties. - * + * * @param clusterProfile the clusterProfile value to set. * @return the ClusterPatch object itself. */ @@ -87,7 +88,7 @@ public ClusterPatch withClusterProfile(UpdatableClusterProfile clusterProfile) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPool.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPool.java index fe95a6920cfb5..1684ac286a5bf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPool.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPool.java @@ -10,60 +10,62 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; import java.util.Map; -/** An immutable client-side representation of ClusterPool. */ +/** + * An immutable client-side representation of ClusterPool. + */ public interface ClusterPool { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the resource. - * + * * @return the provisioningState value. */ ProvisioningStatus provisioningState(); /** * Gets the deploymentId property: A unique id generated by the RP to identify the resource. - * + * * @return the deploymentId value. */ String deploymentId(); @@ -73,7 +75,7 @@ public interface ClusterPool { * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name * restriction. - * + * * @return the managedResourceGroupName value. */ String managedResourceGroupName(); @@ -82,100 +84,105 @@ public interface ClusterPool { * Gets the aksManagedResourceGroupName property: A resource group created by AKS, to hold the infrastructure * resources created by AKS on-behalf of customers. It is generated by cluster pool name and managed resource group * name by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}. - * + * * @return the aksManagedResourceGroupName value. */ String aksManagedResourceGroupName(); /** * Gets the clusterPoolProfile property: CLuster pool profile. - * + * * @return the clusterPoolProfile value. */ ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile(); /** * Gets the computeProfile property: CLuster pool compute profile. - * + * * @return the computeProfile value. */ ClusterPoolResourcePropertiesComputeProfile computeProfile(); /** * Gets the aksClusterProfile property: Properties of underlying AKS cluster. - * + * * @return the aksClusterProfile value. */ ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile(); /** * Gets the networkProfile property: Cluster pool network profile. - * + * * @return the networkProfile value. */ ClusterPoolResourcePropertiesNetworkProfile networkProfile(); /** * Gets the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for AKS cluster. - * + * * @return the logAnalyticsProfile value. */ ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile(); /** * Gets the status property: Business status of the resource. - * + * * @return the status value. */ String status(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner object. - * + * * @return the inner object. */ ClusterPoolInner innerModel(); - /** The entirety of the ClusterPool definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the ClusterPool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The ClusterPool definition stages. */ + /** + * The ClusterPool definition stages. + */ interface DefinitionStages { - /** The first stage of the ClusterPool definition. */ + /** + * The first stage of the ClusterPool definition. + */ interface Blank extends WithLocation { } - /** The stage of the ClusterPool definition allowing to specify location. */ + /** + * The stage of the ClusterPool definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -183,18 +190,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ClusterPool definition allowing to specify parent resource. */ + /** + * The stage of the ClusterPool definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -205,96 +214,104 @@ interface WithResourceGroup { * The stage of the ClusterPool definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithManagedResourceGroupName, - DefinitionStages.WithClusterPoolProfile, - DefinitionStages.WithComputeProfile, - DefinitionStages.WithNetworkProfile, - DefinitionStages.WithLogAnalyticsProfile { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithManagedResourceGroupName, + DefinitionStages.WithClusterPoolProfile, DefinitionStages.WithComputeProfile, + DefinitionStages.WithNetworkProfile, DefinitionStages.WithLogAnalyticsProfile { /** * Executes the create request. - * + * * @return the created resource. */ ClusterPool create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ClusterPool create(Context context); } - /** The stage of the ClusterPool definition allowing to specify tags. */ + /** + * The stage of the ClusterPool definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ClusterPool definition allowing to specify managedResourceGroupName. */ + /** + * The stage of the ClusterPool definition allowing to specify managedResourceGroupName. + */ interface WithManagedResourceGroupName { /** * Specifies the managedResourceGroupName property: A resource group created by RP, to hold the resources * created by RP on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by * pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource * group name restriction.. - * + * * @param managedResourceGroupName A resource group created by RP, to hold the resources created by RP - * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: - * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group - * name restriction. + * on-behalf of customers. It will also be used to generate aksManagedResourceGroupName by pattern: + * MC_{managedResourceGroupName}_{clusterPoolName}_{region}. Please make sure it meets resource group name + * restriction. * @return the next definition stage. */ WithCreate withManagedResourceGroupName(String managedResourceGroupName); } - /** The stage of the ClusterPool definition allowing to specify clusterPoolProfile. */ + /** + * The stage of the ClusterPool definition allowing to specify clusterPoolProfile. + */ interface WithClusterPoolProfile { /** * Specifies the clusterPoolProfile property: CLuster pool profile.. - * + * * @param clusterPoolProfile CLuster pool profile. * @return the next definition stage. */ WithCreate withClusterPoolProfile(ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile); } - /** The stage of the ClusterPool definition allowing to specify computeProfile. */ + /** + * The stage of the ClusterPool definition allowing to specify computeProfile. + */ interface WithComputeProfile { /** * Specifies the computeProfile property: CLuster pool compute profile.. - * + * * @param computeProfile CLuster pool compute profile. * @return the next definition stage. */ WithCreate withComputeProfile(ClusterPoolResourcePropertiesComputeProfile computeProfile); } - /** The stage of the ClusterPool definition allowing to specify networkProfile. */ + /** + * The stage of the ClusterPool definition allowing to specify networkProfile. + */ interface WithNetworkProfile { /** * Specifies the networkProfile property: Cluster pool network profile.. - * + * * @param networkProfile Cluster pool network profile. * @return the next definition stage. */ WithCreate withNetworkProfile(ClusterPoolResourcePropertiesNetworkProfile networkProfile); } - /** The stage of the ClusterPool definition allowing to specify logAnalyticsProfile. */ + /** + * The stage of the ClusterPool definition allowing to specify logAnalyticsProfile. + */ interface WithLogAnalyticsProfile { /** * Specifies the logAnalyticsProfile property: Cluster pool log analytics profile to enable OMS agent for * AKS cluster.. - * + * * @param logAnalyticsProfile Cluster pool log analytics profile to enable OMS agent for AKS cluster. * @return the next definition stage. */ @@ -304,36 +321,42 @@ interface WithLogAnalyticsProfile { /** * Begins update for the ClusterPool resource. - * + * * @return the stage of resource update. */ ClusterPool.Update update(); - /** The template for ClusterPool update. */ + /** + * The template for ClusterPool update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ ClusterPool apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ClusterPool apply(Context context); } - /** The ClusterPool update stages. */ + /** + * The ClusterPool update stages. + */ interface UpdateStages { - /** The stage of the ClusterPool update allowing to specify tags. */ + /** + * The stage of the ClusterPool update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -343,16 +366,39 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ClusterPool refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ ClusterPool refresh(Context context); + + /** + * Upgrade a cluster pool. + * + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest); + + /** + * Upgrade a cluster pool. + * + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java new file mode 100644 index 0000000000000..edf972fbd1dc8 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of upgrading cluster pool's AKS patch version. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("AKSPatchUpgrade") +@Fluent +public final class ClusterPoolAksPatchVersionUpgradeProperties extends ClusterPoolUpgradeProperties { + /* + * whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes should be false. + */ + @JsonProperty(value = "upgradeClusterPool") + private Boolean upgradeClusterPool; + + /* + * whether upgrade all clusters' nodes. If it's true, upgradeClusterPool should be false. + */ + @JsonProperty(value = "upgradeAllClusterNodes") + private Boolean upgradeAllClusterNodes; + + /* + * Target AKS version. When it's not set, latest version will be used. When upgradeClusterPool is true and + * upgradeAllClusterNodes is false, target version should be greater or equal to current version. When + * upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be equal to AKS version of + * cluster pool. + */ + @JsonProperty(value = "targetAksVersion") + private String targetAksVersion; + + /** + * Creates an instance of ClusterPoolAksPatchVersionUpgradeProperties class. + */ + public ClusterPoolAksPatchVersionUpgradeProperties() { + } + + /** + * Get the upgradeClusterPool property: whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes + * should be false. + * + * @return the upgradeClusterPool value. + */ + public Boolean upgradeClusterPool() { + return this.upgradeClusterPool; + } + + /** + * Set the upgradeClusterPool property: whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes + * should be false. + * + * @param upgradeClusterPool the upgradeClusterPool value to set. + * @return the ClusterPoolAksPatchVersionUpgradeProperties object itself. + */ + public ClusterPoolAksPatchVersionUpgradeProperties withUpgradeClusterPool(Boolean upgradeClusterPool) { + this.upgradeClusterPool = upgradeClusterPool; + return this; + } + + /** + * Get the upgradeAllClusterNodes property: whether upgrade all clusters' nodes. If it's true, upgradeClusterPool + * should be false. + * + * @return the upgradeAllClusterNodes value. + */ + public Boolean upgradeAllClusterNodes() { + return this.upgradeAllClusterNodes; + } + + /** + * Set the upgradeAllClusterNodes property: whether upgrade all clusters' nodes. If it's true, upgradeClusterPool + * should be false. + * + * @param upgradeAllClusterNodes the upgradeAllClusterNodes value to set. + * @return the ClusterPoolAksPatchVersionUpgradeProperties object itself. + */ + public ClusterPoolAksPatchVersionUpgradeProperties withUpgradeAllClusterNodes(Boolean upgradeAllClusterNodes) { + this.upgradeAllClusterNodes = upgradeAllClusterNodes; + return this; + } + + /** + * Get the targetAksVersion property: Target AKS version. When it's not set, latest version will be used. When + * upgradeClusterPool is true and upgradeAllClusterNodes is false, target version should be greater or equal to + * current version. When upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be + * equal to AKS version of cluster pool. + * + * @return the targetAksVersion value. + */ + public String targetAksVersion() { + return this.targetAksVersion; + } + + /** + * Set the targetAksVersion property: Target AKS version. When it's not set, latest version will be used. When + * upgradeClusterPool is true and upgradeAllClusterNodes is false, target version should be greater or equal to + * current version. When upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be + * equal to AKS version of cluster pool. + * + * @param targetAksVersion the targetAksVersion value to set. + * @return the ClusterPoolAksPatchVersionUpgradeProperties object itself. + */ + public ClusterPoolAksPatchVersionUpgradeProperties withTargetAksVersion(String targetAksVersion) { + this.targetAksVersion = targetAksVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrade.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrade.java new file mode 100644 index 0000000000000..6599abb84a253 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrade.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; + +/** + * An immutable client-side representation of ClusterPoolAvailableUpgrade. + */ +public interface ClusterPoolAvailableUpgrade { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Gets or sets the properties. Define cluster pool upgrade specific properties. + * + * @return the properties value. + */ + ClusterPoolAvailableUpgradeProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner + * object. + * + * @return the inner object. + */ + ClusterPoolAvailableUpgradeInner innerModel(); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java new file mode 100644 index 0000000000000..71402a73564bd --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Cluster pool available AKS patch version upgrade. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("AKSPatchUpgrade") +@Fluent +public final class ClusterPoolAvailableUpgradeAksPatchUpgradeProperties extends ClusterPoolAvailableUpgradeProperties { + /* + * Current AKS version. + */ + @JsonProperty(value = "currentVersion") + private String currentVersion; + + /* + * Current AKS version's status: whether it is deprecated or supported + */ + @JsonProperty(value = "currentVersionStatus") + private CurrentClusterPoolAksVersionStatus currentVersionStatus; + + /* + * Latest AKS patch version. + */ + @JsonProperty(value = "latestVersion") + private String latestVersion; + + /** + * Creates an instance of ClusterPoolAvailableUpgradeAksPatchUpgradeProperties class. + */ + public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties() { + } + + /** + * Get the currentVersion property: Current AKS version. + * + * @return the currentVersion value. + */ + public String currentVersion() { + return this.currentVersion; + } + + /** + * Set the currentVersion property: Current AKS version. + * + * @param currentVersion the currentVersion value to set. + * @return the ClusterPoolAvailableUpgradeAksPatchUpgradeProperties object itself. + */ + public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties withCurrentVersion(String currentVersion) { + this.currentVersion = currentVersion; + return this; + } + + /** + * Get the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. + * + * @return the currentVersionStatus value. + */ + public CurrentClusterPoolAksVersionStatus currentVersionStatus() { + return this.currentVersionStatus; + } + + /** + * Set the currentVersionStatus property: Current AKS version's status: whether it is deprecated or supported. + * + * @param currentVersionStatus the currentVersionStatus value to set. + * @return the ClusterPoolAvailableUpgradeAksPatchUpgradeProperties object itself. + */ + public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties + withCurrentVersionStatus(CurrentClusterPoolAksVersionStatus currentVersionStatus) { + this.currentVersionStatus = currentVersionStatus; + return this; + } + + /** + * Get the latestVersion property: Latest AKS patch version. + * + * @return the latestVersion value. + */ + public String latestVersion() { + return this.latestVersion; + } + + /** + * Set the latestVersion property: Latest AKS patch version. + * + * @param latestVersion the latestVersion value to set. + * @return the ClusterPoolAvailableUpgradeAksPatchUpgradeProperties object itself. + */ + public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(String latestVersion) { + this.latestVersion = latestVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeList.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeList.java new file mode 100644 index 0000000000000..4a09f96e9ce15 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeList.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * collection of cluster pool available upgrade. + */ +@Fluent +public final class ClusterPoolAvailableUpgradeList { + /* + * Collection of cluster pool available upgrade. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The Url of next result page. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ClusterPoolAvailableUpgradeList class. + */ + public ClusterPoolAvailableUpgradeList() { + } + + /** + * Get the value property: Collection of cluster pool available upgrade. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of cluster pool available upgrade. + * + * @param value the value value to set. + * @return the ClusterPoolAvailableUpgradeList object itself. + */ + public ClusterPoolAvailableUpgradeList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The Url of next result page. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The Url of next result page. + * + * @param nextLink the nextLink value to set. + * @return the ClusterPoolAvailableUpgradeList object itself. + */ + public ClusterPoolAvailableUpgradeList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model ClusterPoolAvailableUpgradeList")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolAvailableUpgradeList.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java new file mode 100644 index 0000000000000..c23a7ff298215 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Cluster pool available node OS update. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("NodeOsUpgrade") +@Fluent +public final class ClusterPoolAvailableUpgradeNodeOsUpgradeProperties extends ClusterPoolAvailableUpgradeProperties { + /* + * The latest node OS version. + */ + @JsonProperty(value = "latestVersion") + private String latestVersion; + + /** + * Creates an instance of ClusterPoolAvailableUpgradeNodeOsUpgradeProperties class. + */ + public ClusterPoolAvailableUpgradeNodeOsUpgradeProperties() { + } + + /** + * Get the latestVersion property: The latest node OS version. + * + * @return the latestVersion value. + */ + public String latestVersion() { + return this.latestVersion; + } + + /** + * Set the latestVersion property: The latest node OS version. + * + * @param latestVersion the latestVersion value to set. + * @return the ClusterPoolAvailableUpgradeNodeOsUpgradeProperties object itself. + */ + public ClusterPoolAvailableUpgradeNodeOsUpgradeProperties withLatestVersion(String latestVersion) { + this.latestVersion = latestVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeProperties.java new file mode 100644 index 0000000000000..9489e214d6d31 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Cluster pool available upgrade properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "upgradeType", + defaultImpl = ClusterPoolAvailableUpgradeProperties.class) +@JsonTypeName("ClusterPoolAvailableUpgradeProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AKSPatchUpgrade", value = ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.class), + @JsonSubTypes.Type(name = "NodeOsUpgrade", value = ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.class) }) +@Immutable +public class ClusterPoolAvailableUpgradeProperties { + /** + * Creates an instance of ClusterPoolAvailableUpgradeProperties class. + */ + public ClusterPoolAvailableUpgradeProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeType.java new file mode 100644 index 0000000000000..0f678c547d0f3 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of upgrade. + */ +public final class ClusterPoolAvailableUpgradeType extends ExpandableStringEnum { + /** + * Static value AKSPatchUpgrade for ClusterPoolAvailableUpgradeType. + */ + public static final ClusterPoolAvailableUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); + + /** + * Static value NodeOsUpgrade for ClusterPoolAvailableUpgradeType. + */ + public static final ClusterPoolAvailableUpgradeType NODE_OS_UPGRADE = fromString("NodeOsUpgrade"); + + /** + * Creates a new instance of ClusterPoolAvailableUpgradeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterPoolAvailableUpgradeType() { + } + + /** + * Creates or finds a ClusterPoolAvailableUpgradeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterPoolAvailableUpgradeType. + */ + @JsonCreator + public static ClusterPoolAvailableUpgradeType fromString(String name) { + return fromString(name, ClusterPoolAvailableUpgradeType.class); + } + + /** + * Gets known ClusterPoolAvailableUpgradeType values. + * + * @return known ClusterPoolAvailableUpgradeType values. + */ + public static Collection values() { + return values(ClusterPoolAvailableUpgradeType.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrades.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrades.java new file mode 100644 index 0000000000000..4195f90de1cd0 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgrades.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ClusterPoolAvailableUpgrades. + */ +public interface ClusterPoolAvailableUpgrades { + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterPoolName); + + /** + * List a cluster pool available upgrade. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of cluster pool available upgrade as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String clusterPoolName, Context context); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolComputeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolComputeProfile.java index d37bdd6a088dc..fa5471f694544 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolComputeProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolComputeProfile.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster pool compute profile. */ +/** + * Cluster pool compute profile. + */ @Fluent public class ClusterPoolComputeProfile { /* @@ -23,13 +25,15 @@ public class ClusterPoolComputeProfile { @JsonProperty(value = "count", access = JsonProperty.Access.WRITE_ONLY) private Integer count; - /** Creates an instance of ClusterPoolComputeProfile class. */ + /** + * Creates an instance of ClusterPoolComputeProfile class. + */ public ClusterPoolComputeProfile() { } /** * Get the vmSize property: The virtual machine SKU. - * + * * @return the vmSize value. */ public String vmSize() { @@ -38,7 +42,7 @@ public String vmSize() { /** * Set the vmSize property: The virtual machine SKU. - * + * * @param vmSize the vmSize value to set. * @return the ClusterPoolComputeProfile object itself. */ @@ -49,7 +53,7 @@ public ClusterPoolComputeProfile withVmSize(String vmSize) { /** * Get the count property: The number of virtual machines. - * + * * @return the count value. */ public Integer count() { @@ -58,15 +62,13 @@ public Integer count() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (vmSize() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property vmSize in model ClusterPoolComputeProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property vmSize in model ClusterPoolComputeProfile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolListResult.java index e1c055f1aee63..fa066fa77d71a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The list cluster pools operation response. */ +/** + * The list cluster pools operation response. + */ @Fluent public final class ClusterPoolListResult { /* @@ -24,13 +26,15 @@ public final class ClusterPoolListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ClusterPoolListResult class. */ + /** + * Creates an instance of ClusterPoolListResult class. + */ public ClusterPoolListResult() { } /** * Get the value property: The list of cluster pools. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The list of cluster pools. - * + * * @param value the value value to set. * @return the ClusterPoolListResult object itself. */ @@ -50,7 +54,7 @@ public ClusterPoolListResult withValue(List value) { /** * Get the nextLink property: The link (url) to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolLogAnalyticsProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolLogAnalyticsProfile.java index 66aeda98719c1..c071788b9c4fd 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolLogAnalyticsProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolLogAnalyticsProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster pool log analytics profile used to enable or disable OMS agent for AKS cluster. */ +/** + * Cluster pool log analytics profile used to enable or disable OMS agent for AKS cluster. + */ @Fluent public class ClusterPoolLogAnalyticsProfile { /* @@ -22,13 +24,15 @@ public class ClusterPoolLogAnalyticsProfile { @JsonProperty(value = "workspaceId") private String workspaceId; - /** Creates an instance of ClusterPoolLogAnalyticsProfile class. */ + /** + * Creates an instance of ClusterPoolLogAnalyticsProfile class. + */ public ClusterPoolLogAnalyticsProfile() { } /** * Get the enabled property: True if log analytics is enabled for cluster pool, otherwise false. - * + * * @return the enabled value. */ public boolean enabled() { @@ -37,7 +41,7 @@ public boolean enabled() { /** * Set the enabled property: True if log analytics is enabled for cluster pool, otherwise false. - * + * * @param enabled the enabled value to set. * @return the ClusterPoolLogAnalyticsProfile object itself. */ @@ -48,7 +52,7 @@ public ClusterPoolLogAnalyticsProfile withEnabled(boolean enabled) { /** * Get the workspaceId property: Log analytics workspace to associate with the OMS agent. - * + * * @return the workspaceId value. */ public String workspaceId() { @@ -57,7 +61,7 @@ public String workspaceId() { /** * Set the workspaceId property: Log analytics workspace to associate with the OMS agent. - * + * * @param workspaceId the workspaceId value to set. * @return the ClusterPoolLogAnalyticsProfile object itself. */ @@ -68,7 +72,7 @@ public ClusterPoolLogAnalyticsProfile withWorkspaceId(String workspaceId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNetworkProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNetworkProfile.java index eca86b3122229..6a934d56f6037 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNetworkProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNetworkProfile.java @@ -7,8 +7,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** Cluster pool networking configuration. */ +/** + * Cluster pool networking configuration. + */ @Fluent public class ClusterPoolNetworkProfile { /* @@ -17,13 +20,40 @@ public class ClusterPoolNetworkProfile { @JsonProperty(value = "subnetId", required = true) private String subnetId; - /** Creates an instance of ClusterPoolNetworkProfile class. */ + /* + * The outbound (egress) routing method. + * + * This can only be set at cluster pool creation time and cannot be changed later. + */ + @JsonProperty(value = "outboundType") + private OutboundType outboundType; + + /* + * ClusterPool is based on AKS cluster. AKS cluster exposes the API server to public internet by default. If you + * set this property to true, a private AKS cluster will be created, and it will use private apiserver, which is + * not exposed to public internet. + */ + @JsonProperty(value = "enablePrivateApiServer") + private Boolean enablePrivateApiServer; + + /* + * The IP ranges authorized to access the AKS API server. + * + * IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with private AKS + * clusters. So you cannot set enablePrivateApiServer to true and apiServerAuthorizedIpRanges at the same time. + */ + @JsonProperty(value = "apiServerAuthorizedIpRanges") + private List apiServerAuthorizedIpRanges; + + /** + * Creates an instance of ClusterPoolNetworkProfile class. + */ public ClusterPoolNetworkProfile() { } /** * Get the subnetId property: Cluster pool subnet resource id. - * + * * @return the subnetId value. */ public String subnetId() { @@ -32,7 +62,7 @@ public String subnetId() { /** * Set the subnetId property: Cluster pool subnet resource id. - * + * * @param subnetId the subnetId value to set. * @return the ClusterPoolNetworkProfile object itself. */ @@ -41,17 +71,89 @@ public ClusterPoolNetworkProfile withSubnetId(String subnetId) { return this; } + /** + * Get the outboundType property: The outbound (egress) routing method. + * + * This can only be set at cluster pool creation time and cannot be changed later. + * + * @return the outboundType value. + */ + public OutboundType outboundType() { + return this.outboundType; + } + + /** + * Set the outboundType property: The outbound (egress) routing method. + * + * This can only be set at cluster pool creation time and cannot be changed later. + * + * @param outboundType the outboundType value to set. + * @return the ClusterPoolNetworkProfile object itself. + */ + public ClusterPoolNetworkProfile withOutboundType(OutboundType outboundType) { + this.outboundType = outboundType; + return this; + } + + /** + * Get the enablePrivateApiServer property: ClusterPool is based on AKS cluster. AKS cluster exposes the API server + * to public internet by default. If you set this property to true, a private AKS cluster will be created, and it + * will use private apiserver, which is not exposed to public internet. + * + * @return the enablePrivateApiServer value. + */ + public Boolean enablePrivateApiServer() { + return this.enablePrivateApiServer; + } + + /** + * Set the enablePrivateApiServer property: ClusterPool is based on AKS cluster. AKS cluster exposes the API server + * to public internet by default. If you set this property to true, a private AKS cluster will be created, and it + * will use private apiserver, which is not exposed to public internet. + * + * @param enablePrivateApiServer the enablePrivateApiServer value to set. + * @return the ClusterPoolNetworkProfile object itself. + */ + public ClusterPoolNetworkProfile withEnablePrivateApiServer(Boolean enablePrivateApiServer) { + this.enablePrivateApiServer = enablePrivateApiServer; + return this; + } + + /** + * Get the apiServerAuthorizedIpRanges property: The IP ranges authorized to access the AKS API server. + * + * IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with private AKS + * clusters. So you cannot set enablePrivateApiServer to true and apiServerAuthorizedIpRanges at the same time. + * + * @return the apiServerAuthorizedIpRanges value. + */ + public List apiServerAuthorizedIpRanges() { + return this.apiServerAuthorizedIpRanges; + } + + /** + * Set the apiServerAuthorizedIpRanges property: The IP ranges authorized to access the AKS API server. + * + * IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. This feature is not compatible with private AKS + * clusters. So you cannot set enablePrivateApiServer to true and apiServerAuthorizedIpRanges at the same time. + * + * @param apiServerAuthorizedIpRanges the apiServerAuthorizedIpRanges value to set. + * @return the ClusterPoolNetworkProfile object itself. + */ + public ClusterPoolNetworkProfile withApiServerAuthorizedIpRanges(List apiServerAuthorizedIpRanges) { + this.apiServerAuthorizedIpRanges = apiServerAuthorizedIpRanges; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (subnetId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property subnetId in model ClusterPoolNetworkProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property subnetId in model ClusterPoolNetworkProfile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java new file mode 100644 index 0000000000000..260229fe983d7 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of upgrading cluster pool's AKS patch version. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "upgradeType") +@JsonTypeName("NodeOsUpgrade") +@Immutable +public final class ClusterPoolNodeOsImageUpdateProperties extends ClusterPoolUpgradeProperties { + /** + * Creates an instance of ClusterPoolNodeOsImageUpdateProperties class. + */ + public ClusterPoolNodeOsImageUpdateProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolProfile.java index e911f1db672ea..3bdea7f8d7579 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolProfile.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster pool profile. */ +/** + * Cluster pool profile. + */ @Fluent public class ClusterPoolProfile { /* @@ -17,13 +19,15 @@ public class ClusterPoolProfile { @JsonProperty(value = "clusterPoolVersion", required = true) private String clusterPoolVersion; - /** Creates an instance of ClusterPoolProfile class. */ + /** + * Creates an instance of ClusterPoolProfile class. + */ public ClusterPoolProfile() { } /** * Get the clusterPoolVersion property: Cluster pool version is a 2-part version. - * + * * @return the clusterPoolVersion value. */ public String clusterPoolVersion() { @@ -32,7 +36,7 @@ public String clusterPoolVersion() { /** * Set the clusterPoolVersion property: Cluster pool version is a 2-part version. - * + * * @param clusterPoolVersion the clusterPoolVersion value to set. * @return the ClusterPoolProfile object itself. */ @@ -43,15 +47,13 @@ public ClusterPoolProfile withClusterPoolVersion(String clusterPoolVersion) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (clusterPoolVersion() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clusterPoolVersion in model ClusterPoolProfile")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clusterPoolVersion in model ClusterPoolProfile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java index c99bd768a4cec..e96e116036627 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesAksClusterProfile.java @@ -6,21 +6,29 @@ import com.azure.core.annotation.Fluent; -/** Properties of underlying AKS cluster. */ +/** + * Properties of underlying AKS cluster. + */ @Fluent public final class ClusterPoolResourcePropertiesAksClusterProfile extends AksClusterProfile { - /** Creates an instance of ClusterPoolResourcePropertiesAksClusterProfile class. */ + /** + * Creates an instance of ClusterPoolResourcePropertiesAksClusterProfile class. + */ public ClusterPoolResourcePropertiesAksClusterProfile() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterPoolResourcePropertiesAksClusterProfile withAksClusterResourceId(String aksClusterResourceId) { super.withAksClusterResourceId(aksClusterResourceId); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterPoolResourcePropertiesAksClusterProfile withAksClusterAgentPoolIdentityProfile( AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile) { @@ -30,7 +38,7 @@ public ClusterPoolResourcePropertiesAksClusterProfile withAksClusterAgentPoolIde /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java index b69b40bff6108..d9427758564ff 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java @@ -6,14 +6,20 @@ import com.azure.core.annotation.Fluent; -/** CLuster pool profile. */ +/** + * CLuster pool profile. + */ @Fluent public final class ClusterPoolResourcePropertiesClusterPoolProfile extends ClusterPoolProfile { - /** Creates an instance of ClusterPoolResourcePropertiesClusterPoolProfile class. */ + /** + * Creates an instance of ClusterPoolResourcePropertiesClusterPoolProfile class. + */ public ClusterPoolResourcePropertiesClusterPoolProfile() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterPoolResourcePropertiesClusterPoolProfile withClusterPoolVersion(String clusterPoolVersion) { super.withClusterPoolVersion(clusterPoolVersion); @@ -22,7 +28,7 @@ public ClusterPoolResourcePropertiesClusterPoolProfile withClusterPoolVersion(St /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java index fd5499c9eb4c2..baf505e9af649 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java @@ -6,14 +6,20 @@ import com.azure.core.annotation.Fluent; -/** CLuster pool compute profile. */ +/** + * CLuster pool compute profile. + */ @Fluent public final class ClusterPoolResourcePropertiesComputeProfile extends ClusterPoolComputeProfile { - /** Creates an instance of ClusterPoolResourcePropertiesComputeProfile class. */ + /** + * Creates an instance of ClusterPoolResourcePropertiesComputeProfile class. + */ public ClusterPoolResourcePropertiesComputeProfile() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterPoolResourcePropertiesComputeProfile withVmSize(String vmSize) { super.withVmSize(vmSize); @@ -22,7 +28,7 @@ public ClusterPoolResourcePropertiesComputeProfile withVmSize(String vmSize) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesLogAnalyticsProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesLogAnalyticsProfile.java index e87e782bbd648..c10da9fdd989b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesLogAnalyticsProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesLogAnalyticsProfile.java @@ -6,21 +6,29 @@ import com.azure.core.annotation.Fluent; -/** Cluster pool log analytics profile to enable OMS agent for AKS cluster. */ +/** + * Cluster pool log analytics profile to enable OMS agent for AKS cluster. + */ @Fluent public final class ClusterPoolResourcePropertiesLogAnalyticsProfile extends ClusterPoolLogAnalyticsProfile { - /** Creates an instance of ClusterPoolResourcePropertiesLogAnalyticsProfile class. */ + /** + * Creates an instance of ClusterPoolResourcePropertiesLogAnalyticsProfile class. + */ public ClusterPoolResourcePropertiesLogAnalyticsProfile() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterPoolResourcePropertiesLogAnalyticsProfile withEnabled(boolean enabled) { super.withEnabled(enabled); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterPoolResourcePropertiesLogAnalyticsProfile withWorkspaceId(String workspaceId) { super.withWorkspaceId(workspaceId); @@ -29,7 +37,7 @@ public ClusterPoolResourcePropertiesLogAnalyticsProfile withWorkspaceId(String w /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesNetworkProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesNetworkProfile.java index e29489efecbaf..0818eb9fb0720 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesNetworkProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesNetworkProfile.java @@ -5,24 +5,59 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; +import java.util.List; -/** Cluster pool network profile. */ +/** + * Cluster pool network profile. + */ @Fluent public final class ClusterPoolResourcePropertiesNetworkProfile extends ClusterPoolNetworkProfile { - /** Creates an instance of ClusterPoolResourcePropertiesNetworkProfile class. */ + /** + * Creates an instance of ClusterPoolResourcePropertiesNetworkProfile class. + */ public ClusterPoolResourcePropertiesNetworkProfile() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterPoolResourcePropertiesNetworkProfile withSubnetId(String subnetId) { super.withSubnetId(subnetId); return this; } + /** + * {@inheritDoc} + */ + @Override + public ClusterPoolResourcePropertiesNetworkProfile withOutboundType(OutboundType outboundType) { + super.withOutboundType(outboundType); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ClusterPoolResourcePropertiesNetworkProfile withEnablePrivateApiServer(Boolean enablePrivateApiServer) { + super.withEnablePrivateApiServer(enablePrivateApiServer); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public ClusterPoolResourcePropertiesNetworkProfile + withApiServerAuthorizedIpRanges(List apiServerAuthorizedIpRanges) { + super.withApiServerAuthorizedIpRanges(apiServerAuthorizedIpRanges); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgrade.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgrade.java new file mode 100644 index 0000000000000..dc7cd829b9692 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgrade.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster Pool Upgrade. + */ +@Fluent +public final class ClusterPoolUpgrade { + /* + * Properties of upgrading cluster pool. + */ + @JsonProperty(value = "properties", required = true) + private ClusterPoolUpgradeProperties properties; + + /** + * Creates an instance of ClusterPoolUpgrade class. + */ + public ClusterPoolUpgrade() { + } + + /** + * Get the properties property: Properties of upgrading cluster pool. + * + * @return the properties value. + */ + public ClusterPoolUpgradeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of upgrading cluster pool. + * + * @param properties the properties value to set. + * @return the ClusterPoolUpgrade object itself. + */ + public ClusterPoolUpgrade withProperties(ClusterPoolUpgradeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ClusterPoolUpgrade")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolUpgrade.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeProperties.java new file mode 100644 index 0000000000000..9d6dd3bbe8945 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of upgrading cluster pool. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "upgradeType", + defaultImpl = ClusterPoolUpgradeProperties.class) +@JsonTypeName("ClusterPoolUpgradeProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AKSPatchUpgrade", value = ClusterPoolAksPatchVersionUpgradeProperties.class), + @JsonSubTypes.Type(name = "NodeOsUpgrade", value = ClusterPoolNodeOsImageUpdateProperties.class) }) +@Immutable +public class ClusterPoolUpgradeProperties { + /** + * Creates an instance of ClusterPoolUpgradeProperties class. + */ + public ClusterPoolUpgradeProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeType.java new file mode 100644 index 0000000000000..5e994c5888060 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of upgrade. + */ +public final class ClusterPoolUpgradeType extends ExpandableStringEnum { + /** + * Static value AKSPatchUpgrade for ClusterPoolUpgradeType. + */ + public static final ClusterPoolUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); + + /** + * Static value NodeOsUpgrade for ClusterPoolUpgradeType. + */ + public static final ClusterPoolUpgradeType NODE_OS_UPGRADE = fromString("NodeOsUpgrade"); + + /** + * Creates a new instance of ClusterPoolUpgradeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterPoolUpgradeType() { + } + + /** + * Creates or finds a ClusterPoolUpgradeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterPoolUpgradeType. + */ + @JsonCreator + public static ClusterPoolUpgradeType fromString(String name) { + return fromString(name, ClusterPoolUpgradeType.class); + } + + /** + * Gets known ClusterPoolUpgradeType values. + * + * @return known ClusterPoolUpgradeType values. + */ + public static Collection values() { + return values(ClusterPoolUpgradeType.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersion.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersion.java index 0babffea68f33..fac47be6ccc6e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersion.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersion.java @@ -4,55 +4,65 @@ package com.azure.resourcemanager.hdinsight.containers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -/** An immutable client-side representation of ClusterPoolVersion. */ +/** + * An immutable client-side representation of ClusterPoolVersion. + */ public interface ClusterPoolVersion { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the clusterPoolVersion property: Cluster pool version is a 2-part version. - * + * * @return the clusterPoolVersion value. */ String clusterPoolVersion(); /** * Gets the aksVersion property: AKS version. - * + * * @return the aksVersion value. */ String aksVersion(); /** * Gets the isPreview property: Indicate if this version is in preview or not. - * + * * @return the isPreview value. */ Boolean isPreview(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner object. - * + * * @return the inner object. */ ClusterPoolVersionInner innerModel(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionsListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionsListResult.java index 9247b0fcc8316..36c3dd2ce9541 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionsListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Represents a list of cluster pool versions. */ +/** + * Represents a list of cluster pool versions. + */ @Fluent public final class ClusterPoolVersionsListResult { /* @@ -24,13 +26,15 @@ public final class ClusterPoolVersionsListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ClusterPoolVersionsListResult class. */ + /** + * Creates an instance of ClusterPoolVersionsListResult class. + */ public ClusterPoolVersionsListResult() { } /** * Get the value property: The list of cluster pool versions. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The list of cluster pool versions. - * + * * @param value the value value to set. * @return the ClusterPoolVersionsListResult object itself. */ @@ -50,7 +54,7 @@ public ClusterPoolVersionsListResult withValue(List val /** * Get the nextLink property: The link (url) to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPools.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPools.java index 7b9ecb06974d9..0e24680bff067 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPools.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPools.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ClusterPools. */ +/** + * Resource collection API of ClusterPools. + */ public interface ClusterPools { /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -21,12 +23,12 @@ public interface ClusterPools { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a cluster pool along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterPoolName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterPoolName, + Context context); /** * Gets a cluster pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -38,7 +40,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -49,7 +51,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a Cluster Pool. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -61,7 +63,7 @@ Response getByResourceGroupWithResponse( /** * Gets the list of Cluster Pools within a Subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Cluster Pools within a Subscription as paginated response with {@link PagedIterable}. @@ -70,7 +72,7 @@ Response getByResourceGroupWithResponse( /** * Gets the list of Cluster Pools within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -81,7 +83,7 @@ Response getByResourceGroupWithResponse( /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -92,7 +94,7 @@ Response getByResourceGroupWithResponse( /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -102,9 +104,37 @@ Response getByResourceGroupWithResponse( */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + ClusterPool upgrade(String resourceGroupName, String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest); + + /** + * Upgrade a cluster pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterPoolUpgradeRequest Upgrade a cluster pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return cluster pool. + */ + ClusterPool upgrade(String resourceGroupName, String clusterPoolName, ClusterPoolUpgrade clusterPoolUpgradeRequest, + Context context); + /** * Gets a cluster pool. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -115,7 +145,7 @@ Response getByResourceGroupWithResponse( /** * Gets a cluster pool. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,7 +157,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a Cluster Pool. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -137,7 +167,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a Cluster Pool. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +178,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new ClusterPool resource. - * + * * @param name resource name. * @return the first stage of the new ClusterPool definition. */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterProfile.java index 6fe44b053796a..3cec54a993703 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterProfile.java @@ -11,7 +11,9 @@ import java.util.List; import java.util.Map; -/** Cluster profile. */ +/** + * Cluster profile. + */ @Fluent public final class ClusterProfile { /* @@ -33,9 +35,9 @@ public final class ClusterProfile { private List components; /* - * Identity Profile with details of an MSI. + * This property is required by Trino, Spark and Flink cluster but is optional for Kafka cluster. */ - @JsonProperty(value = "identityProfile", required = true) + @JsonProperty(value = "identityProfile") private IdentityProfile identityProfile; /* @@ -62,6 +64,12 @@ public final class ClusterProfile { @JsonProperty(value = "connectivityProfile", access = JsonProperty.Access.WRITE_ONLY) private ConnectivityProfile connectivityProfile; + /* + * Cluster access profile. + */ + @JsonProperty(value = "clusterAccessProfile") + private ClusterAccessProfile clusterAccessProfile; + /* * Cluster log analytics profile to enable or disable OMS agent for cluster. */ @@ -88,11 +96,16 @@ public final class ClusterProfile { private AutoscaleProfile autoscaleProfile; /* - * Kafka cluster profile. + * Cluster Ranger plugin profile. + */ + @JsonProperty(value = "rangerPluginProfile") + private ClusterRangerPluginProfile rangerPluginProfile; + + /* + * The Kafka cluster profile. */ @JsonProperty(value = "kafkaProfile") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map kafkaProfile; + private KafkaProfile kafkaProfile; /* * Trino Cluster profile. @@ -119,6 +132,12 @@ public final class ClusterProfile { @JsonProperty(value = "sparkProfile") private SparkProfile sparkProfile; + /* + * The ranger cluster profile. + */ + @JsonProperty(value = "rangerProfile") + private RangerProfile rangerProfile; + /* * Stub cluster profile. */ @@ -132,13 +151,15 @@ public final class ClusterProfile { @JsonProperty(value = "scriptActionProfiles") private List scriptActionProfiles; - /** Creates an instance of ClusterProfile class. */ + /** + * Creates an instance of ClusterProfile class. + */ public ClusterProfile() { } /** * Get the clusterVersion property: Version with 3/4 part. - * + * * @return the clusterVersion value. */ public String clusterVersion() { @@ -147,7 +168,7 @@ public String clusterVersion() { /** * Set the clusterVersion property: Version with 3/4 part. - * + * * @param clusterVersion the clusterVersion value to set. * @return the ClusterProfile object itself. */ @@ -158,7 +179,7 @@ public ClusterProfile withClusterVersion(String clusterVersion) { /** * Get the ossVersion property: Version with three part. - * + * * @return the ossVersion value. */ public String ossVersion() { @@ -167,7 +188,7 @@ public String ossVersion() { /** * Set the ossVersion property: Version with three part. - * + * * @param ossVersion the ossVersion value to set. * @return the ClusterProfile object itself. */ @@ -178,7 +199,7 @@ public ClusterProfile withOssVersion(String ossVersion) { /** * Get the components property: Component list of this cluster type and version. - * + * * @return the components value. */ public List components() { @@ -186,8 +207,9 @@ public List components() { } /** - * Get the identityProfile property: Identity Profile with details of an MSI. - * + * Get the identityProfile property: This property is required by Trino, Spark and Flink cluster but is optional + * for Kafka cluster. + * * @return the identityProfile value. */ public IdentityProfile identityProfile() { @@ -195,8 +217,9 @@ public IdentityProfile identityProfile() { } /** - * Set the identityProfile property: Identity Profile with details of an MSI. - * + * Set the identityProfile property: This property is required by Trino, Spark and Flink cluster but is optional + * for Kafka cluster. + * * @param identityProfile the identityProfile value to set. * @return the ClusterProfile object itself. */ @@ -208,7 +231,7 @@ public ClusterProfile withIdentityProfile(IdentityProfile identityProfile) { /** * Get the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids * authorized for data plane access. - * + * * @return the authorizationProfile value. */ public AuthorizationProfile authorizationProfile() { @@ -218,7 +241,7 @@ public AuthorizationProfile authorizationProfile() { /** * Set the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids * authorized for data plane access. - * + * * @param authorizationProfile the authorizationProfile value to set. * @return the ClusterProfile object itself. */ @@ -229,7 +252,7 @@ public ClusterProfile withAuthorizationProfile(AuthorizationProfile authorizatio /** * Get the secretsProfile property: The cluster secret profile. - * + * * @return the secretsProfile value. */ public SecretsProfile secretsProfile() { @@ -238,7 +261,7 @@ public SecretsProfile secretsProfile() { /** * Set the secretsProfile property: The cluster secret profile. - * + * * @param secretsProfile the secretsProfile value to set. * @return the ClusterProfile object itself. */ @@ -249,7 +272,7 @@ public ClusterProfile withSecretsProfile(SecretsProfile secretsProfile) { /** * Get the serviceConfigsProfiles property: The service configs profiles. - * + * * @return the serviceConfigsProfiles value. */ public List serviceConfigsProfiles() { @@ -258,7 +281,7 @@ public List serviceConfigsProfiles() { /** * Set the serviceConfigsProfiles property: The service configs profiles. - * + * * @param serviceConfigsProfiles the serviceConfigsProfiles value to set. * @return the ClusterProfile object itself. */ @@ -269,16 +292,36 @@ public ClusterProfile withServiceConfigsProfiles(List kafkaProfile() { + public KafkaProfile kafkaProfile() { return this.kafkaProfile; } /** - * Set the kafkaProfile property: Kafka cluster profile. - * + * Set the kafkaProfile property: The Kafka cluster profile. + * * @param kafkaProfile the kafkaProfile value to set. * @return the ClusterProfile object itself. */ - public ClusterProfile withKafkaProfile(Map kafkaProfile) { + public ClusterProfile withKafkaProfile(KafkaProfile kafkaProfile) { this.kafkaProfile = kafkaProfile; return this; } /** * Get the trinoProfile property: Trino Cluster profile. - * + * * @return the trinoProfile value. */ public TrinoProfile trinoProfile() { @@ -389,7 +452,7 @@ public TrinoProfile trinoProfile() { /** * Set the trinoProfile property: Trino Cluster profile. - * + * * @param trinoProfile the trinoProfile value to set. * @return the ClusterProfile object itself. */ @@ -400,7 +463,7 @@ public ClusterProfile withTrinoProfile(TrinoProfile trinoProfile) { /** * Get the llapProfile property: LLAP cluster profile. - * + * * @return the llapProfile value. */ public Map llapProfile() { @@ -409,7 +472,7 @@ public Map llapProfile() { /** * Set the llapProfile property: LLAP cluster profile. - * + * * @param llapProfile the llapProfile value to set. * @return the ClusterProfile object itself. */ @@ -420,7 +483,7 @@ public ClusterProfile withLlapProfile(Map llapProfile) { /** * Get the flinkProfile property: The Flink cluster profile. - * + * * @return the flinkProfile value. */ public FlinkProfile flinkProfile() { @@ -429,7 +492,7 @@ public FlinkProfile flinkProfile() { /** * Set the flinkProfile property: The Flink cluster profile. - * + * * @param flinkProfile the flinkProfile value to set. * @return the ClusterProfile object itself. */ @@ -440,7 +503,7 @@ public ClusterProfile withFlinkProfile(FlinkProfile flinkProfile) { /** * Get the sparkProfile property: The spark cluster profile. - * + * * @return the sparkProfile value. */ public SparkProfile sparkProfile() { @@ -449,7 +512,7 @@ public SparkProfile sparkProfile() { /** * Set the sparkProfile property: The spark cluster profile. - * + * * @param sparkProfile the sparkProfile value to set. * @return the ClusterProfile object itself. */ @@ -458,9 +521,29 @@ public ClusterProfile withSparkProfile(SparkProfile sparkProfile) { return this; } + /** + * Get the rangerProfile property: The ranger cluster profile. + * + * @return the rangerProfile value. + */ + public RangerProfile rangerProfile() { + return this.rangerProfile; + } + + /** + * Set the rangerProfile property: The ranger cluster profile. + * + * @param rangerProfile the rangerProfile value to set. + * @return the ClusterProfile object itself. + */ + public ClusterProfile withRangerProfile(RangerProfile rangerProfile) { + this.rangerProfile = rangerProfile; + return this; + } + /** * Get the stubProfile property: Stub cluster profile. - * + * * @return the stubProfile value. */ public Map stubProfile() { @@ -469,7 +552,7 @@ public Map stubProfile() { /** * Set the stubProfile property: Stub cluster profile. - * + * * @param stubProfile the stubProfile value to set. * @return the ClusterProfile object itself. */ @@ -480,7 +563,7 @@ public ClusterProfile withStubProfile(Map stubProfile) { /** * Get the scriptActionProfiles property: The script action profile list. - * + * * @return the scriptActionProfiles value. */ public List scriptActionProfiles() { @@ -489,7 +572,7 @@ public List scriptActionProfiles() { /** * Set the scriptActionProfiles property: The script action profile list. - * + * * @param scriptActionProfiles the scriptActionProfiles value to set. * @return the ClusterProfile object itself. */ @@ -500,35 +583,27 @@ public ClusterProfile withScriptActionProfiles(List scriptA /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (clusterVersion() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property clusterVersion in model ClusterProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property clusterVersion in model ClusterProfile")); } if (ossVersion() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property ossVersion in model ClusterProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ossVersion in model ClusterProfile")); } if (components() != null) { components().forEach(e -> e.validate()); } - if (identityProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property identityProfile in model ClusterProfile")); - } else { + if (identityProfile() != null) { identityProfile().validate(); } if (authorizationProfile() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property authorizationProfile in model ClusterProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property authorizationProfile in model ClusterProfile")); } else { authorizationProfile().validate(); } @@ -541,6 +616,9 @@ public void validate() { if (connectivityProfile() != null) { connectivityProfile().validate(); } + if (clusterAccessProfile() != null) { + clusterAccessProfile().validate(); + } if (logAnalyticsProfile() != null) { logAnalyticsProfile().validate(); } @@ -553,6 +631,12 @@ public void validate() { if (autoscaleProfile() != null) { autoscaleProfile().validate(); } + if (rangerPluginProfile() != null) { + rangerPluginProfile().validate(); + } + if (kafkaProfile() != null) { + kafkaProfile().validate(); + } if (trinoProfile() != null) { trinoProfile().validate(); } @@ -562,6 +646,9 @@ public void validate() { if (sparkProfile() != null) { sparkProfile().validate(); } + if (rangerProfile() != null) { + rangerProfile().validate(); + } if (scriptActionProfiles() != null) { scriptActionProfiles().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPrometheusProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPrometheusProfile.java index 71f02f2a3f447..5d8c9385b8e9e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPrometheusProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPrometheusProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cluster Prometheus profile. */ +/** + * Cluster Prometheus profile. + */ @Fluent public final class ClusterPrometheusProfile { /* @@ -16,13 +18,15 @@ public final class ClusterPrometheusProfile { @JsonProperty(value = "enabled", required = true) private boolean enabled; - /** Creates an instance of ClusterPrometheusProfile class. */ + /** + * Creates an instance of ClusterPrometheusProfile class. + */ public ClusterPrometheusProfile() { } /** * Get the enabled property: Enable Prometheus for cluster or not. - * + * * @return the enabled value. */ public boolean enabled() { @@ -31,7 +35,7 @@ public boolean enabled() { /** * Set the enabled property: Enable Prometheus for cluster or not. - * + * * @param enabled the enabled value to set. * @return the ClusterPrometheusProfile object itself. */ @@ -42,7 +46,7 @@ public ClusterPrometheusProfile withEnabled(boolean enabled) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterRangerPluginProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterRangerPluginProfile.java new file mode 100644 index 0000000000000..6b1ca1d3bdaee --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterRangerPluginProfile.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster Ranger plugin profile. + */ +@Fluent +public final class ClusterRangerPluginProfile { + /* + * Enable Ranger for cluster or not. + */ + @JsonProperty(value = "enabled", required = true) + private boolean enabled; + + /** + * Creates an instance of ClusterRangerPluginProfile class. + */ + public ClusterRangerPluginProfile() { + } + + /** + * Get the enabled property: Enable Ranger for cluster or not. + * + * @return the enabled value. + */ + public boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Enable Ranger for cluster or not. + * + * @param enabled the enabled value to set. + * @return the ClusterRangerPluginProfile object itself. + */ + public ClusterRangerPluginProfile withEnabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeData.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeData.java index f426a6f63b91b..27a0f4cd61568 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeData.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeData.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** The parameters for resizing a cluster. */ +/** + * The parameters for resizing a cluster. + */ @Fluent public final class ClusterResizeData extends Resource { /* @@ -26,13 +28,15 @@ public final class ClusterResizeData extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ClusterResizeData class. */ + /** + * Creates an instance of ClusterResizeData class. + */ public ClusterResizeData() { } /** * Get the innerProperties property: Sets the properties. Define cluster resize specific properties. - * + * * @return the innerProperties value. */ private ClusterResizeProperties innerProperties() { @@ -41,21 +45,25 @@ private ClusterResizeProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterResizeData withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ClusterResizeData withTags(Map tags) { super.withTags(tags); @@ -64,7 +72,7 @@ public ClusterResizeData withTags(Map tags) { /** * Get the targetWorkerNodeCount property: Target node count of worker node. - * + * * @return the targetWorkerNodeCount value. */ public Integer targetWorkerNodeCount() { @@ -73,7 +81,7 @@ public Integer targetWorkerNodeCount() { /** * Set the targetWorkerNodeCount property: Target node count of worker node. - * + * * @param targetWorkerNodeCount the targetWorkerNodeCount value to set. * @return the ClusterResizeData object itself. */ @@ -87,7 +95,7 @@ public ClusterResizeData withTargetWorkerNodeCount(Integer targetWorkerNodeCount /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfig.java index d30c9a9f0245a..cab411ac9a961 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfig.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfig.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster configs per component. */ +/** + * Cluster configs per component. + */ @Fluent public final class ClusterServiceConfig { /* @@ -24,13 +26,15 @@ public final class ClusterServiceConfig { @JsonProperty(value = "files", required = true) private List files; - /** Creates an instance of ClusterServiceConfig class. */ + /** + * Creates an instance of ClusterServiceConfig class. + */ public ClusterServiceConfig() { } /** * Get the component property: Name of the component the config files should apply to. - * + * * @return the component value. */ public String component() { @@ -39,7 +43,7 @@ public String component() { /** * Set the component property: Name of the component the config files should apply to. - * + * * @param component the component value to set. * @return the ClusterServiceConfig object itself. */ @@ -50,7 +54,7 @@ public ClusterServiceConfig withComponent(String component) { /** * Get the files property: List of Config Files. - * + * * @return the files value. */ public List files() { @@ -59,7 +63,7 @@ public List files() { /** * Set the files property: List of Config Files. - * + * * @param files the files value to set. * @return the ClusterServiceConfig object itself. */ @@ -70,19 +74,17 @@ public ClusterServiceConfig withFiles(List files) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (component() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property component in model ClusterServiceConfig")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property component in model ClusterServiceConfig")); } if (files() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property files in model ClusterServiceConfig")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property files in model ClusterServiceConfig")); } else { files().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfigsProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfigsProfile.java index 57683db075392..91a2e04cfec97 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfigsProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterServiceConfigsProfile.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster service configs. */ +/** + * Cluster service configs. + */ @Fluent public final class ClusterServiceConfigsProfile { /* @@ -24,13 +26,15 @@ public final class ClusterServiceConfigsProfile { @JsonProperty(value = "configs", required = true) private List configs; - /** Creates an instance of ClusterServiceConfigsProfile class. */ + /** + * Creates an instance of ClusterServiceConfigsProfile class. + */ public ClusterServiceConfigsProfile() { } /** * Get the serviceName property: Name of the service the configurations should apply to. - * + * * @return the serviceName value. */ public String serviceName() { @@ -39,7 +43,7 @@ public String serviceName() { /** * Set the serviceName property: Name of the service the configurations should apply to. - * + * * @param serviceName the serviceName value to set. * @return the ClusterServiceConfigsProfile object itself. */ @@ -50,7 +54,7 @@ public ClusterServiceConfigsProfile withServiceName(String serviceName) { /** * Get the configs property: List of service configs. - * + * * @return the configs value. */ public List configs() { @@ -59,7 +63,7 @@ public List configs() { /** * Set the configs property: List of service configs. - * + * * @param configs the configs value to set. * @return the ClusterServiceConfigsProfile object itself. */ @@ -70,21 +74,17 @@ public ClusterServiceConfigsProfile withConfigs(List confi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serviceName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serviceName in model ClusterServiceConfigsProfile")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property serviceName in model ClusterServiceConfigsProfile")); } if (configs() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property configs in model ClusterServiceConfigsProfile")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property configs in model ClusterServiceConfigsProfile")); } else { configs().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgrade.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgrade.java new file mode 100644 index 0000000000000..86a3e29c42f97 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgrade.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Cluster Upgrade. + */ +@Fluent +public final class ClusterUpgrade { + /* + * Properties of upgrading cluster. + */ + @JsonProperty(value = "properties", required = true) + private ClusterUpgradeProperties properties; + + /** + * Creates an instance of ClusterUpgrade class. + */ + public ClusterUpgrade() { + } + + /** + * Get the properties property: Properties of upgrading cluster. + * + * @return the properties value. + */ + public ClusterUpgradeProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of upgrading cluster. + * + * @param properties the properties value to set. + * @return the ClusterUpgrade object itself. + */ + public ClusterUpgrade withProperties(ClusterUpgradeProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model ClusterUpgrade")); + } else { + properties().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgrade.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeProperties.java new file mode 100644 index 0000000000000..d34de0f7ff9ef --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Properties of upgrading cluster. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "upgradeType", + defaultImpl = ClusterUpgradeProperties.class) +@JsonTypeName("ClusterUpgradeProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "AKSPatchUpgrade", value = ClusterAksPatchVersionUpgradeProperties.class), + @JsonSubTypes.Type(name = "HotfixUpgrade", value = ClusterHotfixUpgradeProperties.class) }) +@Immutable +public class ClusterUpgradeProperties { + /** + * Creates an instance of ClusterUpgradeProperties class. + */ + public ClusterUpgradeProperties() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeType.java new file mode 100644 index 0000000000000..ee64e92342013 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of upgrade. + */ +public final class ClusterUpgradeType extends ExpandableStringEnum { + /** + * Static value AKSPatchUpgrade for ClusterUpgradeType. + */ + public static final ClusterUpgradeType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade"); + + /** + * Static value HotfixUpgrade for ClusterUpgradeType. + */ + public static final ClusterUpgradeType HOTFIX_UPGRADE = fromString("HotfixUpgrade"); + + /** + * Creates a new instance of ClusterUpgradeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterUpgradeType() { + } + + /** + * Creates or finds a ClusterUpgradeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterUpgradeType. + */ + @JsonCreator + public static ClusterUpgradeType fromString(String name) { + return fromString(name, ClusterUpgradeType.class); + } + + /** + * Gets known ClusterUpgradeType values. + * + * @return known ClusterUpgradeType values. + */ + public static Collection values() { + return values(ClusterUpgradeType.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersion.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersion.java index a958eb6153c1d..c8aabb81698a0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersion.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersion.java @@ -4,49 +4,59 @@ package com.azure.resourcemanager.hdinsight.containers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; import java.util.List; -/** An immutable client-side representation of ClusterVersion. */ +/** + * An immutable client-side representation of ClusterVersion. + */ public interface ClusterVersion { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the clusterType property: The type of cluster. - * + * * @return the clusterType value. */ String clusterType(); /** * Gets the clusterVersion property: Version with three part. - * + * * @return the clusterVersion value. */ String clusterVersion(); /** * Gets the ossVersion property: Version with three part. - * + * * @return the ossVersion value. */ String ossVersion(); @@ -54,28 +64,28 @@ public interface ClusterVersion { /** * Gets the clusterPoolVersion property: The two part cluster pool version. If the cluster version is before cluster * pool version on-board, the return value will be empty string. - * + * * @return the clusterPoolVersion value. */ String clusterPoolVersion(); /** * Gets the isPreview property: Indicate if this version is in preview or not. - * + * * @return the isPreview value. */ Boolean isPreview(); /** * Gets the components property: Component list of this cluster type and version. - * + * * @return the components value. */ List components(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner object. - * + * * @return the inner object. */ ClusterVersionInner innerModel(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionsListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionsListResult.java index 09167f4c7a620..f23145254d01b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionsListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterVersionsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Represents a list of cluster versions. */ +/** + * Represents a list of cluster versions. + */ @Fluent public final class ClusterVersionsListResult { /* @@ -24,13 +26,15 @@ public final class ClusterVersionsListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ClusterVersionsListResult class. */ + /** + * Creates an instance of ClusterVersionsListResult class. + */ public ClusterVersionsListResult() { } /** * Get the value property: The list of cluster versions. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: The list of cluster versions. - * + * * @param value the value value to set. * @return the ClusterVersionsListResult object itself. */ @@ -50,7 +54,7 @@ public ClusterVersionsListResult withValue(List value) { /** * Get the nextLink property: The link (url) to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Clusters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Clusters.java index cdf088d53abac..0d27206820b09 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Clusters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Clusters.java @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Clusters. */ +/** + * Resource collection API of Clusters. + */ public interface Clusters { /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -24,7 +26,7 @@ public interface Clusters { /** * Lists the HDInsight cluster pools under a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param context The context to associate with this operation. @@ -35,9 +37,40 @@ public interface Clusters { */ PagedIterable listByClusterPoolName(String resourceGroupName, String clusterPoolName, Context context); + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest); + + /** + * Upgrade a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterPoolName The name of the cluster pool. + * @param clusterName The name of the HDInsight cluster. + * @param clusterUpgradeRequest Upgrade a cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the cluster. + */ + Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterUpgrade clusterUpgradeRequest, Context context); + /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -47,12 +80,12 @@ public interface Clusters { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the cluster. */ - Cluster resize( - String resourceGroupName, String clusterPoolName, String clusterName, ClusterResizeData clusterResizeRequest); + Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest); /** * Resize an existing Cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -63,16 +96,12 @@ Cluster resize( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the cluster. */ - Cluster resize( - String resourceGroupName, - String clusterPoolName, - String clusterName, - ClusterResizeData clusterResizeRequest, - Context context); + Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName, + ClusterResizeData clusterResizeRequest, Context context); /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -82,12 +111,12 @@ Cluster resize( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a HDInsight cluster along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + Response getWithResponse(String resourceGroupName, String clusterPoolName, String clusterName, + Context context); /** * Gets a HDInsight cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -100,7 +129,7 @@ Response getWithResponse( /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -112,7 +141,7 @@ Response getWithResponse( /** * Deletes a cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -125,7 +154,7 @@ Response getWithResponse( /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -134,12 +163,12 @@ Response getWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. */ - PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName); + PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName); /** * Lists the config dump of all services running in cluster. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -149,12 +178,12 @@ PagedIterable listServiceConfigs( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cluster instance service configs api response as paginated response with {@link PagedIterable}. */ - PagedIterable listServiceConfigs( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + PagedIterable listServiceConfigs(String resourceGroupName, String clusterPoolName, + String clusterName, Context context); /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -163,12 +192,12 @@ PagedIterable listServiceConfigs( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. */ - PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName); + PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, + String clusterName); /** * Lists the lists of instance views. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -178,12 +207,12 @@ PagedIterable listInstanceViews( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the instance view of a HDInsight Cluster as paginated response with {@link PagedIterable}. */ - PagedIterable listInstanceViews( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + PagedIterable listInstanceViews(String resourceGroupName, String clusterPoolName, + String clusterName, Context context); /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -193,12 +222,12 @@ PagedIterable listInstanceViews( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the status of a cluster instance along with {@link Response}. */ - Response getInstanceViewWithResponse( - String resourceGroupName, String clusterPoolName, String clusterName, Context context); + Response getInstanceViewWithResponse(String resourceGroupName, String clusterPoolName, + String clusterName, Context context); /** * Gets the status of a cluster instance. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterPoolName The name of the cluster pool. * @param clusterName The name of the HDInsight cluster. @@ -211,7 +240,7 @@ Response getInstanceViewWithResponse( /** * Gets a HDInsight cluster. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -222,7 +251,7 @@ Response getInstanceViewWithResponse( /** * Gets a HDInsight cluster. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -234,7 +263,7 @@ Response getInstanceViewWithResponse( /** * Deletes a cluster. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -244,7 +273,7 @@ Response getInstanceViewWithResponse( /** * Deletes a cluster. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,7 +284,7 @@ Response getInstanceViewWithResponse( /** * Begins definition for a new Cluster resource. - * + * * @param name resource name. * @return the first stage of the new Cluster definition. */ diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonOperator.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonOperator.java index 50654cefbc5e7..36f31b5848871 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonOperator.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonOperator.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The comparison operator. */ +/** + * The comparison operator. + */ public final class ComparisonOperator extends ExpandableStringEnum { - /** Static value greaterThan for ComparisonOperator. */ + /** + * Static value greaterThan for ComparisonOperator. + */ public static final ComparisonOperator GREATER_THAN = fromString("greaterThan"); - /** Static value greaterThanOrEqual for ComparisonOperator. */ + /** + * Static value greaterThanOrEqual for ComparisonOperator. + */ public static final ComparisonOperator GREATER_THAN_OR_EQUAL = fromString("greaterThanOrEqual"); - /** Static value lessThan for ComparisonOperator. */ + /** + * Static value lessThan for ComparisonOperator. + */ public static final ComparisonOperator LESS_THAN = fromString("lessThan"); - /** Static value lessThanOrEqual for ComparisonOperator. */ + /** + * Static value lessThanOrEqual for ComparisonOperator. + */ public static final ComparisonOperator LESS_THAN_OR_EQUAL = fromString("lessThanOrEqual"); /** * Creates a new instance of ComparisonOperator value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ComparisonOperator() { /** * Creates or finds a ComparisonOperator from its string representation. - * + * * @param name a name to look for. * @return the corresponding ComparisonOperator. */ @@ -44,7 +54,7 @@ public static ComparisonOperator fromString(String name) { /** * Gets known ComparisonOperator values. - * + * * @return known ComparisonOperator values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonRule.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonRule.java index b5cabf00584c6..dc7b572491b3d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonRule.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComparisonRule.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The comparison rule. */ +/** + * The comparison rule. + */ @Fluent public final class ComparisonRule { /* @@ -23,13 +25,15 @@ public final class ComparisonRule { @JsonProperty(value = "threshold", required = true) private float threshold; - /** Creates an instance of ComparisonRule class. */ + /** + * Creates an instance of ComparisonRule class. + */ public ComparisonRule() { } /** * Get the operator property: The comparison operator. - * + * * @return the operator value. */ public ComparisonOperator operator() { @@ -38,7 +42,7 @@ public ComparisonOperator operator() { /** * Set the operator property: The comparison operator. - * + * * @param operator the operator value to set. * @return the ComparisonRule object itself. */ @@ -49,7 +53,7 @@ public ComparisonRule withOperator(ComparisonOperator operator) { /** * Get the threshold property: Threshold setting. - * + * * @return the threshold value. */ public float threshold() { @@ -58,7 +62,7 @@ public float threshold() { /** * Set the threshold property: Threshold setting. - * + * * @param threshold the threshold value to set. * @return the ComparisonRule object itself. */ @@ -69,14 +73,13 @@ public ComparisonRule withThreshold(float threshold) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (operator() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property operator in model ComparisonRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property operator in model ComparisonRule")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeProfile.java index d17009f41e483..6a7e48e15fa24 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeProfile.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The compute profile. */ +/** + * The compute profile. + */ @Fluent public final class ComputeProfile { /* @@ -18,13 +20,15 @@ public final class ComputeProfile { @JsonProperty(value = "nodes", required = true) private List nodes; - /** Creates an instance of ComputeProfile class. */ + /** + * Creates an instance of ComputeProfile class. + */ public ComputeProfile() { } /** * Get the nodes property: The nodes definitions. - * + * * @return the nodes value. */ public List nodes() { @@ -33,7 +37,7 @@ public List nodes() { /** * Set the nodes property: The nodes definitions. - * + * * @param nodes the nodes value to set. * @return the ComputeProfile object itself. */ @@ -44,14 +48,13 @@ public ComputeProfile withNodes(List nodes) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (nodes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property nodes in model ComputeProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property nodes in model ComputeProfile")); } else { nodes().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeResourceDefinition.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeResourceDefinition.java index 1b7c31f406db0..b9c937a4b01cf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeResourceDefinition.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ComputeResourceDefinition.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The cpu and memory requirement definition. */ +/** + * The cpu and memory requirement definition. + */ @Fluent public final class ComputeResourceDefinition { /* @@ -22,13 +24,15 @@ public final class ComputeResourceDefinition { @JsonProperty(value = "memory", required = true) private long memory; - /** Creates an instance of ComputeResourceDefinition class. */ + /** + * Creates an instance of ComputeResourceDefinition class. + */ public ComputeResourceDefinition() { } /** * Get the cpu property: The required CPU. - * + * * @return the cpu value. */ public float cpu() { @@ -37,7 +41,7 @@ public float cpu() { /** * Set the cpu property: The required CPU. - * + * * @param cpu the cpu value to set. * @return the ComputeResourceDefinition object itself. */ @@ -48,7 +52,7 @@ public ComputeResourceDefinition withCpu(float cpu) { /** * Get the memory property: The required memory in MB, Container memory will be 110 percentile. - * + * * @return the memory value. */ public long memory() { @@ -57,7 +61,7 @@ public long memory() { /** * Set the memory property: The required memory in MB, Container memory will be 110 percentile. - * + * * @param memory the memory value to set. * @return the ComputeResourceDefinition object itself. */ @@ -68,7 +72,7 @@ public ComputeResourceDefinition withMemory(long memory) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfile.java index 1394854fa2010..2ee071d62a2f9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfile.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster connectivity profile. */ +/** + * Cluster connectivity profile. + */ @Fluent public final class ConnectivityProfile { /* @@ -24,13 +26,15 @@ public final class ConnectivityProfile { @JsonProperty(value = "ssh") private List ssh; - /** Creates an instance of ConnectivityProfile class. */ + /** + * Creates an instance of ConnectivityProfile class. + */ public ConnectivityProfile() { } /** * Get the web property: Web connectivity endpoint details. - * + * * @return the web value. */ public ConnectivityProfileWeb web() { @@ -39,7 +43,7 @@ public ConnectivityProfileWeb web() { /** * Set the web property: Web connectivity endpoint details. - * + * * @param web the web value to set. * @return the ConnectivityProfile object itself. */ @@ -50,7 +54,7 @@ public ConnectivityProfile withWeb(ConnectivityProfileWeb web) { /** * Get the ssh property: List of SSH connectivity endpoints. - * + * * @return the ssh value. */ public List ssh() { @@ -59,7 +63,7 @@ public List ssh() { /** * Set the ssh property: List of SSH connectivity endpoints. - * + * * @param ssh the ssh value to set. * @return the ConnectivityProfile object itself. */ @@ -70,14 +74,13 @@ public ConnectivityProfile withSsh(List ssh) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (web() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property web in model ConnectivityProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property web in model ConnectivityProfile")); } else { web().validate(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfileWeb.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfileWeb.java index 3c62efce12211..5dc80d239b6ce 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfileWeb.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ConnectivityProfileWeb.java @@ -6,23 +6,38 @@ import com.azure.core.annotation.Fluent; -/** Web connectivity endpoint details. */ +/** + * Web connectivity endpoint details. + */ @Fluent public final class ConnectivityProfileWeb extends WebConnectivityEndpoint { - /** Creates an instance of ConnectivityProfileWeb class. */ + /** + * Creates an instance of ConnectivityProfileWeb class. + */ public ConnectivityProfileWeb() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ConnectivityProfileWeb withFqdn(String fqdn) { super.withFqdn(fqdn); return this; } + /** + * {@inheritDoc} + */ + @Override + public ConnectivityProfileWeb withPrivateFqdn(String privateFqdn) { + super.withPrivateFqdn(privateFqdn); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ContentEncoding.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ContentEncoding.java index 1fbab0c499bef..15c4c9044c5f5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ContentEncoding.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ContentEncoding.java @@ -13,15 +13,19 @@ * content is base64 encoded. Set it to none or skip it if the content is plain text. */ public final class ContentEncoding extends ExpandableStringEnum { - /** Static value Base64 for ContentEncoding. */ + /** + * Static value Base64 for ContentEncoding. + */ public static final ContentEncoding BASE64 = fromString("Base64"); - /** Static value None for ContentEncoding. */ + /** + * Static value None for ContentEncoding. + */ public static final ContentEncoding NONE = fromString("None"); /** * Creates a new instance of ContentEncoding value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +34,7 @@ public ContentEncoding() { /** * Creates or finds a ContentEncoding from its string representation. - * + * * @param name a name to look for. * @return the corresponding ContentEncoding. */ @@ -41,7 +45,7 @@ public static ContentEncoding fromString(String name) { /** * Gets known ContentEncoding values. - * + * * @return known ContentEncoding values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterAksVersionStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterAksVersionStatus.java new file mode 100644 index 0000000000000..6517797bed4bc --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterAksVersionStatus.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Current AKS version's status: whether it is deprecated or supported. + */ +public final class CurrentClusterAksVersionStatus extends ExpandableStringEnum { + /** + * Static value Deprecated for CurrentClusterAksVersionStatus. + */ + public static final CurrentClusterAksVersionStatus DEPRECATED = fromString("Deprecated"); + + /** + * Static value Supported for CurrentClusterAksVersionStatus. + */ + public static final CurrentClusterAksVersionStatus SUPPORTED = fromString("Supported"); + + /** + * Creates a new instance of CurrentClusterAksVersionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CurrentClusterAksVersionStatus() { + } + + /** + * Creates or finds a CurrentClusterAksVersionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CurrentClusterAksVersionStatus. + */ + @JsonCreator + public static CurrentClusterAksVersionStatus fromString(String name) { + return fromString(name, CurrentClusterAksVersionStatus.class); + } + + /** + * Gets known CurrentClusterAksVersionStatus values. + * + * @return known CurrentClusterAksVersionStatus values. + */ + public static Collection values() { + return values(CurrentClusterAksVersionStatus.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterPoolAksVersionStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterPoolAksVersionStatus.java new file mode 100644 index 0000000000000..ce2d24edbb370 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/CurrentClusterPoolAksVersionStatus.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Current AKS version's status: whether it is deprecated or supported. + */ +public final class CurrentClusterPoolAksVersionStatus extends ExpandableStringEnum { + /** + * Static value Deprecated for CurrentClusterPoolAksVersionStatus. + */ + public static final CurrentClusterPoolAksVersionStatus DEPRECATED = fromString("Deprecated"); + + /** + * Static value Supported for CurrentClusterPoolAksVersionStatus. + */ + public static final CurrentClusterPoolAksVersionStatus SUPPORTED = fromString("Supported"); + + /** + * Creates a new instance of CurrentClusterPoolAksVersionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CurrentClusterPoolAksVersionStatus() { + } + + /** + * Creates or finds a CurrentClusterPoolAksVersionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CurrentClusterPoolAksVersionStatus. + */ + @JsonCreator + public static CurrentClusterPoolAksVersionStatus fromString(String name) { + return fromString(name, CurrentClusterPoolAksVersionStatus.class); + } + + /** + * Gets known CurrentClusterPoolAksVersionStatus values. + * + * @return known CurrentClusterPoolAksVersionStatus values. + */ + public static Collection values() { + return values(CurrentClusterPoolAksVersionStatus.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DataDiskType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DataDiskType.java new file mode 100644 index 0000000000000..38baa9c289a7d --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DataDiskType.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Managed Disk Type. + */ +public final class DataDiskType extends ExpandableStringEnum { + /** + * Static value Standard_HDD_LRS for DataDiskType. + */ + public static final DataDiskType STANDARD_HDD_LRS = fromString("Standard_HDD_LRS"); + + /** + * Static value Standard_SSD_LRS for DataDiskType. + */ + public static final DataDiskType STANDARD_SSD_LRS = fromString("Standard_SSD_LRS"); + + /** + * Static value Standard_SSD_ZRS for DataDiskType. + */ + public static final DataDiskType STANDARD_SSD_ZRS = fromString("Standard_SSD_ZRS"); + + /** + * Static value Premium_SSD_LRS for DataDiskType. + */ + public static final DataDiskType PREMIUM_SSD_LRS = fromString("Premium_SSD_LRS"); + + /** + * Static value Premium_SSD_ZRS for DataDiskType. + */ + public static final DataDiskType PREMIUM_SSD_ZRS = fromString("Premium_SSD_ZRS"); + + /** + * Static value Premium_SSD_v2_LRS for DataDiskType. + */ + public static final DataDiskType PREMIUM_SSD_V2_LRS = fromString("Premium_SSD_v2_LRS"); + + /** + * Creates a new instance of DataDiskType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataDiskType() { + } + + /** + * Creates or finds a DataDiskType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DataDiskType. + */ + @JsonCreator + public static DataDiskType fromString(String name) { + return fromString(name, DataDiskType.class); + } + + /** + * Gets known DataDiskType values. + * + * @return known DataDiskType values. + */ + public static Collection values() { + return values(DataDiskType.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DbConnectionAuthenticationMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DbConnectionAuthenticationMode.java new file mode 100644 index 0000000000000..79773f7ad46c3 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DbConnectionAuthenticationMode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The authentication mode to connect to your Hive metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + */ +public final class DbConnectionAuthenticationMode extends ExpandableStringEnum { + /** + * Static value SqlAuth for DbConnectionAuthenticationMode. + */ + public static final DbConnectionAuthenticationMode SQL_AUTH = fromString("SqlAuth"); + + /** + * Static value IdentityAuth for DbConnectionAuthenticationMode. + */ + public static final DbConnectionAuthenticationMode IDENTITY_AUTH = fromString("IdentityAuth"); + + /** + * Creates a new instance of DbConnectionAuthenticationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DbConnectionAuthenticationMode() { + } + + /** + * Creates or finds a DbConnectionAuthenticationMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DbConnectionAuthenticationMode. + */ + @JsonCreator + public static DbConnectionAuthenticationMode fromString(String name) { + return fromString(name, DbConnectionAuthenticationMode.class); + } + + /** + * Gets known DbConnectionAuthenticationMode values. + * + * @return known DbConnectionAuthenticationMode values. + */ + public static Collection values() { + return values(DbConnectionAuthenticationMode.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DeploymentMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DeploymentMode.java new file mode 100644 index 0000000000000..2c2f3876a6da0 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DeploymentMode.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * A string property that indicates the deployment mode of Flink cluster. It can have one of the following enum values + * => Application, Session. Default value is Session. + */ +public final class DeploymentMode extends ExpandableStringEnum { + /** + * Static value Application for DeploymentMode. + */ + public static final DeploymentMode APPLICATION = fromString("Application"); + + /** + * Static value Session for DeploymentMode. + */ + public static final DeploymentMode SESSION = fromString("Session"); + + /** + * Creates a new instance of DeploymentMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DeploymentMode() { + } + + /** + * Creates or finds a DeploymentMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding DeploymentMode. + */ + @JsonCreator + public static DeploymentMode fromString(String name) { + return fromString(name, DeploymentMode.class); + } + + /** + * Gets known DeploymentMode values. + * + * @return known DeploymentMode values. + */ + public static Collection values() { + return values(DeploymentMode.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DiskStorageProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DiskStorageProfile.java new file mode 100644 index 0000000000000..c73c85326a183 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/DiskStorageProfile.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Kafka disk storage profile. + */ +@Fluent +public final class DiskStorageProfile { + /* + * Managed Disk size in GB. The maximum supported disk size for Standard and Premium HDD/SSD is 32TB, except for + * Premium SSD v2, which supports up to 64TB. + */ + @JsonProperty(value = "dataDiskSize", required = true) + private int dataDiskSize; + + /* + * Managed Disk Type. + */ + @JsonProperty(value = "dataDiskType", required = true) + private DataDiskType dataDiskType; + + /** + * Creates an instance of DiskStorageProfile class. + */ + public DiskStorageProfile() { + } + + /** + * Get the dataDiskSize property: Managed Disk size in GB. The maximum supported disk size for Standard and Premium + * HDD/SSD is 32TB, except for Premium SSD v2, which supports up to 64TB. + * + * @return the dataDiskSize value. + */ + public int dataDiskSize() { + return this.dataDiskSize; + } + + /** + * Set the dataDiskSize property: Managed Disk size in GB. The maximum supported disk size for Standard and Premium + * HDD/SSD is 32TB, except for Premium SSD v2, which supports up to 64TB. + * + * @param dataDiskSize the dataDiskSize value to set. + * @return the DiskStorageProfile object itself. + */ + public DiskStorageProfile withDataDiskSize(int dataDiskSize) { + this.dataDiskSize = dataDiskSize; + return this; + } + + /** + * Get the dataDiskType property: Managed Disk Type. + * + * @return the dataDiskType value. + */ + public DataDiskType dataDiskType() { + return this.dataDiskType; + } + + /** + * Set the dataDiskType property: Managed Disk Type. + * + * @param dataDiskType the dataDiskType value to set. + * @return the DiskStorageProfile object itself. + */ + public DiskStorageProfile withDataDiskType(DataDiskType dataDiskType) { + this.dataDiskType = dataDiskType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataDiskType() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dataDiskType in model DiskStorageProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiskStorageProfile.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkCatalogOptions.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkCatalogOptions.java index 53b406b10c6a7..444e17446bfd0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkCatalogOptions.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkCatalogOptions.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Flink cluster catalog options. */ +/** + * Flink cluster catalog options. + */ @Fluent public final class FlinkCatalogOptions { /* @@ -16,13 +18,15 @@ public final class FlinkCatalogOptions { @JsonProperty(value = "hive") private FlinkHiveCatalogOption hive; - /** Creates an instance of FlinkCatalogOptions class. */ + /** + * Creates an instance of FlinkCatalogOptions class. + */ public FlinkCatalogOptions() { } /** * Get the hive property: Hive Catalog Option for Flink cluster. - * + * * @return the hive value. */ public FlinkHiveCatalogOption hive() { @@ -31,7 +35,7 @@ public FlinkHiveCatalogOption hive() { /** * Set the hive property: Hive Catalog Option for Flink cluster. - * + * * @param hive the hive value to set. * @return the FlinkCatalogOptions object itself. */ @@ -42,7 +46,7 @@ public FlinkCatalogOptions withHive(FlinkHiveCatalogOption hive) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkHiveCatalogOption.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkHiveCatalogOption.java index 99dd013a9ce5c..984a559bae511 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkHiveCatalogOption.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkHiveCatalogOption.java @@ -8,13 +8,23 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Hive Catalog Option for Flink cluster. */ +/** + * Hive Catalog Option for Flink cluster. + */ @Fluent public final class FlinkHiveCatalogOption { + /* + * The authentication mode to connect to your Hive metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and- + * authorization + */ + @JsonProperty(value = "metastoreDbConnectionAuthenticationMode") + private MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode; + /* * Secret reference name from secretsProfile.secrets containing password for database connection. */ - @JsonProperty(value = "metastoreDbConnectionPasswordSecret", required = true) + @JsonProperty(value = "metastoreDbConnectionPasswordSecret") private String metastoreDbConnectionPasswordSecret; /* @@ -26,17 +36,44 @@ public final class FlinkHiveCatalogOption { /* * User name for database connection. */ - @JsonProperty(value = "metastoreDbConnectionUserName", required = true) + @JsonProperty(value = "metastoreDbConnectionUserName") private String metastoreDbConnectionUsername; - /** Creates an instance of FlinkHiveCatalogOption class. */ + /** + * Creates an instance of FlinkHiveCatalogOption class. + */ public FlinkHiveCatalogOption() { } + /** + * Get the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive + * metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + * + * @return the metastoreDbConnectionAuthenticationMode value. + */ + public MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode() { + return this.metastoreDbConnectionAuthenticationMode; + } + + /** + * Set the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive + * metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + * + * @param metastoreDbConnectionAuthenticationMode the metastoreDbConnectionAuthenticationMode value to set. + * @return the FlinkHiveCatalogOption object itself. + */ + public FlinkHiveCatalogOption withMetastoreDbConnectionAuthenticationMode( + MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode) { + this.metastoreDbConnectionAuthenticationMode = metastoreDbConnectionAuthenticationMode; + return this; + } + /** * Get the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets * containing password for database connection. - * + * * @return the metastoreDbConnectionPasswordSecret value. */ public String metastoreDbConnectionPasswordSecret() { @@ -46,7 +83,7 @@ public String metastoreDbConnectionPasswordSecret() { /** * Set the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets * containing password for database connection. - * + * * @param metastoreDbConnectionPasswordSecret the metastoreDbConnectionPasswordSecret value to set. * @return the FlinkHiveCatalogOption object itself. */ @@ -57,7 +94,7 @@ public FlinkHiveCatalogOption withMetastoreDbConnectionPasswordSecret(String met /** * Get the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * + * * @return the metastoreDbConnectionUrl value. */ public String metastoreDbConnectionUrl() { @@ -66,7 +103,7 @@ public String metastoreDbConnectionUrl() { /** * Set the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * + * * @param metastoreDbConnectionUrl the metastoreDbConnectionUrl value to set. * @return the FlinkHiveCatalogOption object itself. */ @@ -77,7 +114,7 @@ public FlinkHiveCatalogOption withMetastoreDbConnectionUrl(String metastoreDbCon /** * Get the metastoreDbConnectionUsername property: User name for database connection. - * + * * @return the metastoreDbConnectionUsername value. */ public String metastoreDbConnectionUsername() { @@ -86,7 +123,7 @@ public String metastoreDbConnectionUsername() { /** * Set the metastoreDbConnectionUsername property: User name for database connection. - * + * * @param metastoreDbConnectionUsername the metastoreDbConnectionUsername value to set. * @return the FlinkHiveCatalogOption object itself. */ @@ -97,28 +134,13 @@ public FlinkHiveCatalogOption withMetastoreDbConnectionUsername(String metastore /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (metastoreDbConnectionPasswordSecret() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property metastoreDbConnectionPasswordSecret in model" - + " FlinkHiveCatalogOption")); - } if (metastoreDbConnectionUrl() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property metastoreDbConnectionUrl in model FlinkHiveCatalogOption")); - } - if (metastoreDbConnectionUsername() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property metastoreDbConnectionUsername in model FlinkHiveCatalogOption")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property metastoreDbConnectionUrl in model FlinkHiveCatalogOption")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProfile.java new file mode 100644 index 0000000000000..1cf93c222a66a --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProfile.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Job specifications for flink clusters in application deployment mode. The specification is immutable even if job + * properties are changed by calling the RunJob API, please use the ListJob API to get the latest job information. + */ +@Fluent +public final class FlinkJobProfile { + /* + * A string property that specifies the directory where the job JAR is located. + */ + @JsonProperty(value = "jobJarDirectory", required = true) + private String jobJarDirectory; + + /* + * A string property that represents the name of the job JAR. + */ + @JsonProperty(value = "jarName", required = true) + private String jarName; + + /* + * A string property that specifies the entry class for the Flink job. If not specified, the entry point is + * auto-detected from the flink job jar package. + */ + @JsonProperty(value = "entryClass") + private String entryClass; + + /* + * A string property representing additional JVM arguments for the Flink job. It should be space separated value. + */ + @JsonProperty(value = "args") + private String args; + + /* + * A string property that represents the name of the savepoint for the Flink job + */ + @JsonProperty(value = "savePointName") + private String savePointName; + + /* + * A string property that indicates the upgrade mode to be performed on the Flink job. It can have one of the + * following enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. + */ + @JsonProperty(value = "upgradeMode", required = true) + private UpgradeMode upgradeMode; + + /** + * Creates an instance of FlinkJobProfile class. + */ + public FlinkJobProfile() { + } + + /** + * Get the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. + * + * @return the jobJarDirectory value. + */ + public String jobJarDirectory() { + return this.jobJarDirectory; + } + + /** + * Set the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. + * + * @param jobJarDirectory the jobJarDirectory value to set. + * @return the FlinkJobProfile object itself. + */ + public FlinkJobProfile withJobJarDirectory(String jobJarDirectory) { + this.jobJarDirectory = jobJarDirectory; + return this; + } + + /** + * Get the jarName property: A string property that represents the name of the job JAR. + * + * @return the jarName value. + */ + public String jarName() { + return this.jarName; + } + + /** + * Set the jarName property: A string property that represents the name of the job JAR. + * + * @param jarName the jarName value to set. + * @return the FlinkJobProfile object itself. + */ + public FlinkJobProfile withJarName(String jarName) { + this.jarName = jarName; + return this; + } + + /** + * Get the entryClass property: A string property that specifies the entry class for the Flink job. If not + * specified, the entry point is auto-detected from the flink job jar package. + * + * @return the entryClass value. + */ + public String entryClass() { + return this.entryClass; + } + + /** + * Set the entryClass property: A string property that specifies the entry class for the Flink job. If not + * specified, the entry point is auto-detected from the flink job jar package. + * + * @param entryClass the entryClass value to set. + * @return the FlinkJobProfile object itself. + */ + public FlinkJobProfile withEntryClass(String entryClass) { + this.entryClass = entryClass; + return this; + } + + /** + * Get the args property: A string property representing additional JVM arguments for the Flink job. It should be + * space separated value. + * + * @return the args value. + */ + public String args() { + return this.args; + } + + /** + * Set the args property: A string property representing additional JVM arguments for the Flink job. It should be + * space separated value. + * + * @param args the args value to set. + * @return the FlinkJobProfile object itself. + */ + public FlinkJobProfile withArgs(String args) { + this.args = args; + return this; + } + + /** + * Get the savePointName property: A string property that represents the name of the savepoint for the Flink job. + * + * @return the savePointName value. + */ + public String savePointName() { + return this.savePointName; + } + + /** + * Set the savePointName property: A string property that represents the name of the savepoint for the Flink job. + * + * @param savePointName the savePointName value to set. + * @return the FlinkJobProfile object itself. + */ + public FlinkJobProfile withSavePointName(String savePointName) { + this.savePointName = savePointName; + return this; + } + + /** + * Get the upgradeMode property: A string property that indicates the upgrade mode to be performed on the Flink + * job. It can have one of the following enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. + * + * @return the upgradeMode value. + */ + public UpgradeMode upgradeMode() { + return this.upgradeMode; + } + + /** + * Set the upgradeMode property: A string property that indicates the upgrade mode to be performed on the Flink + * job. It can have one of the following enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. + * + * @param upgradeMode the upgradeMode value to set. + * @return the FlinkJobProfile object itself. + */ + public FlinkJobProfile withUpgradeMode(UpgradeMode upgradeMode) { + this.upgradeMode = upgradeMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (jobJarDirectory() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property jobJarDirectory in model FlinkJobProfile")); + } + if (jarName() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property jarName in model FlinkJobProfile")); + } + if (upgradeMode() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property upgradeMode in model FlinkJobProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(FlinkJobProfile.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProperties.java index 96efefa6e62ec..c8bd7e5b8c14e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkJobProperties.java @@ -5,22 +5,29 @@ package com.azure.resourcemanager.hdinsight.containers.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.Map; -/** Properties of flink job. */ +/** + * Properties of flink job. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") @JsonTypeName("FlinkJob") @Fluent public final class FlinkJobProperties extends ClusterJobProperties { + /* + * Run id of job + */ + @JsonProperty(value = "runId") + private String runId; + /* * Name of job */ - @JsonProperty(value = "jobName", required = true) + @JsonProperty(value = "jobName") private String jobName; /* @@ -99,13 +106,35 @@ public final class FlinkJobProperties extends ClusterJobProperties { @JsonProperty(value = "lastSavePoint", access = JsonProperty.Access.WRITE_ONLY) private String lastSavePoint; - /** Creates an instance of FlinkJobProperties class. */ + /** + * Creates an instance of FlinkJobProperties class. + */ public FlinkJobProperties() { } + /** + * Get the runId property: Run id of job. + * + * @return the runId value. + */ + public String runId() { + return this.runId; + } + + /** + * Set the runId property: Run id of job. + * + * @param runId the runId value to set. + * @return the FlinkJobProperties object itself. + */ + public FlinkJobProperties withRunId(String runId) { + this.runId = runId; + return this; + } + /** * Get the jobName property: Name of job. - * + * * @return the jobName value. */ public String jobName() { @@ -114,7 +143,7 @@ public String jobName() { /** * Set the jobName property: Name of job. - * + * * @param jobName the jobName value to set. * @return the FlinkJobProperties object itself. */ @@ -125,7 +154,7 @@ public FlinkJobProperties withJobName(String jobName) { /** * Get the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. - * + * * @return the jobJarDirectory value. */ public String jobJarDirectory() { @@ -134,7 +163,7 @@ public String jobJarDirectory() { /** * Set the jobJarDirectory property: A string property that specifies the directory where the job JAR is located. - * + * * @param jobJarDirectory the jobJarDirectory value to set. * @return the FlinkJobProperties object itself. */ @@ -145,7 +174,7 @@ public FlinkJobProperties withJobJarDirectory(String jobJarDirectory) { /** * Get the jarName property: A string property that represents the name of the job JAR. - * + * * @return the jarName value. */ public String jarName() { @@ -154,7 +183,7 @@ public String jarName() { /** * Set the jarName property: A string property that represents the name of the job JAR. - * + * * @param jarName the jarName value to set. * @return the FlinkJobProperties object itself. */ @@ -165,7 +194,7 @@ public FlinkJobProperties withJarName(String jarName) { /** * Get the entryClass property: A string property that specifies the entry class for the Flink job. - * + * * @return the entryClass value. */ public String entryClass() { @@ -174,7 +203,7 @@ public String entryClass() { /** * Set the entryClass property: A string property that specifies the entry class for the Flink job. - * + * * @param entryClass the entryClass value to set. * @return the FlinkJobProperties object itself. */ @@ -186,7 +215,7 @@ public FlinkJobProperties withEntryClass(String entryClass) { /** * Get the args property: A string property representing additional JVM arguments for the Flink job. It should be * space separated value. - * + * * @return the args value. */ public String args() { @@ -196,7 +225,7 @@ public String args() { /** * Set the args property: A string property representing additional JVM arguments for the Flink job. It should be * space separated value. - * + * * @param args the args value to set. * @return the FlinkJobProperties object itself. */ @@ -207,7 +236,7 @@ public FlinkJobProperties withArgs(String args) { /** * Get the savePointName property: A string property that represents the name of the savepoint for the Flink job. - * + * * @return the savePointName value. */ public String savePointName() { @@ -216,7 +245,7 @@ public String savePointName() { /** * Set the savePointName property: A string property that represents the name of the savepoint for the Flink job. - * + * * @param savePointName the savePointName value to set. * @return the FlinkJobProperties object itself. */ @@ -229,7 +258,7 @@ public FlinkJobProperties withSavePointName(String savePointName) { * Get the action property: A string property that indicates the action to be performed on the Flink job. It can * have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, * LIST_SAVEPOINT, or DELETE. - * + * * @return the action value. */ public Action action() { @@ -240,7 +269,7 @@ public Action action() { * Set the action property: A string property that indicates the action to be performed on the Flink job. It can * have one of the following enum values => NEW, UPDATE, STATELESS_UPDATE, STOP, START, CANCEL, SAVEPOINT, * LIST_SAVEPOINT, or DELETE. - * + * * @param action the action value to set. * @return the FlinkJobProperties object itself. */ @@ -253,7 +282,7 @@ public FlinkJobProperties withAction(Action action) { * Get the flinkConfiguration property: Additional properties used to configure Flink jobs. It allows users to set * properties such as parallelism and jobSavePointDirectory. It accepts additional key-value pairs as properties, * where the keys are strings and the values are strings as well. - * + * * @return the flinkConfiguration value. */ public Map flinkConfiguration() { @@ -264,7 +293,7 @@ public Map flinkConfiguration() { * Set the flinkConfiguration property: Additional properties used to configure Flink jobs. It allows users to set * properties such as parallelism and jobSavePointDirectory. It accepts additional key-value pairs as properties, * where the keys are strings and the values are strings as well. - * + * * @param flinkConfiguration the flinkConfiguration value to set. * @return the FlinkJobProperties object itself. */ @@ -275,7 +304,7 @@ public FlinkJobProperties withFlinkConfiguration(Map flinkConfig /** * Get the jobId property: Unique id for identifying a job. - * + * * @return the jobId value. */ public String jobId() { @@ -284,7 +313,7 @@ public String jobId() { /** * Get the status property: Status of job. - * + * * @return the status value. */ public String status() { @@ -293,7 +322,7 @@ public String status() { /** * Get the jobOutput property: Output of job. - * + * * @return the jobOutput value. */ public String jobOutput() { @@ -302,7 +331,7 @@ public String jobOutput() { /** * Get the actionResult property: Action result of job. - * + * * @return the actionResult value. */ public String actionResult() { @@ -311,7 +340,7 @@ public String actionResult() { /** * Get the lastSavePoint property: The last savepoint. - * + * * @return the lastSavePoint value. */ public String lastSavePoint() { @@ -320,18 +349,11 @@ public String lastSavePoint() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); - if (jobName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property jobName in model FlinkJobProperties")); - } } - - private static final ClientLogger LOGGER = new ClientLogger(FlinkJobProperties.class); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkProfile.java index 6b924e11da720..2ed0b2016e070 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkProfile.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Flink cluster profile. */ +/** + * The Flink cluster profile. + */ @Fluent public final class FlinkProfile { /* @@ -47,13 +49,29 @@ public final class FlinkProfile { @JsonProperty(value = "catalogOptions") private FlinkCatalogOptions catalogOptions; - /** Creates an instance of FlinkProfile class. */ + /* + * A string property that indicates the deployment mode of Flink cluster. It can have one of the following enum + * values => Application, Session. Default value is Session + */ + @JsonProperty(value = "deploymentMode") + private DeploymentMode deploymentMode; + + /* + * Job specifications for flink clusters in application deployment mode. The specification is immutable even if job + * properties are changed by calling the RunJob API, please use the ListJob API to get the latest job information. + */ + @JsonProperty(value = "jobSpec") + private FlinkJobProfile jobSpec; + + /** + * Creates an instance of FlinkProfile class. + */ public FlinkProfile() { } /** * Get the storage property: The storage profile. - * + * * @return the storage value. */ public FlinkStorageProfile storage() { @@ -62,7 +80,7 @@ public FlinkStorageProfile storage() { /** * Set the storage property: The storage profile. - * + * * @param storage the storage value to set. * @return the FlinkProfile object itself. */ @@ -73,7 +91,7 @@ public FlinkProfile withStorage(FlinkStorageProfile storage) { /** * Get the numReplicas property: The number of task managers. - * + * * @return the numReplicas value. */ public Integer numReplicas() { @@ -82,7 +100,7 @@ public Integer numReplicas() { /** * Set the numReplicas property: The number of task managers. - * + * * @param numReplicas the numReplicas value to set. * @return the FlinkProfile object itself. */ @@ -93,7 +111,7 @@ public FlinkProfile withNumReplicas(Integer numReplicas) { /** * Get the jobManager property: Job Manager container/ process CPU and memory requirements. - * + * * @return the jobManager value. */ public ComputeResourceDefinition jobManager() { @@ -102,7 +120,7 @@ public ComputeResourceDefinition jobManager() { /** * Set the jobManager property: Job Manager container/ process CPU and memory requirements. - * + * * @param jobManager the jobManager value to set. * @return the FlinkProfile object itself. */ @@ -113,7 +131,7 @@ public FlinkProfile withJobManager(ComputeResourceDefinition jobManager) { /** * Get the historyServer property: History Server container/ process CPU and memory requirements. - * + * * @return the historyServer value. */ public ComputeResourceDefinition historyServer() { @@ -122,7 +140,7 @@ public ComputeResourceDefinition historyServer() { /** * Set the historyServer property: History Server container/ process CPU and memory requirements. - * + * * @param historyServer the historyServer value to set. * @return the FlinkProfile object itself. */ @@ -133,7 +151,7 @@ public FlinkProfile withHistoryServer(ComputeResourceDefinition historyServer) { /** * Get the taskManager property: Task Manager container/ process CPU and memory requirements. - * + * * @return the taskManager value. */ public ComputeResourceDefinition taskManager() { @@ -142,7 +160,7 @@ public ComputeResourceDefinition taskManager() { /** * Set the taskManager property: Task Manager container/ process CPU and memory requirements. - * + * * @param taskManager the taskManager value to set. * @return the FlinkProfile object itself. */ @@ -153,7 +171,7 @@ public FlinkProfile withTaskManager(ComputeResourceDefinition taskManager) { /** * Get the catalogOptions property: Flink cluster catalog options. - * + * * @return the catalogOptions value. */ public FlinkCatalogOptions catalogOptions() { @@ -162,7 +180,7 @@ public FlinkCatalogOptions catalogOptions() { /** * Set the catalogOptions property: Flink cluster catalog options. - * + * * @param catalogOptions the catalogOptions value to set. * @return the FlinkProfile object itself. */ @@ -171,23 +189,67 @@ public FlinkProfile withCatalogOptions(FlinkCatalogOptions catalogOptions) { return this; } + /** + * Get the deploymentMode property: A string property that indicates the deployment mode of Flink cluster. It can + * have one of the following enum values => Application, Session. Default value is Session. + * + * @return the deploymentMode value. + */ + public DeploymentMode deploymentMode() { + return this.deploymentMode; + } + + /** + * Set the deploymentMode property: A string property that indicates the deployment mode of Flink cluster. It can + * have one of the following enum values => Application, Session. Default value is Session. + * + * @param deploymentMode the deploymentMode value to set. + * @return the FlinkProfile object itself. + */ + public FlinkProfile withDeploymentMode(DeploymentMode deploymentMode) { + this.deploymentMode = deploymentMode; + return this; + } + + /** + * Get the jobSpec property: Job specifications for flink clusters in application deployment mode. The + * specification is immutable even if job properties are changed by calling the RunJob API, please use the ListJob + * API to get the latest job information. + * + * @return the jobSpec value. + */ + public FlinkJobProfile jobSpec() { + return this.jobSpec; + } + + /** + * Set the jobSpec property: Job specifications for flink clusters in application deployment mode. The + * specification is immutable even if job properties are changed by calling the RunJob API, please use the ListJob + * API to get the latest job information. + * + * @param jobSpec the jobSpec value to set. + * @return the FlinkProfile object itself. + */ + public FlinkProfile withJobSpec(FlinkJobProfile jobSpec) { + this.jobSpec = jobSpec; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storage() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property storage in model FlinkProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property storage in model FlinkProfile")); } else { storage().validate(); } if (jobManager() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property jobManager in model FlinkProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property jobManager in model FlinkProfile")); } else { jobManager().validate(); } @@ -195,15 +257,17 @@ public void validate() { historyServer().validate(); } if (taskManager() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property taskManager in model FlinkProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property taskManager in model FlinkProfile")); } else { taskManager().validate(); } if (catalogOptions() != null) { catalogOptions().validate(); } + if (jobSpec() != null) { + jobSpec().validate(); + } } private static final ClientLogger LOGGER = new ClientLogger(FlinkProfile.class); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkStorageProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkStorageProfile.java index 2f26aa4c8ef37..10e24c81bffd1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkStorageProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/FlinkStorageProfile.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The storage profile. */ +/** + * The storage profile. + */ @Fluent public final class FlinkStorageProfile { /* @@ -23,13 +25,15 @@ public final class FlinkStorageProfile { @JsonProperty(value = "storagekey") private String storagekey; - /** Creates an instance of FlinkStorageProfile class. */ + /** + * Creates an instance of FlinkStorageProfile class. + */ public FlinkStorageProfile() { } /** * Get the storageUri property: Storage account uri which is used for savepoint and checkpoint state. - * + * * @return the storageUri value. */ public String storageUri() { @@ -38,7 +42,7 @@ public String storageUri() { /** * Set the storageUri property: Storage account uri which is used for savepoint and checkpoint state. - * + * * @param storageUri the storageUri value to set. * @return the FlinkStorageProfile object itself. */ @@ -49,7 +53,7 @@ public FlinkStorageProfile withStorageUri(String storageUri) { /** * Get the storagekey property: Storage key is only required for wasb(s) storage. - * + * * @return the storagekey value. */ public String storagekey() { @@ -58,7 +62,7 @@ public String storagekey() { /** * Set the storagekey property: Storage key is only required for wasb(s) storage. - * + * * @param storagekey the storagekey value to set. * @return the FlinkStorageProfile object itself. */ @@ -69,14 +73,13 @@ public FlinkStorageProfile withStoragekey(String storagekey) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (storageUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property storageUri in model FlinkStorageProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property storageUri in model FlinkStorageProfile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/HiveCatalogOption.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/HiveCatalogOption.java index dca0a208fd6af..701aa749c2093 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/HiveCatalogOption.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/HiveCatalogOption.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Hive Catalog Option. */ +/** + * Hive Catalog Option. + */ @Fluent public final class HiveCatalogOption { /* @@ -17,10 +19,18 @@ public final class HiveCatalogOption { @JsonProperty(value = "catalogName", required = true) private String catalogName; + /* + * The authentication mode to connect to your Hive metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and- + * authorization + */ + @JsonProperty(value = "metastoreDbConnectionAuthenticationMode") + private MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode; + /* * Secret reference name from secretsProfile.secrets containing password for database connection. */ - @JsonProperty(value = "metastoreDbConnectionPasswordSecret", required = true) + @JsonProperty(value = "metastoreDbConnectionPasswordSecret") private String metastoreDbConnectionPasswordSecret; /* @@ -32,7 +42,7 @@ public final class HiveCatalogOption { /* * User name for database connection. */ - @JsonProperty(value = "metastoreDbConnectionUserName", required = true) + @JsonProperty(value = "metastoreDbConnectionUserName") private String metastoreDbConnectionUsername; /* @@ -42,13 +52,15 @@ public final class HiveCatalogOption { @JsonProperty(value = "metastoreWarehouseDir", required = true) private String metastoreWarehouseDir; - /** Creates an instance of HiveCatalogOption class. */ + /** + * Creates an instance of HiveCatalogOption class. + */ public HiveCatalogOption() { } /** * Get the catalogName property: Name of trino catalog which should use specified hive metastore. - * + * * @return the catalogName value. */ public String catalogName() { @@ -57,7 +69,7 @@ public String catalogName() { /** * Set the catalogName property: Name of trino catalog which should use specified hive metastore. - * + * * @param catalogName the catalogName value to set. * @return the HiveCatalogOption object itself. */ @@ -66,10 +78,35 @@ public HiveCatalogOption withCatalogName(String catalogName) { return this; } + /** + * Get the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive + * metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + * + * @return the metastoreDbConnectionAuthenticationMode value. + */ + public MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode() { + return this.metastoreDbConnectionAuthenticationMode; + } + + /** + * Set the metastoreDbConnectionAuthenticationMode property: The authentication mode to connect to your Hive + * metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + * + * @param metastoreDbConnectionAuthenticationMode the metastoreDbConnectionAuthenticationMode value to set. + * @return the HiveCatalogOption object itself. + */ + public HiveCatalogOption withMetastoreDbConnectionAuthenticationMode( + MetastoreDbConnectionAuthenticationMode metastoreDbConnectionAuthenticationMode) { + this.metastoreDbConnectionAuthenticationMode = metastoreDbConnectionAuthenticationMode; + return this; + } + /** * Get the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets * containing password for database connection. - * + * * @return the metastoreDbConnectionPasswordSecret value. */ public String metastoreDbConnectionPasswordSecret() { @@ -79,7 +116,7 @@ public String metastoreDbConnectionPasswordSecret() { /** * Set the metastoreDbConnectionPasswordSecret property: Secret reference name from secretsProfile.secrets * containing password for database connection. - * + * * @param metastoreDbConnectionPasswordSecret the metastoreDbConnectionPasswordSecret value to set. * @return the HiveCatalogOption object itself. */ @@ -90,7 +127,7 @@ public HiveCatalogOption withMetastoreDbConnectionPasswordSecret(String metastor /** * Get the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * + * * @return the metastoreDbConnectionUrl value. */ public String metastoreDbConnectionUrl() { @@ -99,7 +136,7 @@ public String metastoreDbConnectionUrl() { /** * Set the metastoreDbConnectionUrl property: Connection string for hive metastore database. - * + * * @param metastoreDbConnectionUrl the metastoreDbConnectionUrl value to set. * @return the HiveCatalogOption object itself. */ @@ -110,7 +147,7 @@ public HiveCatalogOption withMetastoreDbConnectionUrl(String metastoreDbConnecti /** * Get the metastoreDbConnectionUsername property: User name for database connection. - * + * * @return the metastoreDbConnectionUsername value. */ public String metastoreDbConnectionUsername() { @@ -119,7 +156,7 @@ public String metastoreDbConnectionUsername() { /** * Set the metastoreDbConnectionUsername property: User name for database connection. - * + * * @param metastoreDbConnectionUsername the metastoreDbConnectionUsername value to set. * @return the HiveCatalogOption object itself. */ @@ -132,7 +169,7 @@ public HiveCatalogOption withMetastoreDbConnectionUsername(String metastoreDbCon * Get the metastoreWarehouseDir property: Metastore root directory URI, format: * abfs[s]://<container>@<account_name>.dfs.core.windows.net/<path>. More details: * https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction-abfs-uri. - * + * * @return the metastoreWarehouseDir value. */ public String metastoreWarehouseDir() { @@ -143,7 +180,7 @@ public String metastoreWarehouseDir() { * Set the metastoreWarehouseDir property: Metastore root directory URI, format: * abfs[s]://<container>@<account_name>.dfs.core.windows.net/<path>. More details: * https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-introduction-abfs-uri. - * + * * @param metastoreWarehouseDir the metastoreWarehouseDir value to set. * @return the HiveCatalogOption object itself. */ @@ -154,38 +191,21 @@ public HiveCatalogOption withMetastoreWarehouseDir(String metastoreWarehouseDir) /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (catalogName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property catalogName in model HiveCatalogOption")); - } - if (metastoreDbConnectionPasswordSecret() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property metastoreDbConnectionPasswordSecret in model HiveCatalogOption")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property catalogName in model HiveCatalogOption")); } if (metastoreDbConnectionUrl() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property metastoreDbConnectionUrl in model HiveCatalogOption")); - } - if (metastoreDbConnectionUsername() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property metastoreDbConnectionUsername in model HiveCatalogOption")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property metastoreDbConnectionUrl in model HiveCatalogOption")); } if (metastoreWarehouseDir() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property metastoreWarehouseDir in model HiveCatalogOption")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property metastoreWarehouseDir in model HiveCatalogOption")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IdentityProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IdentityProfile.java index d870c07d1f121..ed03b30988646 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IdentityProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/IdentityProfile.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Identity Profile with details of an MSI. */ +/** + * Identity Profile with details of an MSI. + */ @Fluent public class IdentityProfile { /* @@ -29,13 +31,15 @@ public class IdentityProfile { @JsonProperty(value = "msiObjectId", required = true) private String msiObjectId; - /** Creates an instance of IdentityProfile class. */ + /** + * Creates an instance of IdentityProfile class. + */ public IdentityProfile() { } /** * Get the msiResourceId property: ResourceId of the MSI. - * + * * @return the msiResourceId value. */ public String msiResourceId() { @@ -44,7 +48,7 @@ public String msiResourceId() { /** * Set the msiResourceId property: ResourceId of the MSI. - * + * * @param msiResourceId the msiResourceId value to set. * @return the IdentityProfile object itself. */ @@ -55,7 +59,7 @@ public IdentityProfile withMsiResourceId(String msiResourceId) { /** * Get the msiClientId property: ClientId of the MSI. - * + * * @return the msiClientId value. */ public String msiClientId() { @@ -64,7 +68,7 @@ public String msiClientId() { /** * Set the msiClientId property: ClientId of the MSI. - * + * * @param msiClientId the msiClientId value to set. * @return the IdentityProfile object itself. */ @@ -75,7 +79,7 @@ public IdentityProfile withMsiClientId(String msiClientId) { /** * Get the msiObjectId property: ObjectId of the MSI. - * + * * @return the msiObjectId value. */ public String msiObjectId() { @@ -84,7 +88,7 @@ public String msiObjectId() { /** * Set the msiObjectId property: ObjectId of the MSI. - * + * * @param msiObjectId the msiObjectId value to set. * @return the IdentityProfile object itself. */ @@ -95,24 +99,21 @@ public IdentityProfile withMsiObjectId(String msiObjectId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (msiResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property msiResourceId in model IdentityProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property msiResourceId in model IdentityProfile")); } if (msiClientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property msiClientId in model IdentityProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property msiClientId in model IdentityProfile")); } if (msiObjectId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property msiObjectId in model IdentityProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property msiObjectId in model IdentityProfile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/JobType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/JobType.java index 031ebe9f9327a..c93e0fa233742 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/JobType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/JobType.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of cluster job. */ +/** + * Type of cluster job. + */ public final class JobType extends ExpandableStringEnum { - /** Static value FlinkJob for JobType. */ + /** + * Static value FlinkJob for JobType. + */ public static final JobType FLINK_JOB = fromString("FlinkJob"); /** * Creates a new instance of JobType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public JobType() { /** * Creates or finds a JobType from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobType. */ @@ -35,7 +39,7 @@ public static JobType fromString(String name) { /** * Gets known JobType values. - * + * * @return known JobType values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaConnectivityEndpoints.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaConnectivityEndpoints.java new file mode 100644 index 0000000000000..84c825a7997dc --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaConnectivityEndpoints.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Kafka bootstrap server and broker related connectivity endpoints. + */ +@Fluent +public final class KafkaConnectivityEndpoints { + /* + * bootstrap server connectivity endpoint. + */ + @JsonProperty(value = "bootstrapServerEndpoint") + private String bootstrapServerEndpoint; + + /* + * Kafka broker endpoint list. + */ + @JsonProperty(value = "brokerEndpoints") + private List brokerEndpoints; + + /** + * Creates an instance of KafkaConnectivityEndpoints class. + */ + public KafkaConnectivityEndpoints() { + } + + /** + * Get the bootstrapServerEndpoint property: bootstrap server connectivity endpoint. + * + * @return the bootstrapServerEndpoint value. + */ + public String bootstrapServerEndpoint() { + return this.bootstrapServerEndpoint; + } + + /** + * Set the bootstrapServerEndpoint property: bootstrap server connectivity endpoint. + * + * @param bootstrapServerEndpoint the bootstrapServerEndpoint value to set. + * @return the KafkaConnectivityEndpoints object itself. + */ + public KafkaConnectivityEndpoints withBootstrapServerEndpoint(String bootstrapServerEndpoint) { + this.bootstrapServerEndpoint = bootstrapServerEndpoint; + return this; + } + + /** + * Get the brokerEndpoints property: Kafka broker endpoint list. + * + * @return the brokerEndpoints value. + */ + public List brokerEndpoints() { + return this.brokerEndpoints; + } + + /** + * Set the brokerEndpoints property: Kafka broker endpoint list. + * + * @param brokerEndpoints the brokerEndpoints value to set. + * @return the KafkaConnectivityEndpoints object itself. + */ + public KafkaConnectivityEndpoints withBrokerEndpoints(List brokerEndpoints) { + this.brokerEndpoints = brokerEndpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaProfile.java new file mode 100644 index 0000000000000..aa7967ba34818 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KafkaProfile.java @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Kafka cluster profile. + */ +@Fluent +public final class KafkaProfile { + /* + * Expose Kafka cluster in KRaft mode. + */ + @JsonProperty(value = "enableKRaft") + private Boolean enableKRaft; + + /* + * Expose worker nodes as public endpoints. + */ + @JsonProperty(value = "enablePublicEndpoints") + private Boolean enablePublicEndpoints; + + /* + * Fully qualified path of Azure Storage container used for Tiered Storage. + */ + @JsonProperty(value = "remoteStorageUri") + private String remoteStorageUri; + + /* + * Kafka disk storage profile. + */ + @JsonProperty(value = "diskStorage", required = true) + private DiskStorageProfile diskStorage; + + /* + * Identity of the internal service components inside the Kafka cluster. + */ + @JsonProperty(value = "clusterIdentity", access = JsonProperty.Access.WRITE_ONLY) + private IdentityProfile clusterIdentity; + + /* + * Kafka bootstrap server and brokers related connectivity endpoints. + */ + @JsonProperty(value = "connectivityEndpoints", access = JsonProperty.Access.WRITE_ONLY) + private KafkaConnectivityEndpoints connectivityEndpoints; + + /** + * Creates an instance of KafkaProfile class. + */ + public KafkaProfile() { + } + + /** + * Get the enableKRaft property: Expose Kafka cluster in KRaft mode. + * + * @return the enableKRaft value. + */ + public Boolean enableKRaft() { + return this.enableKRaft; + } + + /** + * Set the enableKRaft property: Expose Kafka cluster in KRaft mode. + * + * @param enableKRaft the enableKRaft value to set. + * @return the KafkaProfile object itself. + */ + public KafkaProfile withEnableKRaft(Boolean enableKRaft) { + this.enableKRaft = enableKRaft; + return this; + } + + /** + * Get the enablePublicEndpoints property: Expose worker nodes as public endpoints. + * + * @return the enablePublicEndpoints value. + */ + public Boolean enablePublicEndpoints() { + return this.enablePublicEndpoints; + } + + /** + * Set the enablePublicEndpoints property: Expose worker nodes as public endpoints. + * + * @param enablePublicEndpoints the enablePublicEndpoints value to set. + * @return the KafkaProfile object itself. + */ + public KafkaProfile withEnablePublicEndpoints(Boolean enablePublicEndpoints) { + this.enablePublicEndpoints = enablePublicEndpoints; + return this; + } + + /** + * Get the remoteStorageUri property: Fully qualified path of Azure Storage container used for Tiered Storage. + * + * @return the remoteStorageUri value. + */ + public String remoteStorageUri() { + return this.remoteStorageUri; + } + + /** + * Set the remoteStorageUri property: Fully qualified path of Azure Storage container used for Tiered Storage. + * + * @param remoteStorageUri the remoteStorageUri value to set. + * @return the KafkaProfile object itself. + */ + public KafkaProfile withRemoteStorageUri(String remoteStorageUri) { + this.remoteStorageUri = remoteStorageUri; + return this; + } + + /** + * Get the diskStorage property: Kafka disk storage profile. + * + * @return the diskStorage value. + */ + public DiskStorageProfile diskStorage() { + return this.diskStorage; + } + + /** + * Set the diskStorage property: Kafka disk storage profile. + * + * @param diskStorage the diskStorage value to set. + * @return the KafkaProfile object itself. + */ + public KafkaProfile withDiskStorage(DiskStorageProfile diskStorage) { + this.diskStorage = diskStorage; + return this; + } + + /** + * Get the clusterIdentity property: Identity of the internal service components inside the Kafka cluster. + * + * @return the clusterIdentity value. + */ + public IdentityProfile clusterIdentity() { + return this.clusterIdentity; + } + + /** + * Get the connectivityEndpoints property: Kafka bootstrap server and brokers related connectivity endpoints. + * + * @return the connectivityEndpoints value. + */ + public KafkaConnectivityEndpoints connectivityEndpoints() { + return this.connectivityEndpoints; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (diskStorage() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property diskStorage in model KafkaProfile")); + } else { + diskStorage().validate(); + } + if (clusterIdentity() != null) { + clusterIdentity().validate(); + } + if (connectivityEndpoints() != null) { + connectivityEndpoints().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(KafkaProfile.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KeyVaultObjectType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KeyVaultObjectType.java index 262d74df9c31c..00111cb4dc6d0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KeyVaultObjectType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/KeyVaultObjectType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of key vault object: secret, key or certificate. */ +/** + * Type of key vault object: secret, key or certificate. + */ public final class KeyVaultObjectType extends ExpandableStringEnum { - /** Static value Key for KeyVaultObjectType. */ + /** + * Static value Key for KeyVaultObjectType. + */ public static final KeyVaultObjectType KEY = fromString("Key"); - /** Static value Secret for KeyVaultObjectType. */ + /** + * Static value Secret for KeyVaultObjectType. + */ public static final KeyVaultObjectType SECRET = fromString("Secret"); - /** Static value Certificate for KeyVaultObjectType. */ + /** + * Static value Certificate for KeyVaultObjectType. + */ public static final KeyVaultObjectType CERTIFICATE = fromString("Certificate"); /** * Creates a new instance of KeyVaultObjectType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public KeyVaultObjectType() { /** * Creates or finds a KeyVaultObjectType from its string representation. - * + * * @param name a name to look for. * @return the corresponding KeyVaultObjectType. */ @@ -41,7 +49,7 @@ public static KeyVaultObjectType fromString(String name) { /** * Gets known KeyVaultObjectType values. - * + * * @return known KeyVaultObjectType values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LoadBasedConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LoadBasedConfig.java index 12b966a91912b..937be25ef40c4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LoadBasedConfig.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/LoadBasedConfig.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Profile of load based Autoscale. */ +/** + * Profile of load based Autoscale. + */ @Fluent public final class LoadBasedConfig { /* @@ -47,14 +49,16 @@ public final class LoadBasedConfig { @JsonProperty(value = "scalingRules", required = true) private List scalingRules; - /** Creates an instance of LoadBasedConfig class. */ + /** + * Creates an instance of LoadBasedConfig class. + */ public LoadBasedConfig() { } /** * Get the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * + * * @return the minNodes value. */ public int minNodes() { @@ -64,7 +68,7 @@ public int minNodes() { /** * Set the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * + * * @param minNodes the minNodes value to set. * @return the LoadBasedConfig object itself. */ @@ -76,7 +80,7 @@ public LoadBasedConfig withMinNodes(int minNodes) { /** * Get the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * + * * @return the maxNodes value. */ public int maxNodes() { @@ -86,7 +90,7 @@ public int maxNodes() { /** * Set the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based * scaling will use this to scale up and scale down between minimum and maximum number of nodes. - * + * * @param maxNodes the maxNodes value to set. * @return the LoadBasedConfig object itself. */ @@ -98,7 +102,7 @@ public LoadBasedConfig withMaxNodes(int maxNodes) { /** * Get the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after * which scaling metrics are polled for triggering a scaling operation. - * + * * @return the pollInterval value. */ public Integer pollInterval() { @@ -108,7 +112,7 @@ public Integer pollInterval() { /** * Set the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after * which scaling metrics are polled for triggering a scaling operation. - * + * * @param pollInterval the pollInterval value to set. * @return the LoadBasedConfig object itself. */ @@ -121,7 +125,7 @@ public LoadBasedConfig withPollInterval(Integer pollInterval) { * Get the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines * the amount of time that must elapse between a scaling activity started by a rule and the start of the next * scaling activity, regardless of the rule that triggers it. The default value is 300 seconds. - * + * * @return the cooldownPeriod value. */ public Integer cooldownPeriod() { @@ -132,7 +136,7 @@ public Integer cooldownPeriod() { * Set the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines * the amount of time that must elapse between a scaling activity started by a rule and the start of the next * scaling activity, regardless of the rule that triggers it. The default value is 300 seconds. - * + * * @param cooldownPeriod the cooldownPeriod value to set. * @return the LoadBasedConfig object itself. */ @@ -143,7 +147,7 @@ public LoadBasedConfig withCooldownPeriod(Integer cooldownPeriod) { /** * Get the scalingRules property: The scaling rules. - * + * * @return the scalingRules value. */ public List scalingRules() { @@ -152,7 +156,7 @@ public List scalingRules() { /** * Set the scalingRules property: The scaling rules. - * + * * @param scalingRules the scalingRules value to set. * @return the LoadBasedConfig object itself. */ @@ -163,14 +167,13 @@ public LoadBasedConfig withScalingRules(List scalingRules) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (scalingRules() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property scalingRules in model LoadBasedConfig")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property scalingRules in model LoadBasedConfig")); } else { scalingRules().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Locations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Locations.java index b6dbefa89059a..a8233fbe4794e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Locations.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Locations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Locations. */ +/** + * Resource collection API of Locations. + */ public interface Locations { /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -20,12 +22,12 @@ public interface Locations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of check name availability along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - String location, NameAvailabilityParameters nameAvailabilityParameters, Context context); + Response checkNameAvailabilityWithResponse(String location, + NameAvailabilityParameters nameAvailabilityParameters, Context context); /** * Check the availability of the resource name. - * + * * @param location The name of the Azure region. * @param nameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,6 +35,6 @@ Response checkNameAvailabilityWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of check name availability. */ - NameAvailabilityResult checkNameAvailability( - String location, NameAvailabilityParameters nameAvailabilityParameters); + NameAvailabilityResult checkNameAvailability(String location, + NameAvailabilityParameters nameAvailabilityParameters); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MetastoreDbConnectionAuthenticationMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MetastoreDbConnectionAuthenticationMode.java new file mode 100644 index 0000000000000..0e7f6e13fe88b --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/MetastoreDbConnectionAuthenticationMode.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The authentication mode to connect to your Hive metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + */ +public final class MetastoreDbConnectionAuthenticationMode + extends ExpandableStringEnum { + /** + * Static value SqlAuth for MetastoreDbConnectionAuthenticationMode. + */ + public static final MetastoreDbConnectionAuthenticationMode SQL_AUTH = fromString("SqlAuth"); + + /** + * Static value IdentityAuth for MetastoreDbConnectionAuthenticationMode. + */ + public static final MetastoreDbConnectionAuthenticationMode IDENTITY_AUTH = fromString("IdentityAuth"); + + /** + * Creates a new instance of MetastoreDbConnectionAuthenticationMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public MetastoreDbConnectionAuthenticationMode() { + } + + /** + * Creates or finds a MetastoreDbConnectionAuthenticationMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding MetastoreDbConnectionAuthenticationMode. + */ + @JsonCreator + public static MetastoreDbConnectionAuthenticationMode fromString(String name) { + return fromString(name, MetastoreDbConnectionAuthenticationMode.class); + } + + /** + * Gets known MetastoreDbConnectionAuthenticationMode values. + * + * @return known MetastoreDbConnectionAuthenticationMode values. + */ + public static Collection values() { + return values(MetastoreDbConnectionAuthenticationMode.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityParameters.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityParameters.java index 379c8b3a611dc..3633fbd66dc65 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityParameters.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityParameters.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Details of check name availability request body. */ +/** + * Details of check name availability request body. + */ @Fluent public final class NameAvailabilityParameters { /* @@ -22,13 +24,15 @@ public final class NameAvailabilityParameters { @JsonProperty(value = "type") private String type; - /** Creates an instance of NameAvailabilityParameters class. */ + /** + * Creates an instance of NameAvailabilityParameters class. + */ public NameAvailabilityParameters() { } /** * Get the name property: Name for checking availability. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: Name for checking availability. - * + * * @param name the name value to set. * @return the NameAvailabilityParameters object itself. */ @@ -48,7 +52,7 @@ public NameAvailabilityParameters withName(String name) { /** * Get the type property: The resource type in Microsoft.HDInsight. - * + * * @return the type value. */ public String type() { @@ -57,7 +61,7 @@ public String type() { /** * Set the type property: The resource type in Microsoft.HDInsight. - * + * * @param type the type value to set. * @return the NameAvailabilityParameters object itself. */ @@ -68,7 +72,7 @@ public NameAvailabilityParameters withType(String type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityResult.java index 23439bf581254..67b28e3b0ba73 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NameAvailabilityResult.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -/** An immutable client-side representation of NameAvailabilityResult. */ +/** + * An immutable client-side representation of NameAvailabilityResult. + */ public interface NameAvailabilityResult { /** * Gets the nameAvailable property: Indicator of availability of the Microsoft.HDInsight resource name. - * + * * @return the nameAvailable value. */ Boolean nameAvailable(); /** * Gets the reason property: The reason of unavailability. - * + * * @return the reason value. */ String reason(); /** * Gets the message property: The error message of unavailability. - * + * * @return the message value. */ String message(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner object. - * + * * @return the inner object. */ NameAvailabilityResultInner innerModel(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NodeProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NodeProfile.java index 0f437508976f7..58ef2fb4854d7 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NodeProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/NodeProfile.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The node profile. */ +/** + * The node profile. + */ @Fluent public final class NodeProfile { /* @@ -29,13 +31,15 @@ public final class NodeProfile { @JsonProperty(value = "count", required = true) private int count; - /** Creates an instance of NodeProfile class. */ + /** + * Creates an instance of NodeProfile class. + */ public NodeProfile() { } /** * Get the type property: The node type. - * + * * @return the type value. */ public String type() { @@ -44,7 +48,7 @@ public String type() { /** * Set the type property: The node type. - * + * * @param type the type value to set. * @return the NodeProfile object itself. */ @@ -55,7 +59,7 @@ public NodeProfile withType(String type) { /** * Get the vmSize property: The virtual machine SKU. - * + * * @return the vmSize value. */ public String vmSize() { @@ -64,7 +68,7 @@ public String vmSize() { /** * Set the vmSize property: The virtual machine SKU. - * + * * @param vmSize the vmSize value to set. * @return the NodeProfile object itself. */ @@ -75,7 +79,7 @@ public NodeProfile withVmSize(String vmSize) { /** * Get the count property: The number of virtual machines. - * + * * @return the count value. */ public int count() { @@ -84,7 +88,7 @@ public int count() { /** * Set the count property: The number of virtual machines. - * + * * @param count the count value to set. * @return the NodeProfile object itself. */ @@ -95,19 +99,17 @@ public NodeProfile withCount(int count) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model NodeProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model NodeProfile")); } if (vmSize() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property vmSize in model NodeProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property vmSize in model NodeProfile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operation.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operation.java index 501865e822622..6ff0303184798 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operation.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operation.java @@ -6,12 +6,14 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); @@ -19,14 +21,14 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,7 +36,7 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); @@ -42,14 +44,14 @@ public interface Operation { /** * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationDisplay.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationDisplay.java index 30e29476b2f13..561d7841b97a0 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationDisplay.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* @@ -37,14 +39,16 @@ public final class OperationDisplay { @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -54,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -64,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -74,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -83,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationListResult.java index 3f3e48ba24703..0eea4cce5a90e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OperationListResult.java @@ -10,8 +10,8 @@ import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set + * of results. */ @Immutable public final class OperationListResult { @@ -27,13 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of OperationListResult class. */ + /** + * Creates an instance of OperationListResult class. + */ public OperationListResult() { } /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -42,7 +44,7 @@ public List value() { /** * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * * @return the nextLink value. */ public String nextLink() { @@ -51,7 +53,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operations.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operations.java index 578356b82813d..31648e4e02254 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operations.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Operations.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Returns list of operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Origin.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Origin.java index b632e0321b441..75105959db47b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Origin.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Origin.java @@ -13,18 +13,24 @@ * is "user,system". */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); /** * Creates a new instance of Origin value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +39,7 @@ public Origin() { /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -44,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OutboundType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OutboundType.java new file mode 100644 index 0000000000000..c55dc3ed98738 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/OutboundType.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The outbound (egress) routing method. + * + * This can only be set at cluster pool creation time and cannot be changed later. + */ +public final class OutboundType extends ExpandableStringEnum { + /** + * Static value loadBalancer for OutboundType. + */ + public static final OutboundType LOAD_BALANCER = fromString("loadBalancer"); + + /** + * Static value userDefinedRouting for OutboundType. + */ + public static final OutboundType USER_DEFINED_ROUTING = fromString("userDefinedRouting"); + + /** + * Creates a new instance of OutboundType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OutboundType() { + } + + /** + * Creates or finds a OutboundType from its string representation. + * + * @param name a name to look for. + * @return the corresponding OutboundType. + */ + @JsonCreator + public static OutboundType fromString(String name) { + return fromString(name, OutboundType.class); + } + + /** + * Gets known OutboundType values. + * + * @return known OutboundType values. + */ + public static Collection values() { + return values(OutboundType.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ProvisioningStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ProvisioningStatus.java index 70c245ecbff72..e840ff79ca6c3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ProvisioningStatus.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ProvisioningStatus.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the resource. */ +/** + * Provisioning state of the resource. + */ public final class ProvisioningStatus extends ExpandableStringEnum { - /** Static value Accepted for ProvisioningStatus. */ + /** + * Static value Accepted for ProvisioningStatus. + */ public static final ProvisioningStatus ACCEPTED = fromString("Accepted"); - /** Static value Succeeded for ProvisioningStatus. */ + /** + * Static value Succeeded for ProvisioningStatus. + */ public static final ProvisioningStatus SUCCEEDED = fromString("Succeeded"); - /** Static value Canceled for ProvisioningStatus. */ + /** + * Static value Canceled for ProvisioningStatus. + */ public static final ProvisioningStatus CANCELED = fromString("Canceled"); - /** Static value Failed for ProvisioningStatus. */ + /** + * Static value Failed for ProvisioningStatus. + */ public static final ProvisioningStatus FAILED = fromString("Failed"); /** * Creates a new instance of ProvisioningStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public ProvisioningStatus() { /** * Creates or finds a ProvisioningStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningStatus. */ @@ -44,7 +54,7 @@ public static ProvisioningStatus fromString(String name) { /** * Gets known ProvisioningStatus values. - * + * * @return known ProvisioningStatus values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpec.java new file mode 100644 index 0000000000000..e9586af455cb7 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpec.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Specification for the Ranger Admin service. + */ +@Fluent +public final class RangerAdminSpec { + /* + * List of usernames that should be marked as ranger admins. These usernames should match the User principal name + * of the respective AAD users. + */ + @JsonProperty(value = "admins", required = true) + private List admins; + + /* + * The database property. + */ + @JsonProperty(value = "database", required = true) + private RangerAdminSpecDatabase database; + + /** + * Creates an instance of RangerAdminSpec class. + */ + public RangerAdminSpec() { + } + + /** + * Get the admins property: List of usernames that should be marked as ranger admins. These usernames should match + * the User principal name of the respective AAD users. + * + * @return the admins value. + */ + public List admins() { + return this.admins; + } + + /** + * Set the admins property: List of usernames that should be marked as ranger admins. These usernames should match + * the User principal name of the respective AAD users. + * + * @param admins the admins value to set. + * @return the RangerAdminSpec object itself. + */ + public RangerAdminSpec withAdmins(List admins) { + this.admins = admins; + return this; + } + + /** + * Get the database property: The database property. + * + * @return the database value. + */ + public RangerAdminSpecDatabase database() { + return this.database; + } + + /** + * Set the database property: The database property. + * + * @param database the database value to set. + * @return the RangerAdminSpec object itself. + */ + public RangerAdminSpec withDatabase(RangerAdminSpecDatabase database) { + this.database = database; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (admins() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property admins in model RangerAdminSpec")); + } + if (database() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property database in model RangerAdminSpec")); + } else { + database().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RangerAdminSpec.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpecDatabase.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpecDatabase.java new file mode 100644 index 0000000000000..2843e156d7bf8 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAdminSpecDatabase.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The RangerAdminSpecDatabase model. + */ +@Fluent +public final class RangerAdminSpecDatabase { + /* + * The database URL + */ + @JsonProperty(value = "host", required = true) + private String host; + + /* + * The database name + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Reference for the database password + */ + @JsonProperty(value = "passwordSecretRef") + private String passwordSecretRef; + + /* + * The name of the database user + */ + @JsonProperty(value = "username") + private String username; + + /** + * Creates an instance of RangerAdminSpecDatabase class. + */ + public RangerAdminSpecDatabase() { + } + + /** + * Get the host property: The database URL. + * + * @return the host value. + */ + public String host() { + return this.host; + } + + /** + * Set the host property: The database URL. + * + * @param host the host value to set. + * @return the RangerAdminSpecDatabase object itself. + */ + public RangerAdminSpecDatabase withHost(String host) { + this.host = host; + return this; + } + + /** + * Get the name property: The database name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The database name. + * + * @param name the name value to set. + * @return the RangerAdminSpecDatabase object itself. + */ + public RangerAdminSpecDatabase withName(String name) { + this.name = name; + return this; + } + + /** + * Get the passwordSecretRef property: Reference for the database password. + * + * @return the passwordSecretRef value. + */ + public String passwordSecretRef() { + return this.passwordSecretRef; + } + + /** + * Set the passwordSecretRef property: Reference for the database password. + * + * @param passwordSecretRef the passwordSecretRef value to set. + * @return the RangerAdminSpecDatabase object itself. + */ + public RangerAdminSpecDatabase withPasswordSecretRef(String passwordSecretRef) { + this.passwordSecretRef = passwordSecretRef; + return this; + } + + /** + * Get the username property: The name of the database user. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The name of the database user. + * + * @param username the username value to set. + * @return the RangerAdminSpecDatabase object itself. + */ + public RangerAdminSpecDatabase withUsername(String username) { + this.username = username; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (host() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property host in model RangerAdminSpecDatabase")); + } + if (name() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model RangerAdminSpecDatabase")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RangerAdminSpecDatabase.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAuditSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAuditSpec.java new file mode 100644 index 0000000000000..f85be4b757729 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerAuditSpec.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties required to describe audit log storage. + */ +@Fluent +public final class RangerAuditSpec { + /* + * Azure storage location of the blobs. MSI should have read/write access to this Storage account. + */ + @JsonProperty(value = "storageAccount") + private String storageAccount; + + /** + * Creates an instance of RangerAuditSpec class. + */ + public RangerAuditSpec() { + } + + /** + * Get the storageAccount property: Azure storage location of the blobs. MSI should have read/write access to this + * Storage account. + * + * @return the storageAccount value. + */ + public String storageAccount() { + return this.storageAccount; + } + + /** + * Set the storageAccount property: Azure storage location of the blobs. MSI should have read/write access to this + * Storage account. + * + * @param storageAccount the storageAccount value to set. + * @return the RangerAuditSpec object itself. + */ + public RangerAuditSpec withStorageAccount(String storageAccount) { + this.storageAccount = storageAccount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerProfile.java new file mode 100644 index 0000000000000..a775be5f0bedc --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerProfile.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ranger cluster profile. + */ +@Fluent +public final class RangerProfile { + /* + * Specification for the Ranger Admin service. + */ + @JsonProperty(value = "rangerAdmin", required = true) + private RangerAdminSpec rangerAdmin; + + /* + * Properties required to describe audit log storage. + */ + @JsonProperty(value = "rangerAudit") + private RangerAuditSpec rangerAudit; + + /* + * Specification for the Ranger Usersync service + */ + @JsonProperty(value = "rangerUsersync", required = true) + private RangerUsersyncSpec rangerUsersync; + + /** + * Creates an instance of RangerProfile class. + */ + public RangerProfile() { + } + + /** + * Get the rangerAdmin property: Specification for the Ranger Admin service. + * + * @return the rangerAdmin value. + */ + public RangerAdminSpec rangerAdmin() { + return this.rangerAdmin; + } + + /** + * Set the rangerAdmin property: Specification for the Ranger Admin service. + * + * @param rangerAdmin the rangerAdmin value to set. + * @return the RangerProfile object itself. + */ + public RangerProfile withRangerAdmin(RangerAdminSpec rangerAdmin) { + this.rangerAdmin = rangerAdmin; + return this; + } + + /** + * Get the rangerAudit property: Properties required to describe audit log storage. + * + * @return the rangerAudit value. + */ + public RangerAuditSpec rangerAudit() { + return this.rangerAudit; + } + + /** + * Set the rangerAudit property: Properties required to describe audit log storage. + * + * @param rangerAudit the rangerAudit value to set. + * @return the RangerProfile object itself. + */ + public RangerProfile withRangerAudit(RangerAuditSpec rangerAudit) { + this.rangerAudit = rangerAudit; + return this; + } + + /** + * Get the rangerUsersync property: Specification for the Ranger Usersync service. + * + * @return the rangerUsersync value. + */ + public RangerUsersyncSpec rangerUsersync() { + return this.rangerUsersync; + } + + /** + * Set the rangerUsersync property: Specification for the Ranger Usersync service. + * + * @param rangerUsersync the rangerUsersync value to set. + * @return the RangerProfile object itself. + */ + public RangerProfile withRangerUsersync(RangerUsersyncSpec rangerUsersync) { + this.rangerUsersync = rangerUsersync; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rangerAdmin() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property rangerAdmin in model RangerProfile")); + } else { + rangerAdmin().validate(); + } + if (rangerAudit() != null) { + rangerAudit().validate(); + } + if (rangerUsersync() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property rangerUsersync in model RangerProfile")); + } else { + rangerUsersync().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(RangerProfile.class); +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncMode.java new file mode 100644 index 0000000000000..beaabda440301 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncMode.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * User & groups can be synced automatically or via a static list that's refreshed. + */ +public final class RangerUsersyncMode extends ExpandableStringEnum { + /** + * Static value static for RangerUsersyncMode. + */ + public static final RangerUsersyncMode STATIC = fromString("static"); + + /** + * Static value automatic for RangerUsersyncMode. + */ + public static final RangerUsersyncMode AUTOMATIC = fromString("automatic"); + + /** + * Creates a new instance of RangerUsersyncMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RangerUsersyncMode() { + } + + /** + * Creates or finds a RangerUsersyncMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding RangerUsersyncMode. + */ + @JsonCreator + public static RangerUsersyncMode fromString(String name) { + return fromString(name, RangerUsersyncMode.class); + } + + /** + * Gets known RangerUsersyncMode values. + * + * @return known RangerUsersyncMode values. + */ + public static Collection values() { + return values(RangerUsersyncMode.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncSpec.java new file mode 100644 index 0000000000000..76577cbf9b360 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/RangerUsersyncSpec.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Specification for the Ranger Usersync service. + */ +@Fluent +public final class RangerUsersyncSpec { + /* + * Denotes whether usersync service should be enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * List of groups that should be synced. These group names should match the object id of the respective AAD groups. + */ + @JsonProperty(value = "groups") + private List groups; + + /* + * User & groups can be synced automatically or via a static list that's refreshed. + */ + @JsonProperty(value = "mode") + private RangerUsersyncMode mode; + + /* + * Azure storage location of a mapping file that lists user & group associations. + */ + @JsonProperty(value = "userMappingLocation") + private String userMappingLocation; + + /* + * List of user names that should be synced. These usernames should match the User principal name of the respective + * AAD users. + */ + @JsonProperty(value = "users") + private List users; + + /** + * Creates an instance of RangerUsersyncSpec class. + */ + public RangerUsersyncSpec() { + } + + /** + * Get the enabled property: Denotes whether usersync service should be enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Denotes whether usersync service should be enabled. + * + * @param enabled the enabled value to set. + * @return the RangerUsersyncSpec object itself. + */ + public RangerUsersyncSpec withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the groups property: List of groups that should be synced. These group names should match the object id of + * the respective AAD groups. + * + * @return the groups value. + */ + public List groups() { + return this.groups; + } + + /** + * Set the groups property: List of groups that should be synced. These group names should match the object id of + * the respective AAD groups. + * + * @param groups the groups value to set. + * @return the RangerUsersyncSpec object itself. + */ + public RangerUsersyncSpec withGroups(List groups) { + this.groups = groups; + return this; + } + + /** + * Get the mode property: User & groups can be synced automatically or via a static list that's refreshed. + * + * @return the mode value. + */ + public RangerUsersyncMode mode() { + return this.mode; + } + + /** + * Set the mode property: User & groups can be synced automatically or via a static list that's refreshed. + * + * @param mode the mode value to set. + * @return the RangerUsersyncSpec object itself. + */ + public RangerUsersyncSpec withMode(RangerUsersyncMode mode) { + this.mode = mode; + return this; + } + + /** + * Get the userMappingLocation property: Azure storage location of a mapping file that lists user & group + * associations. + * + * @return the userMappingLocation value. + */ + public String userMappingLocation() { + return this.userMappingLocation; + } + + /** + * Set the userMappingLocation property: Azure storage location of a mapping file that lists user & group + * associations. + * + * @param userMappingLocation the userMappingLocation value to set. + * @return the RangerUsersyncSpec object itself. + */ + public RangerUsersyncSpec withUserMappingLocation(String userMappingLocation) { + this.userMappingLocation = userMappingLocation; + return this; + } + + /** + * Get the users property: List of user names that should be synced. These usernames should match the User + * principal name of the respective AAD users. + * + * @return the users value. + */ + public List users() { + return this.users; + } + + /** + * Set the users property: List of user names that should be synced. These usernames should match the User + * principal name of the respective AAD users. + * + * @param users the users value to set. + * @return the RangerUsersyncSpec object itself. + */ + public RangerUsersyncSpec withUsers(List users) { + this.users = users; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScaleActionType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScaleActionType.java index b1398060f47ad..818d38d930bdf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScaleActionType.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScaleActionType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The action type. */ +/** + * The action type. + */ public final class ScaleActionType extends ExpandableStringEnum { - /** Static value scaleup for ScaleActionType. */ + /** + * Static value scaleup for ScaleActionType. + */ public static final ScaleActionType SCALEUP = fromString("scaleup"); - /** Static value scaledown for ScaleActionType. */ + /** + * Static value scaledown for ScaleActionType. + */ public static final ScaleActionType SCALEDOWN = fromString("scaledown"); /** * Creates a new instance of ScaleActionType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ScaleActionType() { /** * Creates or finds a ScaleActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScaleActionType. */ @@ -38,7 +44,7 @@ public static ScaleActionType fromString(String name) { /** * Gets known ScaleActionType values. - * + * * @return known ScaleActionType values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScalingRule.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScalingRule.java index 4d8bbbce4cc83..8227878c64d16 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScalingRule.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScalingRule.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The scaling rule. */ +/** + * The scaling rule. + */ @Fluent public final class ScalingRule { /* @@ -36,13 +38,15 @@ public final class ScalingRule { @JsonProperty(value = "comparisonRule", required = true) private ComparisonRule comparisonRule; - /** Creates an instance of ScalingRule class. */ + /** + * Creates an instance of ScalingRule class. + */ public ScalingRule() { } /** * Get the actionType property: The action type. - * + * * @return the actionType value. */ public ScaleActionType actionType() { @@ -51,7 +55,7 @@ public ScaleActionType actionType() { /** * Set the actionType property: The action type. - * + * * @param actionType the actionType value to set. * @return the ScalingRule object itself. */ @@ -63,7 +67,7 @@ public ScalingRule withActionType(ScaleActionType actionType) { /** * Get the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a * trigger condition should be successful, before scaling activity is triggered. - * + * * @return the evaluationCount value. */ public int evaluationCount() { @@ -73,7 +77,7 @@ public int evaluationCount() { /** * Set the evaluationCount property: This is an evaluation count for a scaling condition, the number of times a * trigger condition should be successful, before scaling activity is triggered. - * + * * @param evaluationCount the evaluationCount value to set. * @return the ScalingRule object itself. */ @@ -84,7 +88,7 @@ public ScalingRule withEvaluationCount(int evaluationCount) { /** * Get the scalingMetric property: Metrics name for individual workloads. For example: cpu. - * + * * @return the scalingMetric value. */ public String scalingMetric() { @@ -93,7 +97,7 @@ public String scalingMetric() { /** * Set the scalingMetric property: Metrics name for individual workloads. For example: cpu. - * + * * @param scalingMetric the scalingMetric value to set. * @return the ScalingRule object itself. */ @@ -104,7 +108,7 @@ public ScalingRule withScalingMetric(String scalingMetric) { /** * Get the comparisonRule property: The comparison rule. - * + * * @return the comparisonRule value. */ public ComparisonRule comparisonRule() { @@ -113,7 +117,7 @@ public ComparisonRule comparisonRule() { /** * Set the comparisonRule property: The comparison rule. - * + * * @param comparisonRule the comparisonRule value to set. * @return the ScalingRule object itself. */ @@ -124,24 +128,21 @@ public ScalingRule withComparisonRule(ComparisonRule comparisonRule) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (actionType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property actionType in model ScalingRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property actionType in model ScalingRule")); } if (scalingMetric() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property scalingMetric in model ScalingRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property scalingMetric in model ScalingRule")); } if (comparisonRule() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property comparisonRule in model ScalingRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property comparisonRule in model ScalingRule")); } else { comparisonRule().validate(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Schedule.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Schedule.java index d40fd7cfce764..cdf23c24b8fa9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Schedule.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Schedule.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Schedule definition. */ +/** + * Schedule definition. + */ @Fluent public final class Schedule { /* @@ -37,14 +39,16 @@ public final class Schedule { @JsonProperty(value = "days", required = true) private List days; - /** Creates an instance of Schedule class. */ + /** + * Creates an instance of Schedule class. + */ public Schedule() { } /** * Get the startTime property: User has to set the start time of current schedule configuration, format like 10:30 * (HH:MM). - * + * * @return the startTime value. */ public String startTime() { @@ -54,7 +58,7 @@ public String startTime() { /** * Set the startTime property: User has to set the start time of current schedule configuration, format like 10:30 * (HH:MM). - * + * * @param startTime the startTime value to set. * @return the Schedule object itself. */ @@ -66,7 +70,7 @@ public Schedule withStartTime(String startTime) { /** * Get the endTime property: User has to set the end time of current schedule configuration, format like 10:30 * (HH:MM). - * + * * @return the endTime value. */ public String endTime() { @@ -76,7 +80,7 @@ public String endTime() { /** * Set the endTime property: User has to set the end time of current schedule configuration, format like 10:30 * (HH:MM). - * + * * @param endTime the endTime value to set. * @return the Schedule object itself. */ @@ -88,7 +92,7 @@ public Schedule withEndTime(String endTime) { /** * Get the count property: User has to set the node count anticipated at end of the scaling operation of the set * current schedule configuration, format is integer. - * + * * @return the count value. */ public int count() { @@ -98,7 +102,7 @@ public int count() { /** * Set the count property: User has to set the node count anticipated at end of the scaling operation of the set * current schedule configuration, format is integer. - * + * * @param count the count value to set. * @return the Schedule object itself. */ @@ -109,7 +113,7 @@ public Schedule withCount(int count) { /** * Get the days property: User has to set the days where schedule has to be set for autoscale operation. - * + * * @return the days value. */ public List days() { @@ -118,7 +122,7 @@ public List days() { /** * Set the days property: User has to set the days where schedule has to be set for autoscale operation. - * + * * @param days the days value to set. * @return the Schedule object itself. */ @@ -129,19 +133,17 @@ public Schedule withDays(List days) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (startTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property startTime in model Schedule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property startTime in model Schedule")); } if (endTime() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property endTime in model Schedule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property endTime in model Schedule")); } if (days() == null) { throw LOGGER diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleBasedConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleBasedConfig.java index 1378d6f949ff7..24de52ef8dbc1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleBasedConfig.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleBasedConfig.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Profile of schedule based Autoscale. */ +/** + * Profile of schedule based Autoscale. + */ @Fluent public final class ScheduleBasedConfig { /* @@ -32,14 +34,16 @@ public final class ScheduleBasedConfig { @JsonProperty(value = "schedules", required = true) private List schedules; - /** Creates an instance of ScheduleBasedConfig class. */ + /** + * Creates an instance of ScheduleBasedConfig class. + */ public ScheduleBasedConfig() { } /** * Get the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule * based autoscale configuration. - * + * * @return the timeZone value. */ public String timeZone() { @@ -49,7 +53,7 @@ public String timeZone() { /** * Set the timeZone property: User has to specify the timezone on which the schedule has to be set for schedule * based autoscale configuration. - * + * * @param timeZone the timeZone value to set. * @return the ScheduleBasedConfig object itself. */ @@ -62,7 +66,7 @@ public ScheduleBasedConfig withTimeZone(String timeZone) { * Get the defaultCount property: Setting default node count of current schedule configuration. Default node count * specifies the number of nodes which are default when an specified scaling operation is executed (scale up/scale * down). - * + * * @return the defaultCount value. */ public int defaultCount() { @@ -73,7 +77,7 @@ public int defaultCount() { * Set the defaultCount property: Setting default node count of current schedule configuration. Default node count * specifies the number of nodes which are default when an specified scaling operation is executed (scale up/scale * down). - * + * * @param defaultCount the defaultCount value to set. * @return the ScheduleBasedConfig object itself. */ @@ -85,7 +89,7 @@ public ScheduleBasedConfig withDefaultCount(int defaultCount) { /** * Get the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user * has a choice to set multiple rules within the schedule across days and times (start/end). - * + * * @return the schedules value. */ public List schedules() { @@ -95,7 +99,7 @@ public List schedules() { /** * Set the schedules property: This specifies the schedules where scheduled based Autoscale to be enabled, the user * has a choice to set multiple rules within the schedule across days and times (start/end). - * + * * @param schedules the schedules value to set. * @return the ScheduleBasedConfig object itself. */ @@ -106,19 +110,17 @@ public ScheduleBasedConfig withSchedules(List schedules) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (timeZone() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property timeZone in model ScheduleBasedConfig")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property timeZone in model ScheduleBasedConfig")); } if (schedules() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property schedules in model ScheduleBasedConfig")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property schedules in model ScheduleBasedConfig")); } else { schedules().forEach(e -> e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleDay.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleDay.java index 7ab1a65502be0..a4d9b55d4f1bb 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleDay.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScheduleDay.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScheduleDay. */ +/** + * Defines values for ScheduleDay. + */ public final class ScheduleDay extends ExpandableStringEnum { - /** Static value Sunday for ScheduleDay. */ + /** + * Static value Sunday for ScheduleDay. + */ public static final ScheduleDay SUNDAY = fromString("Sunday"); - /** Static value Monday for ScheduleDay. */ + /** + * Static value Monday for ScheduleDay. + */ public static final ScheduleDay MONDAY = fromString("Monday"); - /** Static value Tuesday for ScheduleDay. */ + /** + * Static value Tuesday for ScheduleDay. + */ public static final ScheduleDay TUESDAY = fromString("Tuesday"); - /** Static value Wednesday for ScheduleDay. */ + /** + * Static value Wednesday for ScheduleDay. + */ public static final ScheduleDay WEDNESDAY = fromString("Wednesday"); - /** Static value Thursday for ScheduleDay. */ + /** + * Static value Thursday for ScheduleDay. + */ public static final ScheduleDay THURSDAY = fromString("Thursday"); - /** Static value Friday for ScheduleDay. */ + /** + * Static value Friday for ScheduleDay. + */ public static final ScheduleDay FRIDAY = fromString("Friday"); - /** Static value Saturday for ScheduleDay. */ + /** + * Static value Saturday for ScheduleDay. + */ public static final ScheduleDay SATURDAY = fromString("Saturday"); /** * Creates a new instance of ScheduleDay value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public ScheduleDay() { /** * Creates or finds a ScheduleDay from its string representation. - * + * * @param name a name to look for. * @return the corresponding ScheduleDay. */ @@ -53,7 +69,7 @@ public static ScheduleDay fromString(String name) { /** * Gets known ScheduleDay values. - * + * * @return known ScheduleDay values. */ public static Collection values() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScriptActionProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScriptActionProfile.java index 68cfd85459f9e..1df02de6c9120 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScriptActionProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ScriptActionProfile.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The script action profile. */ +/** + * The script action profile. + */ @Fluent public final class ScriptActionProfile { /* @@ -55,13 +57,15 @@ public final class ScriptActionProfile { @JsonProperty(value = "shouldPersist") private Boolean shouldPersist; - /** Creates an instance of ScriptActionProfile class. */ + /** + * Creates an instance of ScriptActionProfile class. + */ public ScriptActionProfile() { } /** * Get the type property: Type of the script action. Supported type is bash scripts. - * + * * @return the type value. */ public String type() { @@ -70,7 +74,7 @@ public String type() { /** * Set the type property: Type of the script action. Supported type is bash scripts. - * + * * @param type the type value to set. * @return the ScriptActionProfile object itself. */ @@ -81,7 +85,7 @@ public ScriptActionProfile withType(String type) { /** * Get the name property: Script name. - * + * * @return the name value. */ public String name() { @@ -90,7 +94,7 @@ public String name() { /** * Set the name property: Script name. - * + * * @param name the name value to set. * @return the ScriptActionProfile object itself. */ @@ -101,7 +105,7 @@ public ScriptActionProfile withName(String name) { /** * Get the url property: Url of the script file. - * + * * @return the url value. */ public String url() { @@ -110,7 +114,7 @@ public String url() { /** * Set the url property: Url of the script file. - * + * * @param url the url value to set. * @return the ScriptActionProfile object itself. */ @@ -122,7 +126,7 @@ public ScriptActionProfile withUrl(String url) { /** * Get the parameters property: Additional parameters for the script action. It should be space-separated list of * arguments required for script execution. - * + * * @return the parameters value. */ public String parameters() { @@ -132,7 +136,7 @@ public String parameters() { /** * Set the parameters property: Additional parameters for the script action. It should be space-separated list of * arguments required for script execution. - * + * * @param parameters the parameters value to set. * @return the ScriptActionProfile object itself. */ @@ -143,7 +147,7 @@ public ScriptActionProfile withParameters(String parameters) { /** * Get the services property: List of services to apply the script action. - * + * * @return the services value. */ public List services() { @@ -152,7 +156,7 @@ public List services() { /** * Set the services property: List of services to apply the script action. - * + * * @param services the services value to set. * @return the ScriptActionProfile object itself. */ @@ -163,7 +167,7 @@ public ScriptActionProfile withServices(List services) { /** * Get the timeoutInMinutes property: Timeout duration for the script action in minutes. - * + * * @return the timeoutInMinutes value. */ public Integer timeoutInMinutes() { @@ -172,7 +176,7 @@ public Integer timeoutInMinutes() { /** * Set the timeoutInMinutes property: Timeout duration for the script action in minutes. - * + * * @param timeoutInMinutes the timeoutInMinutes value to set. * @return the ScriptActionProfile object itself. */ @@ -183,7 +187,7 @@ public ScriptActionProfile withTimeoutInMinutes(Integer timeoutInMinutes) { /** * Get the shouldPersist property: Specify if the script should persist on the cluster. - * + * * @return the shouldPersist value. */ public Boolean shouldPersist() { @@ -192,7 +196,7 @@ public Boolean shouldPersist() { /** * Set the shouldPersist property: Specify if the script should persist on the cluster. - * + * * @param shouldPersist the shouldPersist value to set. * @return the ScriptActionProfile object itself. */ @@ -203,29 +207,25 @@ public ScriptActionProfile withShouldPersist(Boolean shouldPersist) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model ScriptActionProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ScriptActionProfile")); } if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model ScriptActionProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model ScriptActionProfile")); } if (url() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property url in model ScriptActionProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property url in model ScriptActionProfile")); } if (services() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property services in model ScriptActionProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property services in model ScriptActionProfile")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretReference.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretReference.java index c6707352ed601..dd1c844af9abf 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretReference.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretReference.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Secret reference and corresponding properties of a key vault secret. */ +/** + * Secret reference and corresponding properties of a key vault secret. + */ @Fluent public final class SecretReference { /* @@ -35,13 +37,15 @@ public final class SecretReference { @JsonProperty(value = "keyVaultObjectName", required = true) private String keyVaultObjectName; - /** Creates an instance of SecretReference class. */ + /** + * Creates an instance of SecretReference class. + */ public SecretReference() { } /** * Get the referenceName property: Reference name of the secret to be used in service configs. - * + * * @return the referenceName value. */ public String referenceName() { @@ -50,7 +54,7 @@ public String referenceName() { /** * Set the referenceName property: Reference name of the secret to be used in service configs. - * + * * @param referenceName the referenceName value to set. * @return the SecretReference object itself. */ @@ -61,7 +65,7 @@ public SecretReference withReferenceName(String referenceName) { /** * Get the type property: Type of key vault object: secret, key or certificate. - * + * * @return the type value. */ public KeyVaultObjectType type() { @@ -70,7 +74,7 @@ public KeyVaultObjectType type() { /** * Set the type property: Type of key vault object: secret, key or certificate. - * + * * @param type the type value to set. * @return the SecretReference object itself. */ @@ -81,7 +85,7 @@ public SecretReference withType(KeyVaultObjectType type) { /** * Get the version property: Version of the secret in key vault. - * + * * @return the version value. */ public String version() { @@ -90,7 +94,7 @@ public String version() { /** * Set the version property: Version of the secret in key vault. - * + * * @param version the version value to set. * @return the SecretReference object itself. */ @@ -101,7 +105,7 @@ public SecretReference withVersion(String version) { /** * Get the keyVaultObjectName property: Object identifier name of the secret in key vault. - * + * * @return the keyVaultObjectName value. */ public String keyVaultObjectName() { @@ -110,7 +114,7 @@ public String keyVaultObjectName() { /** * Set the keyVaultObjectName property: Object identifier name of the secret in key vault. - * + * * @param keyVaultObjectName the keyVaultObjectName value to set. * @return the SecretReference object itself. */ @@ -121,25 +125,21 @@ public SecretReference withKeyVaultObjectName(String keyVaultObjectName) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (referenceName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property referenceName in model SecretReference")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property referenceName in model SecretReference")); } if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model SecretReference")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property type in model SecretReference")); } if (keyVaultObjectName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultObjectName in model SecretReference")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyVaultObjectName in model SecretReference")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretsProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretsProfile.java index 331e2471f1b8a..aa7e3267e38a1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretsProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SecretsProfile.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The cluster secret profile. */ +/** + * The cluster secret profile. + */ @Fluent public final class SecretsProfile { /* @@ -24,14 +26,16 @@ public final class SecretsProfile { @JsonProperty(value = "secrets") private List secrets; - /** Creates an instance of SecretsProfile class. */ + /** + * Creates an instance of SecretsProfile class. + */ public SecretsProfile() { } /** * Get the keyVaultResourceId property: Name of the user Key Vault where all the cluster specific user secrets are * stored. - * + * * @return the keyVaultResourceId value. */ public String keyVaultResourceId() { @@ -41,7 +45,7 @@ public String keyVaultResourceId() { /** * Set the keyVaultResourceId property: Name of the user Key Vault where all the cluster specific user secrets are * stored. - * + * * @param keyVaultResourceId the keyVaultResourceId value to set. * @return the SecretsProfile object itself. */ @@ -52,7 +56,7 @@ public SecretsProfile withKeyVaultResourceId(String keyVaultResourceId) { /** * Get the secrets property: Properties of Key Vault secret. - * + * * @return the secrets value. */ public List secrets() { @@ -61,7 +65,7 @@ public List secrets() { /** * Set the secrets property: Properties of Key Vault secret. - * + * * @param secrets the secrets value to set. * @return the SecretsProfile object itself. */ @@ -72,15 +76,13 @@ public SecretsProfile withSecrets(List secrets) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (keyVaultResourceId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultResourceId in model SecretsProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property keyVaultResourceId in model SecretsProfile")); } if (secrets() != null) { secrets().forEach(e -> e.validate()); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResult.java index 4b06fa61ea8c0..9871425603c8c 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster instance service configs api response. */ +/** + * Cluster instance service configs api response. + */ @Fluent public final class ServiceConfigListResult { /* @@ -24,13 +26,15 @@ public final class ServiceConfigListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ServiceConfigListResult class. */ + /** + * Creates an instance of ServiceConfigListResult class. + */ public ServiceConfigListResult() { } /** * Get the value property: Cluster instance service config array. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Cluster instance service config array. - * + * * @param value the value value to set. * @return the ServiceConfigListResult object itself. */ @@ -50,7 +54,7 @@ public ServiceConfigListResult withValue(List value) { /** * Get the nextLink property: The link (url) to the next page of results. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultProperties.java index 5519e0c87c002..beacc7dee5e6f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultProperties.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultProperties.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Service config response. */ +/** + * Service config response. + */ @Fluent public class ServiceConfigListResultProperties { /* @@ -63,13 +65,15 @@ public class ServiceConfigListResultProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map defaultKeys; - /** Creates an instance of ServiceConfigListResultProperties class. */ + /** + * Creates an instance of ServiceConfigListResultProperties class. + */ public ServiceConfigListResultProperties() { } /** * Get the serviceName property: Service Config Name. - * + * * @return the serviceName value. */ public String serviceName() { @@ -78,7 +82,7 @@ public String serviceName() { /** * Set the serviceName property: Service Config Name. - * + * * @param serviceName the serviceName value to set. * @return the ServiceConfigListResultProperties object itself. */ @@ -89,7 +93,7 @@ public ServiceConfigListResultProperties withServiceName(String serviceName) { /** * Get the fileName property: File Name. - * + * * @return the fileName value. */ public String fileName() { @@ -98,7 +102,7 @@ public String fileName() { /** * Set the fileName property: File Name. - * + * * @param fileName the fileName value to set. * @return the ServiceConfigListResultProperties object itself. */ @@ -109,7 +113,7 @@ public ServiceConfigListResultProperties withFileName(String fileName) { /** * Get the content property: Content in the service config file. - * + * * @return the content value. */ public String content() { @@ -118,7 +122,7 @@ public String content() { /** * Set the content property: Content in the service config file. - * + * * @param content the content value to set. * @return the ServiceConfigListResultProperties object itself. */ @@ -129,7 +133,7 @@ public ServiceConfigListResultProperties withContent(String content) { /** * Get the componentName property: Component Name. - * + * * @return the componentName value. */ public String componentName() { @@ -138,7 +142,7 @@ public String componentName() { /** * Set the componentName property: Component Name. - * + * * @param componentName the componentName value to set. * @return the ServiceConfigListResultProperties object itself. */ @@ -149,7 +153,7 @@ public ServiceConfigListResultProperties withComponentName(String componentName) /** * Get the type property: Config type. - * + * * @return the type value. */ public String type() { @@ -158,7 +162,7 @@ public String type() { /** * Set the type property: Config type. - * + * * @param type the type value to set. * @return the ServiceConfigListResultProperties object itself. */ @@ -169,7 +173,7 @@ public ServiceConfigListResultProperties withType(String type) { /** * Get the path property: Config file path. - * + * * @return the path value. */ public String path() { @@ -178,7 +182,7 @@ public String path() { /** * Set the path property: Config file path. - * + * * @param path the path value to set. * @return the ServiceConfigListResultProperties object itself. */ @@ -189,7 +193,7 @@ public ServiceConfigListResultProperties withPath(String path) { /** * Get the customKeys property: The custom keys. - * + * * @return the customKeys value. */ public Map customKeys() { @@ -198,7 +202,7 @@ public Map customKeys() { /** * Set the customKeys property: The custom keys. - * + * * @param customKeys the customKeys value to set. * @return the ServiceConfigListResultProperties object itself. */ @@ -209,7 +213,7 @@ public ServiceConfigListResultProperties withCustomKeys(Map cust /** * Get the defaultKeys property: The default keys. - * + * * @return the defaultKeys value. */ public Map defaultKeys() { @@ -218,49 +222,40 @@ public Map defaultKeys() { /** * Set the defaultKeys property: The default keys. - * + * * @param defaultKeys the defaultKeys value to set. * @return the ServiceConfigListResultProperties object itself. */ - public ServiceConfigListResultProperties withDefaultKeys( - Map defaultKeys) { + public ServiceConfigListResultProperties + withDefaultKeys(Map defaultKeys) { this.defaultKeys = defaultKeys; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (serviceName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serviceName in model ServiceConfigListResultProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property serviceName in model ServiceConfigListResultProperties")); } if (fileName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property fileName in model ServiceConfigListResultProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property fileName in model ServiceConfigListResultProperties")); } if (componentName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property componentName in model ServiceConfigListResultProperties")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property componentName in model ServiceConfigListResultProperties")); } if (defaultKeys() != null) { - defaultKeys() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + defaultKeys().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultValueEntity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultValueEntity.java index 469fc5f7d87b5..d252c9da5221a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultValueEntity.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigListResultValueEntity.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Default config details. */ +/** + * Default config details. + */ @Fluent public final class ServiceConfigListResultValueEntity { /* @@ -23,13 +25,15 @@ public final class ServiceConfigListResultValueEntity { @JsonProperty(value = "description") private String description; - /** Creates an instance of ServiceConfigListResultValueEntity class. */ + /** + * Creates an instance of ServiceConfigListResultValueEntity class. + */ public ServiceConfigListResultValueEntity() { } /** * Get the value property: Config value. - * + * * @return the value value. */ public String value() { @@ -38,7 +42,7 @@ public String value() { /** * Set the value property: Config value. - * + * * @param value the value value to set. * @return the ServiceConfigListResultValueEntity object itself. */ @@ -49,7 +53,7 @@ public ServiceConfigListResultValueEntity withValue(String value) { /** * Get the description property: Config description. - * + * * @return the description value. */ public String description() { @@ -58,7 +62,7 @@ public String description() { /** * Set the description property: Config description. - * + * * @param description the description value to set. * @return the ServiceConfigListResultValueEntity object itself. */ @@ -69,15 +73,13 @@ public ServiceConfigListResultValueEntity withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ServiceConfigListResultValueEntity")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model ServiceConfigListResultValueEntity")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResult.java index 15b4224548dfe..5fd9818cc3760 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResult.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceConfigResult.java @@ -7,67 +7,69 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner; import java.util.Map; -/** An immutable client-side representation of ServiceConfigResult. */ +/** + * An immutable client-side representation of ServiceConfigResult. + */ public interface ServiceConfigResult { /** * Gets the serviceName property: Service Config Name. - * + * * @return the serviceName value. */ String serviceName(); /** * Gets the fileName property: File Name. - * + * * @return the fileName value. */ String fileName(); /** * Gets the content property: Content in the service config file. - * + * * @return the content value. */ String content(); /** * Gets the componentName property: Component Name. - * + * * @return the componentName value. */ String componentName(); /** * Gets the type property: Config type. - * + * * @return the type value. */ String type(); /** * Gets the path property: Config file path. - * + * * @return the path value. */ String path(); /** * Gets the customKeys property: The custom keys. - * + * * @return the customKeys value. */ Map customKeys(); /** * Gets the defaultKeys property: The default keys. - * + * * @return the defaultKeys value. */ Map defaultKeys(); /** * Gets the inner com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner object. - * + * * @return the inner object. */ ServiceConfigResultInner innerModel(); diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceStatus.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceStatus.java index 5450745b2169a..95173725a01a4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceStatus.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ServiceStatus.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Describes the status of a service of a HDInsight on aks cluster. */ +/** + * Describes the status of a service of a HDInsight on AKS cluster. + */ @Fluent public final class ServiceStatus { /* @@ -29,13 +31,15 @@ public final class ServiceStatus { @JsonProperty(value = "message") private String message; - /** Creates an instance of ServiceStatus class. */ + /** + * Creates an instance of ServiceStatus class. + */ public ServiceStatus() { } /** * Get the kind property: Kind of the service. E.g. "Zookeeper". - * + * * @return the kind value. */ public String kind() { @@ -44,7 +48,7 @@ public String kind() { /** * Set the kind property: Kind of the service. E.g. "Zookeeper". - * + * * @param kind the kind value to set. * @return the ServiceStatus object itself. */ @@ -56,7 +60,7 @@ public ServiceStatus withKind(String kind) { /** * Get the ready property: Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or * anything else. - * + * * @return the ready value. */ public String ready() { @@ -66,7 +70,7 @@ public String ready() { /** * Set the ready property: Indicates if the service is ready / healthy. Values can be "true", "false", "unknown" or * anything else. - * + * * @param ready the ready value to set. * @return the ServiceStatus object itself. */ @@ -77,7 +81,7 @@ public ServiceStatus withReady(String ready) { /** * Get the message property: A message describing the error if any. - * + * * @return the message value. */ public String message() { @@ -86,7 +90,7 @@ public String message() { /** * Set the message property: A message describing the error if any. - * + * * @param message the message value to set. * @return the ServiceStatus object itself. */ @@ -97,19 +101,17 @@ public ServiceStatus withMessage(String message) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (kind() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model ServiceStatus")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property kind in model ServiceStatus")); } if (ready() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property ready in model ServiceStatus")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property ready in model ServiceStatus")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Severity.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Severity.java new file mode 100644 index 0000000000000..52b695ddaeb71 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Severity.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Severity of this upgrade. + */ +public final class Severity extends ExpandableStringEnum { + /** + * Static value low for Severity. + */ + public static final Severity LOW = fromString("low"); + + /** + * Static value medium for Severity. + */ + public static final Severity MEDIUM = fromString("medium"); + + /** + * Static value high for Severity. + */ + public static final Severity HIGH = fromString("high"); + + /** + * Static value critical for Severity. + */ + public static final Severity CRITICAL = fromString("critical"); + + /** + * Creates a new instance of Severity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Severity() { + } + + /** + * Creates or finds a Severity from its string representation. + * + * @param name a name to look for. + * @return the corresponding Severity. + */ + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); + } + + /** + * Gets known Severity values. + * + * @return known Severity values. + */ + public static Collection values() { + return values(Severity.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkMetastoreSpec.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkMetastoreSpec.java index 1d583bd68b97e..112d1b3f96ad5 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkMetastoreSpec.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkMetastoreSpec.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** The metastore specification for Spark cluster. */ +/** + * The metastore specification for Spark cluster. + */ @Fluent public final class SparkMetastoreSpec { /* @@ -23,22 +25,30 @@ public final class SparkMetastoreSpec { @JsonProperty(value = "dbName", required = true) private String dbName; + /* + * The authentication mode to connect to your Hive metastore database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and- + * authorization + */ + @JsonProperty(value = "dbConnectionAuthenticationMode") + private DbConnectionAuthenticationMode dbConnectionAuthenticationMode; + /* * The database user name. */ - @JsonProperty(value = "dbUserName", required = true) + @JsonProperty(value = "dbUserName") private String dbUsername; /* * The secret name which contains the database user password. */ - @JsonProperty(value = "dbPasswordSecretName", required = true) + @JsonProperty(value = "dbPasswordSecretName") private String dbPasswordSecretName; /* * The key vault resource id. */ - @JsonProperty(value = "keyVaultId", required = true) + @JsonProperty(value = "keyVaultId") private String keyVaultId; /* @@ -47,13 +57,15 @@ public final class SparkMetastoreSpec { @JsonProperty(value = "thriftUrl") private String thriftUrl; - /** Creates an instance of SparkMetastoreSpec class. */ + /** + * Creates an instance of SparkMetastoreSpec class. + */ public SparkMetastoreSpec() { } /** * Get the dbServerHost property: The database server host. - * + * * @return the dbServerHost value. */ public String dbServerHost() { @@ -62,7 +74,7 @@ public String dbServerHost() { /** * Set the dbServerHost property: The database server host. - * + * * @param dbServerHost the dbServerHost value to set. * @return the SparkMetastoreSpec object itself. */ @@ -73,7 +85,7 @@ public SparkMetastoreSpec withDbServerHost(String dbServerHost) { /** * Get the dbName property: The database name. - * + * * @return the dbName value. */ public String dbName() { @@ -82,7 +94,7 @@ public String dbName() { /** * Set the dbName property: The database name. - * + * * @param dbName the dbName value to set. * @return the SparkMetastoreSpec object itself. */ @@ -91,9 +103,34 @@ public SparkMetastoreSpec withDbName(String dbName) { return this; } + /** + * Get the dbConnectionAuthenticationMode property: The authentication mode to connect to your Hive metastore + * database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + * + * @return the dbConnectionAuthenticationMode value. + */ + public DbConnectionAuthenticationMode dbConnectionAuthenticationMode() { + return this.dbConnectionAuthenticationMode; + } + + /** + * Set the dbConnectionAuthenticationMode property: The authentication mode to connect to your Hive metastore + * database. More details: + * https://learn.microsoft.com/en-us/azure/azure-sql/database/logins-create-manage?view=azuresql#authentication-and-authorization. + * + * @param dbConnectionAuthenticationMode the dbConnectionAuthenticationMode value to set. + * @return the SparkMetastoreSpec object itself. + */ + public SparkMetastoreSpec + withDbConnectionAuthenticationMode(DbConnectionAuthenticationMode dbConnectionAuthenticationMode) { + this.dbConnectionAuthenticationMode = dbConnectionAuthenticationMode; + return this; + } + /** * Get the dbUsername property: The database user name. - * + * * @return the dbUsername value. */ public String dbUsername() { @@ -102,7 +139,7 @@ public String dbUsername() { /** * Set the dbUsername property: The database user name. - * + * * @param dbUsername the dbUsername value to set. * @return the SparkMetastoreSpec object itself. */ @@ -113,7 +150,7 @@ public SparkMetastoreSpec withDbUsername(String dbUsername) { /** * Get the dbPasswordSecretName property: The secret name which contains the database user password. - * + * * @return the dbPasswordSecretName value. */ public String dbPasswordSecretName() { @@ -122,7 +159,7 @@ public String dbPasswordSecretName() { /** * Set the dbPasswordSecretName property: The secret name which contains the database user password. - * + * * @param dbPasswordSecretName the dbPasswordSecretName value to set. * @return the SparkMetastoreSpec object itself. */ @@ -133,7 +170,7 @@ public SparkMetastoreSpec withDbPasswordSecretName(String dbPasswordSecretName) /** * Get the keyVaultId property: The key vault resource id. - * + * * @return the keyVaultId value. */ public String keyVaultId() { @@ -142,7 +179,7 @@ public String keyVaultId() { /** * Set the keyVaultId property: The key vault resource id. - * + * * @param keyVaultId the keyVaultId value to set. * @return the SparkMetastoreSpec object itself. */ @@ -153,7 +190,7 @@ public SparkMetastoreSpec withKeyVaultId(String keyVaultId) { /** * Get the thriftUrl property: The thrift url. - * + * * @return the thriftUrl value. */ public String thriftUrl() { @@ -162,7 +199,7 @@ public String thriftUrl() { /** * Set the thriftUrl property: The thrift url. - * + * * @param thriftUrl the thriftUrl value to set. * @return the SparkMetastoreSpec object itself. */ @@ -173,35 +210,17 @@ public SparkMetastoreSpec withThriftUrl(String thriftUrl) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (dbServerHost() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dbServerHost in model SparkMetastoreSpec")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dbServerHost in model SparkMetastoreSpec")); } if (dbName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dbName in model SparkMetastoreSpec")); - } - if (dbUsername() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dbUsername in model SparkMetastoreSpec")); - } - if (dbPasswordSecretName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dbPasswordSecretName in model SparkMetastoreSpec")); - } - if (keyVaultId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property keyVaultId in model SparkMetastoreSpec")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property dbName in model SparkMetastoreSpec")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkProfile.java index 5f4ba6bfcd0a4..9c23ffde15380 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The spark cluster profile. */ +/** + * The spark cluster profile. + */ @Fluent public final class SparkProfile { /* @@ -28,13 +30,15 @@ public final class SparkProfile { @JsonProperty(value = "userPluginsSpec") private SparkUserPlugins userPluginsSpec; - /** Creates an instance of SparkProfile class. */ + /** + * Creates an instance of SparkProfile class. + */ public SparkProfile() { } /** * Get the defaultStorageUrl property: The default storage URL. - * + * * @return the defaultStorageUrl value. */ public String defaultStorageUrl() { @@ -43,7 +47,7 @@ public String defaultStorageUrl() { /** * Set the defaultStorageUrl property: The default storage URL. - * + * * @param defaultStorageUrl the defaultStorageUrl value to set. * @return the SparkProfile object itself. */ @@ -54,7 +58,7 @@ public SparkProfile withDefaultStorageUrl(String defaultStorageUrl) { /** * Get the metastoreSpec property: The metastore specification for Spark cluster. - * + * * @return the metastoreSpec value. */ public SparkMetastoreSpec metastoreSpec() { @@ -63,7 +67,7 @@ public SparkMetastoreSpec metastoreSpec() { /** * Set the metastoreSpec property: The metastore specification for Spark cluster. - * + * * @param metastoreSpec the metastoreSpec value to set. * @return the SparkProfile object itself. */ @@ -74,7 +78,7 @@ public SparkProfile withMetastoreSpec(SparkMetastoreSpec metastoreSpec) { /** * Get the userPluginsSpec property: Spark user plugins spec. - * + * * @return the userPluginsSpec value. */ public SparkUserPlugins userPluginsSpec() { @@ -83,7 +87,7 @@ public SparkUserPlugins userPluginsSpec() { /** * Set the userPluginsSpec property: Spark user plugins spec. - * + * * @param userPluginsSpec the userPluginsSpec value to set. * @return the SparkProfile object itself. */ @@ -94,7 +98,7 @@ public SparkProfile withUserPluginsSpec(SparkUserPlugins userPluginsSpec) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugin.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugin.java index ff2b3833f0562..82e160520b121 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugin.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugin.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Spark user plugin. */ +/** + * Spark user plugin. + */ @Fluent public final class SparkUserPlugin { /* @@ -17,13 +19,15 @@ public final class SparkUserPlugin { @JsonProperty(value = "path", required = true) private String path; - /** Creates an instance of SparkUserPlugin class. */ + /** + * Creates an instance of SparkUserPlugin class. + */ public SparkUserPlugin() { } /** * Get the path property: Fully qualified path to the folder containing the plugins. - * + * * @return the path value. */ public String path() { @@ -32,7 +36,7 @@ public String path() { /** * Set the path property: Fully qualified path to the folder containing the plugins. - * + * * @param path the path value to set. * @return the SparkUserPlugin object itself. */ @@ -43,14 +47,13 @@ public SparkUserPlugin withPath(String path) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (path() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property path in model SparkUserPlugin")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property path in model SparkUserPlugin")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugins.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugins.java index 7f7b6c6905d1d..018925c7af77b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugins.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SparkUserPlugins.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Spark user plugins spec. */ +/** + * Spark user plugins spec. + */ @Fluent public final class SparkUserPlugins { /* @@ -17,13 +19,15 @@ public final class SparkUserPlugins { @JsonProperty(value = "plugins") private List plugins; - /** Creates an instance of SparkUserPlugins class. */ + /** + * Creates an instance of SparkUserPlugins class. + */ public SparkUserPlugins() { } /** * Get the plugins property: Spark user plugins. - * + * * @return the plugins value. */ public List plugins() { @@ -32,7 +36,7 @@ public List plugins() { /** * Set the plugins property: Spark user plugins. - * + * * @param plugins the plugins value to set. * @return the SparkUserPlugins object itself. */ @@ -43,7 +47,7 @@ public SparkUserPlugins withPlugins(List plugins) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshConnectivityEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshConnectivityEndpoint.java index 7a18c15b45b0c..0a6057db47e6e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshConnectivityEndpoint.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshConnectivityEndpoint.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** SSH connectivity endpoint details. */ +/** + * SSH connectivity endpoint details. + */ @Fluent public final class SshConnectivityEndpoint { /* @@ -17,13 +19,21 @@ public final class SshConnectivityEndpoint { @JsonProperty(value = "endpoint", required = true) private String endpoint; - /** Creates an instance of SshConnectivityEndpoint class. */ + /* + * Private SSH connectivity endpoint. This property will only be returned when enableInternalIngress is true. + */ + @JsonProperty(value = "privateSshEndpoint") + private String privateSshEndpoint; + + /** + * Creates an instance of SshConnectivityEndpoint class. + */ public SshConnectivityEndpoint() { } /** * Get the endpoint property: SSH connectivity endpoint. - * + * * @return the endpoint value. */ public String endpoint() { @@ -32,7 +42,7 @@ public String endpoint() { /** * Set the endpoint property: SSH connectivity endpoint. - * + * * @param endpoint the endpoint value to set. * @return the SshConnectivityEndpoint object itself. */ @@ -41,17 +51,37 @@ public SshConnectivityEndpoint withEndpoint(String endpoint) { return this; } + /** + * Get the privateSshEndpoint property: Private SSH connectivity endpoint. This property will only be returned when + * enableInternalIngress is true. + * + * @return the privateSshEndpoint value. + */ + public String privateSshEndpoint() { + return this.privateSshEndpoint; + } + + /** + * Set the privateSshEndpoint property: Private SSH connectivity endpoint. This property will only be returned when + * enableInternalIngress is true. + * + * @param privateSshEndpoint the privateSshEndpoint value to set. + * @return the SshConnectivityEndpoint object itself. + */ + public SshConnectivityEndpoint withPrivateSshEndpoint(String privateSshEndpoint) { + this.privateSshEndpoint = privateSshEndpoint; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (endpoint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endpoint in model SshConnectivityEndpoint")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property endpoint in model SshConnectivityEndpoint")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshProfile.java index 5111c04bf1d08..c7690c7d055b4 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/SshProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Ssh profile for the cluster. */ +/** + * Ssh profile for the cluster. + */ @Fluent public final class SshProfile { /* @@ -23,13 +25,15 @@ public final class SshProfile { @JsonProperty(value = "podPrefix", access = JsonProperty.Access.WRITE_ONLY) private String podPrefix; - /** Creates an instance of SshProfile class. */ + /** + * Creates an instance of SshProfile class. + */ public SshProfile() { } /** * Get the count property: Number of ssh pods per cluster. - * + * * @return the count value. */ public int count() { @@ -38,7 +42,7 @@ public int count() { /** * Set the count property: Number of ssh pods per cluster. - * + * * @param count the count value to set. * @return the SshProfile object itself. */ @@ -50,7 +54,7 @@ public SshProfile withCount(int count) { /** * Get the podPrefix property: Prefix of the pod names. Pod number will be appended to the prefix. The ingress URLs * for the pods will be available at <clusterFqdn>/<sshBasePath>/<prefix>-<number>. - * + * * @return the podPrefix value. */ public String podPrefix() { @@ -59,7 +63,7 @@ public String podPrefix() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TagsObject.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TagsObject.java index 6a156905e1384..4bcaa8302779d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TagsObject.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TagsObject.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Tags object for patch operations. */ +/** + * Tags object for patch operations. + */ @Fluent public final class TagsObject { /* @@ -19,13 +21,15 @@ public final class TagsObject { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of TagsObject class. */ + /** + * Creates an instance of TagsObject class. + */ public TagsObject() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the TagsObject object itself. */ @@ -45,7 +49,7 @@ public TagsObject withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoCoordinator.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoCoordinator.java index dafcd582d2b0b..ae95e36b44ce9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoCoordinator.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoCoordinator.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.TrinoDebugConfig; import com.fasterxml.jackson.annotation.JsonProperty; -/** Trino Coordinator. */ +/** + * Trino Coordinator. + */ @Fluent public final class TrinoCoordinator { /* @@ -24,13 +26,15 @@ public final class TrinoCoordinator { @JsonProperty(value = "highAvailabilityEnabled") private Boolean highAvailabilityEnabled; - /** Creates an instance of TrinoCoordinator class. */ + /** + * Creates an instance of TrinoCoordinator class. + */ public TrinoCoordinator() { } /** * Get the innerDebug property: Trino debug configuration. - * + * * @return the innerDebug value. */ private TrinoDebugConfig innerDebug() { @@ -40,7 +44,7 @@ private TrinoDebugConfig innerDebug() { /** * Get the highAvailabilityEnabled property: The flag that if enable coordinator HA, uses multiple coordinator * replicas with auto failover, one per each head node. Default: true. - * + * * @return the highAvailabilityEnabled value. */ public Boolean highAvailabilityEnabled() { @@ -50,7 +54,7 @@ public Boolean highAvailabilityEnabled() { /** * Set the highAvailabilityEnabled property: The flag that if enable coordinator HA, uses multiple coordinator * replicas with auto failover, one per each head node. Default: true. - * + * * @param highAvailabilityEnabled the highAvailabilityEnabled value to set. * @return the TrinoCoordinator object itself. */ @@ -61,7 +65,7 @@ public TrinoCoordinator withHighAvailabilityEnabled(Boolean highAvailabilityEnab /** * Get the enable property: The flag that if enable debug or not. - * + * * @return the enable value. */ public Boolean enable() { @@ -70,7 +74,7 @@ public Boolean enable() { /** * Set the enable property: The flag that if enable debug or not. - * + * * @param enable the enable value to set. * @return the TrinoCoordinator object itself. */ @@ -84,7 +88,7 @@ public TrinoCoordinator withEnable(Boolean enable) { /** * Get the port property: The debug port. - * + * * @return the port value. */ public Integer port() { @@ -93,7 +97,7 @@ public Integer port() { /** * Set the port property: The debug port. - * + * * @param port the port value to set. * @return the TrinoCoordinator object itself. */ @@ -107,7 +111,7 @@ public TrinoCoordinator withPort(Integer port) { /** * Get the suspend property: The flag that if suspend debug or not. - * + * * @return the suspend value. */ public Boolean suspend() { @@ -116,7 +120,7 @@ public Boolean suspend() { /** * Set the suspend property: The flag that if suspend debug or not. - * + * * @param suspend the suspend value to set. * @return the TrinoCoordinator object itself. */ @@ -130,7 +134,7 @@ public TrinoCoordinator withSuspend(Boolean suspend) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoProfile.java index 0d2d54e53641b..24da05ec73971 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoProfile.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Trino Cluster profile. */ +/** + * Trino Cluster profile. + */ @Fluent public final class TrinoProfile { /* @@ -40,13 +42,15 @@ public final class TrinoProfile { @JsonProperty(value = "worker") private TrinoWorker worker; - /** Creates an instance of TrinoProfile class. */ + /** + * Creates an instance of TrinoProfile class. + */ public TrinoProfile() { } /** * Get the catalogOptions property: Trino cluster catalog options. - * + * * @return the catalogOptions value. */ public CatalogOptions catalogOptions() { @@ -55,7 +59,7 @@ public CatalogOptions catalogOptions() { /** * Set the catalogOptions property: Trino cluster catalog options. - * + * * @param catalogOptions the catalogOptions value to set. * @return the TrinoProfile object itself. */ @@ -66,7 +70,7 @@ public TrinoProfile withCatalogOptions(CatalogOptions catalogOptions) { /** * Get the coordinator property: Trino Coordinator. - * + * * @return the coordinator value. */ public TrinoCoordinator coordinator() { @@ -75,7 +79,7 @@ public TrinoCoordinator coordinator() { /** * Set the coordinator property: Trino Coordinator. - * + * * @param coordinator the coordinator value to set. * @return the TrinoProfile object itself. */ @@ -86,7 +90,7 @@ public TrinoProfile withCoordinator(TrinoCoordinator coordinator) { /** * Get the userPluginsSpec property: Trino user plugins spec. - * + * * @return the userPluginsSpec value. */ public TrinoUserPlugins userPluginsSpec() { @@ -95,7 +99,7 @@ public TrinoUserPlugins userPluginsSpec() { /** * Set the userPluginsSpec property: Trino user plugins spec. - * + * * @param userPluginsSpec the userPluginsSpec value to set. * @return the TrinoProfile object itself. */ @@ -106,7 +110,7 @@ public TrinoProfile withUserPluginsSpec(TrinoUserPlugins userPluginsSpec) { /** * Get the userTelemetrySpec property: User telemetry. - * + * * @return the userTelemetrySpec value. */ public TrinoUserTelemetry userTelemetrySpec() { @@ -115,7 +119,7 @@ public TrinoUserTelemetry userTelemetrySpec() { /** * Set the userTelemetrySpec property: User telemetry. - * + * * @param userTelemetrySpec the userTelemetrySpec value to set. * @return the TrinoProfile object itself. */ @@ -126,7 +130,7 @@ public TrinoProfile withUserTelemetrySpec(TrinoUserTelemetry userTelemetrySpec) /** * Get the worker property: Trino worker. - * + * * @return the worker value. */ public TrinoWorker worker() { @@ -135,7 +139,7 @@ public TrinoWorker worker() { /** * Set the worker property: Trino worker. - * + * * @param worker the worker value to set. * @return the TrinoProfile object itself. */ @@ -146,7 +150,7 @@ public TrinoProfile withWorker(TrinoWorker worker) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoTelemetryConfig.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoTelemetryConfig.java index 070bb52590aed..ebd9c84e658eb 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoTelemetryConfig.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoTelemetryConfig.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Trino user telemetry definition. */ +/** + * Trino user telemetry definition. + */ @Fluent public final class TrinoTelemetryConfig { /* @@ -36,14 +38,16 @@ public final class TrinoTelemetryConfig { @JsonProperty(value = "path") private String path; - /** Creates an instance of TrinoTelemetryConfig class. */ + /** + * Creates an instance of TrinoTelemetryConfig class. + */ public TrinoTelemetryConfig() { } /** * Get the hivecatalogName property: Hive Catalog name used to mount external tables on the logs written by trino, * if not specified there tables are not created. - * + * * @return the hivecatalogName value. */ public String hivecatalogName() { @@ -53,7 +57,7 @@ public String hivecatalogName() { /** * Set the hivecatalogName property: Hive Catalog name used to mount external tables on the logs written by trino, * if not specified there tables are not created. - * + * * @param hivecatalogName the hivecatalogName value to set. * @return the TrinoTelemetryConfig object itself. */ @@ -65,7 +69,7 @@ public TrinoTelemetryConfig withHivecatalogName(String hivecatalogName) { /** * Get the hivecatalogSchema property: Schema of the above catalog to use, to mount query logs as external tables, * if not specified tables will be mounted under schema trinologs. - * + * * @return the hivecatalogSchema value. */ public String hivecatalogSchema() { @@ -75,7 +79,7 @@ public String hivecatalogSchema() { /** * Set the hivecatalogSchema property: Schema of the above catalog to use, to mount query logs as external tables, * if not specified tables will be mounted under schema trinologs. - * + * * @param hivecatalogSchema the hivecatalogSchema value to set. * @return the TrinoTelemetryConfig object itself. */ @@ -85,9 +89,9 @@ public TrinoTelemetryConfig withHivecatalogSchema(String hivecatalogSchema) { } /** - * Get the partitionRetentionInDays property: Retention period for query log table partitions, this doesn't have any - * affect on actual data. - * + * Get the partitionRetentionInDays property: Retention period for query log table partitions, this doesn't have + * any affect on actual data. + * * @return the partitionRetentionInDays value. */ public Integer partitionRetentionInDays() { @@ -95,9 +99,9 @@ public Integer partitionRetentionInDays() { } /** - * Set the partitionRetentionInDays property: Retention period for query log table partitions, this doesn't have any - * affect on actual data. - * + * Set the partitionRetentionInDays property: Retention period for query log table partitions, this doesn't have + * any affect on actual data. + * * @param partitionRetentionInDays the partitionRetentionInDays value to set. * @return the TrinoTelemetryConfig object itself. */ @@ -108,7 +112,7 @@ public TrinoTelemetryConfig withPartitionRetentionInDays(Integer partitionRetent /** * Get the path property: Azure storage location of the blobs. - * + * * @return the path value. */ public String path() { @@ -117,7 +121,7 @@ public String path() { /** * Set the path property: Azure storage location of the blobs. - * + * * @param path the path value to set. * @return the TrinoTelemetryConfig object itself. */ @@ -128,7 +132,7 @@ public TrinoTelemetryConfig withPath(String path) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugin.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugin.java index 99626fb1e8c05..8cdf9a78d3bf1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugin.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugin.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Trino user plugin. */ +/** + * Trino user plugin. + */ @Fluent public final class TrinoUserPlugin { /* @@ -28,13 +30,15 @@ public final class TrinoUserPlugin { @JsonProperty(value = "path") private String path; - /** Creates an instance of TrinoUserPlugin class. */ + /** + * Creates an instance of TrinoUserPlugin class. + */ public TrinoUserPlugin() { } /** * Get the enabled property: Denotes whether the plugin is active or not. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -43,7 +47,7 @@ public Boolean enabled() { /** * Set the enabled property: Denotes whether the plugin is active or not. - * + * * @param enabled the enabled value to set. * @return the TrinoUserPlugin object itself. */ @@ -55,7 +59,7 @@ public TrinoUserPlugin withEnabled(Boolean enabled) { /** * Get the name property: This field maps to the sub-directory in trino plugins location, that will contain all the * plugins under path. - * + * * @return the name value. */ public String name() { @@ -65,7 +69,7 @@ public String name() { /** * Set the name property: This field maps to the sub-directory in trino plugins location, that will contain all the * plugins under path. - * + * * @param name the name value to set. * @return the TrinoUserPlugin object itself. */ @@ -76,7 +80,7 @@ public TrinoUserPlugin withName(String name) { /** * Get the path property: Fully qualified path to the folder containing the plugins. - * + * * @return the path value. */ public String path() { @@ -85,7 +89,7 @@ public String path() { /** * Set the path property: Fully qualified path to the folder containing the plugins. - * + * * @param path the path value to set. * @return the TrinoUserPlugin object itself. */ @@ -96,7 +100,7 @@ public TrinoUserPlugin withPath(String path) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugins.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugins.java index a6a4efd0e9dfe..c6ba94b8c17d2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugins.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserPlugins.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Trino user plugins spec. */ +/** + * Trino user plugins spec. + */ @Fluent public final class TrinoUserPlugins { /* @@ -17,13 +19,15 @@ public final class TrinoUserPlugins { @JsonProperty(value = "plugins") private List plugins; - /** Creates an instance of TrinoUserPlugins class. */ + /** + * Creates an instance of TrinoUserPlugins class. + */ public TrinoUserPlugins() { } /** * Get the plugins property: Trino user plugins. - * + * * @return the plugins value. */ public List plugins() { @@ -32,7 +36,7 @@ public List plugins() { /** * Set the plugins property: Trino user plugins. - * + * * @param plugins the plugins value to set. * @return the TrinoUserPlugins object itself. */ @@ -43,7 +47,7 @@ public TrinoUserPlugins withPlugins(List plugins) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserTelemetry.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserTelemetry.java index 0f340b13822dc..aa08bea986513 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserTelemetry.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoUserTelemetry.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** User telemetry. */ +/** + * User telemetry. + */ @Fluent public final class TrinoUserTelemetry { /* @@ -16,13 +18,15 @@ public final class TrinoUserTelemetry { @JsonProperty(value = "storage") private TrinoTelemetryConfig storage; - /** Creates an instance of TrinoUserTelemetry class. */ + /** + * Creates an instance of TrinoUserTelemetry class. + */ public TrinoUserTelemetry() { } /** * Get the storage property: Trino user telemetry definition. - * + * * @return the storage value. */ public TrinoTelemetryConfig storage() { @@ -31,7 +35,7 @@ public TrinoTelemetryConfig storage() { /** * Set the storage property: Trino user telemetry definition. - * + * * @param storage the storage value to set. * @return the TrinoUserTelemetry object itself. */ @@ -42,7 +46,7 @@ public TrinoUserTelemetry withStorage(TrinoTelemetryConfig storage) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoWorker.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoWorker.java index 6f968be6f2c8a..492fbac23e5b2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoWorker.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/TrinoWorker.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.hdinsight.containers.fluent.models.TrinoDebugConfig; import com.fasterxml.jackson.annotation.JsonProperty; -/** Trino worker. */ +/** + * Trino worker. + */ @Fluent public final class TrinoWorker { /* @@ -17,13 +19,15 @@ public final class TrinoWorker { @JsonProperty(value = "debug") private TrinoDebugConfig innerDebug; - /** Creates an instance of TrinoWorker class. */ + /** + * Creates an instance of TrinoWorker class. + */ public TrinoWorker() { } /** * Get the innerDebug property: Trino debug configuration. - * + * * @return the innerDebug value. */ private TrinoDebugConfig innerDebug() { @@ -32,7 +36,7 @@ private TrinoDebugConfig innerDebug() { /** * Get the enable property: The flag that if enable debug or not. - * + * * @return the enable value. */ public Boolean enable() { @@ -41,7 +45,7 @@ public Boolean enable() { /** * Set the enable property: The flag that if enable debug or not. - * + * * @param enable the enable value to set. * @return the TrinoWorker object itself. */ @@ -55,7 +59,7 @@ public TrinoWorker withEnable(Boolean enable) { /** * Get the port property: The debug port. - * + * * @return the port value. */ public Integer port() { @@ -64,7 +68,7 @@ public Integer port() { /** * Set the port property: The debug port. - * + * * @param port the port value to set. * @return the TrinoWorker object itself. */ @@ -78,7 +82,7 @@ public TrinoWorker withPort(Integer port) { /** * Get the suspend property: The flag that if suspend debug or not. - * + * * @return the suspend value. */ public Boolean suspend() { @@ -87,7 +91,7 @@ public Boolean suspend() { /** * Set the suspend property: The flag that if suspend debug or not. - * + * * @param suspend the suspend value to set. * @return the TrinoWorker object itself. */ @@ -101,7 +105,7 @@ public TrinoWorker withSuspend(Boolean suspend) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpdatableClusterProfile.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpdatableClusterProfile.java index 162d277f4fe87..5266f6455eba1 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpdatableClusterProfile.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpdatableClusterProfile.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cluster resource patch properties. */ +/** + * Cluster resource patch properties. + */ @Fluent public final class UpdatableClusterProfile { /* @@ -48,19 +50,33 @@ public final class UpdatableClusterProfile { @JsonProperty(value = "prometheusProfile") private ClusterPrometheusProfile prometheusProfile; + /* + * Cluster Ranger plugin profile. + */ + @JsonProperty(value = "rangerPluginProfile") + private ClusterRangerPluginProfile rangerPluginProfile; + + /* + * The ranger cluster profile. + */ + @JsonProperty(value = "rangerProfile") + private RangerProfile rangerProfile; + /* * The script action profile list. */ @JsonProperty(value = "scriptActionProfiles") private List scriptActionProfiles; - /** Creates an instance of UpdatableClusterProfile class. */ + /** + * Creates an instance of UpdatableClusterProfile class. + */ public UpdatableClusterProfile() { } /** * Get the serviceConfigsProfiles property: The service configs profiles. - * + * * @return the serviceConfigsProfiles value. */ public List serviceConfigsProfiles() { @@ -69,19 +85,19 @@ public List serviceConfigsProfiles() { /** * Set the serviceConfigsProfiles property: The service configs profiles. - * + * * @param serviceConfigsProfiles the serviceConfigsProfiles value to set. * @return the UpdatableClusterProfile object itself. */ - public UpdatableClusterProfile withServiceConfigsProfiles( - List serviceConfigsProfiles) { + public UpdatableClusterProfile + withServiceConfigsProfiles(List serviceConfigsProfiles) { this.serviceConfigsProfiles = serviceConfigsProfiles; return this; } /** * Get the sshProfile property: Ssh profile for the cluster. - * + * * @return the sshProfile value. */ public SshProfile sshProfile() { @@ -90,7 +106,7 @@ public SshProfile sshProfile() { /** * Set the sshProfile property: Ssh profile for the cluster. - * + * * @param sshProfile the sshProfile value to set. * @return the UpdatableClusterProfile object itself. */ @@ -102,7 +118,7 @@ public UpdatableClusterProfile withSshProfile(SshProfile sshProfile) { /** * Get the autoscaleProfile property: This is the Autoscale profile for the cluster. This will allow customer to * create cluster enabled with Autoscale. - * + * * @return the autoscaleProfile value. */ public AutoscaleProfile autoscaleProfile() { @@ -112,7 +128,7 @@ public AutoscaleProfile autoscaleProfile() { /** * Set the autoscaleProfile property: This is the Autoscale profile for the cluster. This will allow customer to * create cluster enabled with Autoscale. - * + * * @param autoscaleProfile the autoscaleProfile value to set. * @return the UpdatableClusterProfile object itself. */ @@ -124,7 +140,7 @@ public UpdatableClusterProfile withAutoscaleProfile(AutoscaleProfile autoscalePr /** * Get the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids * authorized for data plane access. - * + * * @return the authorizationProfile value. */ public AuthorizationProfile authorizationProfile() { @@ -134,7 +150,7 @@ public AuthorizationProfile authorizationProfile() { /** * Set the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids * authorized for data plane access. - * + * * @param authorizationProfile the authorizationProfile value to set. * @return the UpdatableClusterProfile object itself. */ @@ -145,7 +161,7 @@ public UpdatableClusterProfile withAuthorizationProfile(AuthorizationProfile aut /** * Get the logAnalyticsProfile property: Cluster log analytics profile to enable or disable OMS agent for cluster. - * + * * @return the logAnalyticsProfile value. */ public ClusterLogAnalyticsProfile logAnalyticsProfile() { @@ -154,7 +170,7 @@ public ClusterLogAnalyticsProfile logAnalyticsProfile() { /** * Set the logAnalyticsProfile property: Cluster log analytics profile to enable or disable OMS agent for cluster. - * + * * @param logAnalyticsProfile the logAnalyticsProfile value to set. * @return the UpdatableClusterProfile object itself. */ @@ -165,7 +181,7 @@ public UpdatableClusterProfile withLogAnalyticsProfile(ClusterLogAnalyticsProfil /** * Get the prometheusProfile property: Cluster Prometheus profile. - * + * * @return the prometheusProfile value. */ public ClusterPrometheusProfile prometheusProfile() { @@ -174,7 +190,7 @@ public ClusterPrometheusProfile prometheusProfile() { /** * Set the prometheusProfile property: Cluster Prometheus profile. - * + * * @param prometheusProfile the prometheusProfile value to set. * @return the UpdatableClusterProfile object itself. */ @@ -183,9 +199,49 @@ public UpdatableClusterProfile withPrometheusProfile(ClusterPrometheusProfile pr return this; } + /** + * Get the rangerPluginProfile property: Cluster Ranger plugin profile. + * + * @return the rangerPluginProfile value. + */ + public ClusterRangerPluginProfile rangerPluginProfile() { + return this.rangerPluginProfile; + } + + /** + * Set the rangerPluginProfile property: Cluster Ranger plugin profile. + * + * @param rangerPluginProfile the rangerPluginProfile value to set. + * @return the UpdatableClusterProfile object itself. + */ + public UpdatableClusterProfile withRangerPluginProfile(ClusterRangerPluginProfile rangerPluginProfile) { + this.rangerPluginProfile = rangerPluginProfile; + return this; + } + + /** + * Get the rangerProfile property: The ranger cluster profile. + * + * @return the rangerProfile value. + */ + public RangerProfile rangerProfile() { + return this.rangerProfile; + } + + /** + * Set the rangerProfile property: The ranger cluster profile. + * + * @param rangerProfile the rangerProfile value to set. + * @return the UpdatableClusterProfile object itself. + */ + public UpdatableClusterProfile withRangerProfile(RangerProfile rangerProfile) { + this.rangerProfile = rangerProfile; + return this; + } + /** * Get the scriptActionProfiles property: The script action profile list. - * + * * @return the scriptActionProfiles value. */ public List scriptActionProfiles() { @@ -194,7 +250,7 @@ public List scriptActionProfiles() { /** * Set the scriptActionProfiles property: The script action profile list. - * + * * @param scriptActionProfiles the scriptActionProfiles value to set. * @return the UpdatableClusterProfile object itself. */ @@ -205,7 +261,7 @@ public UpdatableClusterProfile withScriptActionProfiles(List e.validate()); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpgradeMode.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpgradeMode.java new file mode 100644 index 0000000000000..0bdafdf7ff8a4 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/UpgradeMode.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * A string property that indicates the upgrade mode to be performed on the Flink job. It can have one of the following + * enum values => STATELESS_UPDATE, UPDATE, LAST_STATE_UPDATE. + */ +public final class UpgradeMode extends ExpandableStringEnum { + /** + * Static value STATELESS_UPDATE for UpgradeMode. + */ + public static final UpgradeMode STATELESS_UPDATE = fromString("STATELESS_UPDATE"); + + /** + * Static value UPDATE for UpgradeMode. + */ + public static final UpgradeMode UPDATE = fromString("UPDATE"); + + /** + * Static value LAST_STATE_UPDATE for UpgradeMode. + */ + public static final UpgradeMode LAST_STATE_UPDATE = fromString("LAST_STATE_UPDATE"); + + /** + * Creates a new instance of UpgradeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public UpgradeMode() { + } + + /** + * Creates or finds a UpgradeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding UpgradeMode. + */ + @JsonCreator + public static UpgradeMode fromString(String name) { + return fromString(name, UpgradeMode.class); + } + + /** + * Gets known UpgradeMode values. + * + * @return known UpgradeMode values. + */ + public static Collection values() { + return values(UpgradeMode.class); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/WebConnectivityEndpoint.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/WebConnectivityEndpoint.java index 4b988433dddf1..391c31a6d1393 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/WebConnectivityEndpoint.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/WebConnectivityEndpoint.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Web connectivity endpoint details. */ +/** + * Web connectivity endpoint details. + */ @Fluent public class WebConnectivityEndpoint { /* @@ -17,13 +19,21 @@ public class WebConnectivityEndpoint { @JsonProperty(value = "fqdn", required = true) private String fqdn; - /** Creates an instance of WebConnectivityEndpoint class. */ + /* + * Private web connectivity endpoint. This property will only be returned when enableInternalIngress is true. + */ + @JsonProperty(value = "privateFqdn") + private String privateFqdn; + + /** + * Creates an instance of WebConnectivityEndpoint class. + */ public WebConnectivityEndpoint() { } /** * Get the fqdn property: Web connectivity endpoint. - * + * * @return the fqdn value. */ public String fqdn() { @@ -32,7 +42,7 @@ public String fqdn() { /** * Set the fqdn property: Web connectivity endpoint. - * + * * @param fqdn the fqdn value to set. * @return the WebConnectivityEndpoint object itself. */ @@ -41,16 +51,37 @@ public WebConnectivityEndpoint withFqdn(String fqdn) { return this; } + /** + * Get the privateFqdn property: Private web connectivity endpoint. This property will only be returned when + * enableInternalIngress is true. + * + * @return the privateFqdn value. + */ + public String privateFqdn() { + return this.privateFqdn; + } + + /** + * Set the privateFqdn property: Private web connectivity endpoint. This property will only be returned when + * enableInternalIngress is true. + * + * @param privateFqdn the privateFqdn value to set. + * @return the WebConnectivityEndpoint object itself. + */ + public WebConnectivityEndpoint withPrivateFqdn(String privateFqdn) { + this.privateFqdn = privateFqdn; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (fqdn() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property fqdn in model WebConnectivityEndpoint")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property fqdn in model WebConnectivityEndpoint")); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/package-info.java index 7656af154cbd9..7cde563bc6c58 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/package-info.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/package-info.java @@ -3,6 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. /** - * Package containing the data models for HDInsightContainersManagementClient. HDInsight Containers Management Client. + * Package containing the data models for HDInsightContainersManagementClient. + * HDInsight Containers Management Client. */ package com.azure.resourcemanager.hdinsight.containers.models; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/package-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/package-info.java index a63a848c99f7a..17ad0fc29e2a2 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/package-info.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for HDInsightContainersManagementClient. HDInsight Containers Management Client. */ +/** + * Package containing the classes for HDInsightContainersManagementClient. + * HDInsight Containers Management Client. + */ package com.azure.resourcemanager.hdinsight.containers; diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/module-info.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/module-info.java index ed8906374e23a..00b624446c736 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/module-info.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/module-info.java @@ -10,10 +10,7 @@ exports com.azure.resourcemanager.hdinsight.containers.fluent.models; exports com.azure.resourcemanager.hdinsight.containers.models; - opens com.azure.resourcemanager.hdinsight.containers.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.hdinsight.containers.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.hdinsight.containers.fluent.models + to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.hdinsight.containers.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/proxy-config.json b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/proxy-config.json new file mode 100644 index 0000000000000..427b3cb1ec472 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsClientImpl$ClusterPoolsService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolAvailableUpgradesClientImpl$ClusterPoolAvailableUpgradesService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.ClustersClientImpl$ClustersService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.ClusterAvailableUpgradesClientImpl$ClusterAvailableUpgradesService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.ClusterJobsClientImpl$ClusterJobsService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.LocationsClientImpl$LocationsService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterPoolVersionsClientImpl$AvailableClusterPoolVersionsService" ], [ "com.azure.resourcemanager.hdinsight.containers.implementation.AvailableClusterVersionsClientImpl$AvailableClusterVersionsService" ] ] \ No newline at end of file diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/reflect-config.json b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/reflect-config.json new file mode 100644 index 0000000000000..6630f4e7eac05 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-hdinsight-containers/reflect-config.json @@ -0,0 +1,746 @@ +[ { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolComputeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesAksClusterProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.IdentityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNetworkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolLogAnalyticsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TagsObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ComputeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.NodeProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterComponentsItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SecretsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SecretReference", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfileWeb", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.WebConnectivityEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SshConnectivityEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterAccessProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPrometheusProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SshProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.Schedule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ScalingRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterRangerPluginProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.KafkaProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.DiskStorageProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.KafkaConnectivityEndpoints", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TrinoProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.CatalogOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.HiveCatalogOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TrinoCoordinator", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.TrinoDebugConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugins", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TrinoUserTelemetry", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TrinoTelemetryConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.TrinoWorker", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.FlinkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.FlinkStorageProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ComputeResourceDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.FlinkCatalogOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.FlinkHiveCatalogOption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SparkProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SparkMetastoreSpec", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugins", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.RangerProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ScriptActionProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterResizeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.UpdatableClusterProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterJobList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ServiceConfigResultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResultValueEntity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewsResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionsListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionsListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeNodeOsUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeAksPatchUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeHotfixUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ProvisioningStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.OutboundType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.KeyVaultObjectType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.DataDiskType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.MetastoreDbConnectionAuthenticationMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.DeploymentMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.UpgradeMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.DbConnectionAuthenticationMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.JobType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.Action", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.CurrentClusterPoolAksVersionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.CurrentClusterAksVersionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.hdinsight.containers.models.Severity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationSamples.java index 29990fd966047..7b9f24d659e9f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for AvailableClusterPoolVersions ListByLocation. */ +/** + * Samples for AvailableClusterPoolVersions ListByLocation. + */ public final class AvailableClusterPoolVersionsListByLocationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListAvailableClusterPoolVersions.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListAvailableClusterPoolVersions.json */ /** * Sample code: ClusterPoolVersionListResult. - * + * * @param manager Entry point to HDInsightContainersManager. */ public static void clusterPoolVersionListResult( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationSamples.java index 75a9bd51414fa..fbcdfbe2dc4fe 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for AvailableClusterVersions ListByLocation. */ +/** + * Samples for AvailableClusterVersions ListByLocation. + */ public final class AvailableClusterVersionsListByLocationSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListAvailableClusterVersions.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListAvailableClusterVersions.json */ /** * Sample code: ClusterVersionListResult. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterVersionListResult( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void + clusterVersionListResult(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.availableClusterVersions().listByLocation("westus2", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListSamples.java new file mode 100644 index 0000000000000..9f541e78a616c --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterAvailableUpgradesListSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.generated; + +/** + * Samples for ClusterAvailableUpgrades List. + */ +public final class ClusterAvailableUpgradesListSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClusterAvailableUpgrades.json + */ + /** + * Sample code: GetClusterAvailableUpgrade. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + getClusterAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterAvailableUpgrades().list("hiloResourcegroup", "clusterpool1", "cluster1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListSamples.java index 25931548f891a..ef5a6a5730d99 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListSamples.java @@ -4,18 +4,23 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for ClusterJobs List. */ +/** + * Samples for ClusterJobs List. + */ public final class ClusterJobsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterJobs.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClusterJobs.json */ /** * Sample code: ListClusterJobs. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void listClusterJobs( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager.clusterJobs().list("hiloResourcegroup", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); + public static void + listClusterJobs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterJobs().list("hiloResourcegroup", "clusterPool1", "cluster1", null, + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobSamples.java index e07148e46d9ab..4db36bf91e475 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobSamples.java @@ -10,38 +10,31 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ClusterJobs RunJob. */ +/** + * Samples for ClusterJobs RunJob. + */ public final class ClusterJobsRunJobSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/RunClusterJob.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * RunClusterJob.json */ /** * Sample code: RunClusterJob. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void runClusterJob( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusterJobs() - .runJob( - "hiloResourcegroup", - "clusterpool1", - "cluster1", + public static void + runClusterJob(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterJobs() + .runJob("hiloResourcegroup", "clusterpool1", "cluster1", new ClusterJobInner() - .withProperties( - new FlinkJobProperties() - .withJobName("flink-job-name") - .withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars") - .withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar") - .withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob") - .withAction(Action.START) - .withFlinkConfiguration( - mapOf( - "parallelism", - "1", - "savepoint.directory", - "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), + .withProperties(new FlinkJobProperties().withJobName("flink-job-name") + .withJobJarDirectory("abfs://flinkjob@hilosa.dfs.core.windows.net/jars") + .withJarName("flink-sleep-job-0.0.1-SNAPSHOT.jar") + .withEntryClass("com.microsoft.hilo.flink.job.streaming.SleepJob").withAction(Action.START) + .withFlinkConfiguration(mapOf("parallelism", "1", "savepoint.directory", + "abfs://flinkjob@hilosa.dfs.core.windows.net/savepoint"))), com.azure.core.util.Context.NONE); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListSamples.java new file mode 100644 index 0000000000000..c7c0ae7aa908b --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolAvailableUpgradesListSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.generated; + +/** + * Samples for ClusterPoolAvailableUpgrades List. + */ +public final class ClusterPoolAvailableUpgradesListSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClusterPoolAvailableUpgrades.json + */ + /** + * Sample code: GetClusterPoolAvailableUpgrade. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void getClusterPoolAvailableUpgrade( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPoolAvailableUpgrades().list("hiloResourcegroup", "clusterpool1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateSamples.java index 0b8528c7f7045..65a37f4cda72a 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateSamples.java @@ -6,23 +6,70 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; +import com.azure.resourcemanager.hdinsight.containers.models.OutboundType; -/** Samples for ClusterPools CreateOrUpdate. */ +/** + * Samples for ClusterPools CreateOrUpdate. + */ public final class ClusterPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/CreateClusterPool.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * CreateClusterPoolWithPrivateAks.json */ /** - * Sample code: ClusterPoolPut. - * + * Sample code: ClusterPoolPutWithPrivateAks. + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolPut( + public static void clusterPoolPutWithPrivateAks( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusterPools() - .define("clusterpool1") - .withRegion("West US 2") + manager.clusterPools().define("clusterpool1").withRegion("West US 2") + .withExistingResourceGroup("hiloResourcegroup") + .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) + .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")) + .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withEnablePrivateApiServer(true)) + .create(); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * CreateClusterPoolWithUDRAks.json + */ + /** + * Sample code: ClusterPoolPutWithUDRAks. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + clusterPoolPutWithUDRAks(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().define("clusterpool1").withRegion("West US 2") + .withExistingResourceGroup("hiloResourcegroup") + .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) + .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")) + .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1") + .withOutboundType(OutboundType.USER_DEFINED_ROUTING)) + .create(); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * CreateClusterPool.json + */ + /** + * Sample code: ClusterPoolPut. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + clusterPoolPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().define("clusterpool1").withRegion("West US 2") .withExistingResourceGroup("hiloResourcegroup") .withClusterPoolProfile(new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2")) .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")) diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteSamples.java index 1f093126727a7..20865c63e778d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for ClusterPools Delete. */ +/** + * Samples for ClusterPools Delete. + */ public final class ClusterPoolsDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/DeleteClusterPool.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * DeleteClusterPool.json */ /** * Sample code: ClusterPoolDelete. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolDelete( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void + clusterPoolDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusterPools().delete("rg1", "clusterpool1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupSamples.java index d7e6d26815cc5..7aee99aab181f 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for ClusterPools GetByResourceGroup. */ +/** + * Samples for ClusterPools GetByResourceGroup. + */ public final class ClusterPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetClusterPool.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * GetClusterPool.json */ /** * Sample code: ClusterPoolGet. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolGet( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE); + public static void + clusterPoolGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupSamples.java index 4bf1ae20031ef..86020ecbd90e9 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for ClusterPools ListByResourceGroup. */ +/** + * Samples for ClusterPools ListByResourceGroup. + */ public final class ClusterPoolsListByResourceGroupSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterPools.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClusterPools.json */ /** * Sample code: ClusterPoolsListByResourceGroup. - * + * * @param manager Entry point to HDInsightContainersManager. */ public static void clusterPoolsListByResourceGroup( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListSamples.java index fafdd19b50f53..3363a698107ed 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for ClusterPools List. */ +/** + * Samples for ClusterPools List. + */ public final class ClusterPoolsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterPoolsSubscription.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClusterPoolsSubscription.json */ /** * Sample code: ClusterPoolsListBySubscription. - * + * * @param manager Entry point to HDInsightContainersManager. */ public static void clusterPoolsListBySubscription( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpdateTagsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpdateTagsSamples.java index a794db1dddeb5..3db1f4d3b57fc 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpdateTagsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpdateTagsSamples.java @@ -8,23 +8,25 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ClusterPools UpdateTags. */ +/** + * Samples for ClusterPools UpdateTags. + */ public final class ClusterPoolsUpdateTagsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/PatchClusterPool.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * PatchClusterPool.json */ /** * Sample code: ClusterPoolsPatchTags. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void clusterPoolsPatchTags( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - ClusterPool resource = - manager - .clusterPools() - .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE) - .getValue(); + public static void + clusterPoolsPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + ClusterPool resource = manager.clusterPools() + .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeSamples.java new file mode 100644 index 0000000000000..77a0545a04bea --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsUpgradeSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.generated; + +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAksPatchVersionUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNodeOsImageUpdateProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade; + +/** + * Samples for ClusterPools Upgrade. + */ +public final class ClusterPoolsUpgradeSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * UpgradeNodeOsForClusterPool.json + */ + /** + * Sample code: ClusterPoolsUpgradeNodeOs. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + clusterPoolsUpgradeNodeOs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().upgrade("hiloResourcegroup", "clusterpool1", + new ClusterPoolUpgrade().withProperties(new ClusterPoolNodeOsImageUpdateProperties()), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * UpgradeAKSPatchVersionForClusterPool.json + */ + /** + * Sample code: ClusterPoolsUpgradeAKSPatchVersion. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clusterPoolsUpgradeAKSPatchVersion( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusterPools().upgrade("hiloResourcegroup", "clusterpool1", + new ClusterPoolUpgrade().withProperties(new ClusterPoolAksPatchVersionUpgradeProperties() + .withUpgradeClusterPool(true).withUpgradeAllClusterNodes(false)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersCreateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersCreateSamples.java index 84363c93d1b54..d66da7f15c091 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersCreateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersCreateSamples.java @@ -7,6 +7,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAccessProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; @@ -17,6 +18,12 @@ import com.azure.resourcemanager.hdinsight.containers.models.IdentityProfile; import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; import com.azure.resourcemanager.hdinsight.containers.models.Schedule; @@ -24,175 +31,191 @@ import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; import com.azure.resourcemanager.hdinsight.containers.models.SparkProfile; import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; +import com.azure.resourcemanager.hdinsight.containers.models.TrinoProfile; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for Clusters Create. */ +/** + * Samples for Clusters Create. + */ public final class ClustersCreateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/CreateSparkCluster.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * CreateSparkCluster.json */ /** * Sample code: HDInsightSparkClusterPut. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightSparkClusterPut( + public static void + hDInsightSparkClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().define("cluster1").withRegion("West US 2") + .withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("spark") + .withComputeProfile(new ComputeProfile().withNodes( + Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))) + .withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1").withOssVersion("2.2.3") + .withIdentityProfile(new IdentityProfile().withMsiResourceId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") + .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") + .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) + .withAuthorizationProfile( + new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) + .withServiceConfigsProfiles(Arrays.asList( + new ClusterServiceConfigsProfile() + .withServiceName("spark-service") + .withConfigs( + Arrays.asList( + new ClusterServiceConfig().withComponent("spark-config") + .withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf") + .withValues(mapOf("spark.eventLog.enabled", "true")))))), + new ClusterServiceConfigsProfile().withServiceName("yarn-service") + .withConfigs( + Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config") + .withFiles(Arrays.asList( + new ClusterConfigFile().withFileName("core-site.xml") + .withValues(mapOf("fs.defaultFS", + "wasb://testcontainer@teststorage.dfs.core.windows.net/", + "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", + "storage.name", "teststorage", "storage.protocol", "wasb")), + new ClusterConfigFile().withFileName("yarn-site.xml") + .withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))) + .withSshProfile(new SshProfile().withCount(2)).withSparkProfile(new SparkProfile())) + .create(); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * CreateSparkClusterWithInternalIngress.json + */ + /** + * Sample code: HDInsightSparkClusterPutWithInternalIngress. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void hDInsightSparkClusterPutWithInternalIngress( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withClusterType("spark") - .withComputeProfile( - new ComputeProfile() - .withNodes( - Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))) - .withClusterProfile( - new ClusterProfile() - .withClusterVersion("0.0.1") - .withOssVersion("2.2.3") - .withIdentityProfile( - new IdentityProfile() - .withMsiResourceId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") - .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") - .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) - .withServiceConfigsProfiles( - Arrays - .asList( - new ClusterServiceConfigsProfile() - .withServiceName("spark-service") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("spark-config") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("spark-defaults.conf") - .withValues( - mapOf("spark.eventLog.enabled", "true")))))), - new ClusterServiceConfigsProfile() - .withServiceName("yarn-service") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("yarn-config") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("core-site.xml") - .withValues( - mapOf( - "fs.defaultFS", - "wasb://testcontainer@teststorage.dfs.core.windows.net/", - "storage.container", - "testcontainer", - "storage.key", - "fakeTokenPlaceholder", - "storage.name", - "teststorage", - "storage.protocol", - "wasb")), - new ClusterConfigFile() - .withFileName("yarn-site.xml") - .withValues( - mapOf("yarn.webapp.ui2.enable", "false")))))))) - .withSshProfile(new SshProfile().withCount(2)) - .withSparkProfile(new SparkProfile())) + manager.clusters().define("cluster1").withRegion("West US 2") + .withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("spark") + .withComputeProfile(new ComputeProfile().withNodes( + Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))) + .withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1").withOssVersion("2.2.3") + .withIdentityProfile(new IdentityProfile().withMsiResourceId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") + .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") + .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) + .withAuthorizationProfile( + new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) + .withServiceConfigsProfiles(Arrays.asList( + new ClusterServiceConfigsProfile() + .withServiceName("spark-service") + .withConfigs( + Arrays.asList( + new ClusterServiceConfig().withComponent("spark-config") + .withFiles(Arrays.asList(new ClusterConfigFile().withFileName("spark-defaults.conf") + .withValues(mapOf("spark.eventLog.enabled", "true")))))), + new ClusterServiceConfigsProfile().withServiceName("yarn-service") + .withConfigs( + Arrays.asList(new ClusterServiceConfig().withComponent("yarn-config") + .withFiles(Arrays.asList( + new ClusterConfigFile().withFileName("core-site.xml") + .withValues(mapOf("fs.defaultFS", + "wasb://testcontainer@teststorage.dfs.core.windows.net/", + "storage.container", "testcontainer", "storage.key", "fakeTokenPlaceholder", + "storage.name", "teststorage", "storage.protocol", "wasb")), + new ClusterConfigFile().withFileName("yarn-site.xml") + .withValues(mapOf("yarn.webapp.ui2.enable", "false")))))))) + .withClusterAccessProfile(new ClusterAccessProfile().withEnableInternalIngress(true)) + .withSshProfile(new SshProfile().withCount(2)).withSparkProfile(new SparkProfile())) .create(); } /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/CreateAutoscaleCluster.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * CreateAutoscaleCluster.json */ /** * Sample code: HDInsightClusterPut. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterPut( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .define("cluster1") - .withRegion("West US 2") - .withExistingClusterpool("hiloResourcegroup", "clusterpool1") - .withClusterType("kafka") - .withComputeProfile( - new ComputeProfile() - .withNodes( - Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))) - .withClusterProfile( - new ClusterProfile() - .withClusterVersion("1.0.1") - .withOssVersion("2.4.1") - .withIdentityProfile( - new IdentityProfile() - .withMsiResourceId( - "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") - .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") - .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) - .withAuthorizationProfile( - new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) - .withSshProfile(new SshProfile().withCount(2)) - .withAutoscaleProfile( - new AutoscaleProfile() - .withEnabled(true) - .withGracefulDecommissionTimeout(3600) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) - .withScheduleBasedConfig( - new ScheduleBasedConfig() - .withTimeZone("Cen. Australia Standard Time") - .withDefaultCount(10) - .withSchedules( - Arrays - .asList( - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(20) - .withDays(Arrays.asList(ScheduleDay.MONDAY)), - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(25) - .withDays(Arrays.asList(ScheduleDay.SUNDAY))))) - .withLoadBasedConfig( - new LoadBasedConfig() - .withMinNodes(10) - .withMaxNodes(20) - .withPollInterval(60) - .withCooldownPeriod(300) - .withScalingRules( - Arrays - .asList( - new ScalingRule() - .withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(3) - .withScalingMetric("cpu") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.GREATER_THAN) - .withThreshold(90f)), - new ScalingRule() - .withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(3) - .withScalingMetric("cpu") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(20f)))))) - .withKafkaProfile(mapOf())) + public static void + hDInsightClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().define("cluster1").withRegion("West US 2") + .withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("Trino") + .withComputeProfile(new ComputeProfile() + .withNodes(Arrays.asList(new NodeProfile().withType("Head").withVmSize("Standard_E8as_v5").withCount(2), + new NodeProfile().withType("Worker").withVmSize("Standard_E8as_v5").withCount(3)))) + .withClusterProfile(new ClusterProfile().withClusterVersion("1.0.6").withOssVersion("0.410.0") + .withIdentityProfile(new IdentityProfile().withMsiResourceId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") + .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") + .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) + .withAuthorizationProfile( + new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) + .withSshProfile(new SshProfile().withCount(2)) + .withAutoscaleProfile(new AutoscaleProfile().withEnabled(true).withGracefulDecommissionTimeout(3600) + .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) + .withScheduleBasedConfig( + new ScheduleBasedConfig().withTimeZone("Cen. Australia Standard Time").withDefaultCount(10) + .withSchedules(Arrays.asList( + new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(20) + .withDays(Arrays.asList(ScheduleDay.MONDAY)), + new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(25) + .withDays(Arrays.asList(ScheduleDay.SUNDAY))))) + .withLoadBasedConfig(new LoadBasedConfig().withMinNodes(10).withMaxNodes(20).withPollInterval(60) + .withCooldownPeriod(300) + .withScalingRules(Arrays.asList( + new ScalingRule().withActionType(ScaleActionType.SCALEUP).withEvaluationCount(3) + .withScalingMetric("cpu") + .withComparisonRule(new ComparisonRule().withOperator(ComparisonOperator.GREATER_THAN) + .withThreshold(90f)), + new ScalingRule().withActionType(ScaleActionType.SCALEDOWN).withEvaluationCount(3) + .withScalingMetric("cpu").withComparisonRule(new ComparisonRule() + .withOperator(ComparisonOperator.LESS_THAN).withThreshold(20f)))))) + .withTrinoProfile(new TrinoProfile())) + .create(); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * CreateRangerCluster.json + */ + /** + * Sample code: HDInsightRangerClusterPut. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + hDInsightRangerClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().define("cluster1").withRegion("West US 2") + .withExistingClusterpool("hiloResourcegroup", "clusterpool1").withClusterType("ranger") + .withComputeProfile(new ComputeProfile() + .withNodes(Arrays.asList(new NodeProfile().withType("head").withVmSize("Standard_D3_v2").withCount(2)))) + .withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1").withOssVersion("2.2.3") + .withIdentityProfile(new IdentityProfile().withMsiResourceId( + "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi") + .withMsiClientId("de91f1d8-767f-460a-ac11-3cf103f74b34") + .withMsiObjectId("40491351-c240-4042-91e0-f644a1d2b441")) + .withAuthorizationProfile( + new AuthorizationProfile().withUserIds(Arrays.asList("testuser1", "testuser2"))) + .withRangerProfile(new RangerProfile() + .withRangerAdmin(new RangerAdminSpec() + .withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")) + .withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net") + .withName("testdb").withPasswordSecretRef("fakeTokenPlaceholder").withUsername("admin"))) + .withRangerAudit( + new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) + .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) + .withGroups(Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", + "13be6971-79db-4f33-9d41-b25589ca25ac")) + .withMode(RangerUsersyncMode.AUTOMATIC) + .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com"))))) .create(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteSamples.java index 9d2a756a8ee92..16aadfaab3943 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for Clusters Delete. */ +/** + * Samples for Clusters Delete. + */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/DeleteCluster.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * DeleteCluster.json */ /** * Sample code: HDInsightClustersDelete. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClustersDelete( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void + hDInsightClustersDelete(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.clusters().delete("rg1", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewSamples.java index 3547a8821bc61..468cb8cda957d 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for Clusters GetInstanceView. */ +/** + * Samples for Clusters GetInstanceView. + */ public final class ClustersGetInstanceViewSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetClusterInstanceView.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * GetClusterInstanceView.json */ /** * Sample code: HDInsightClusterGetInstanceView. - * + * * @param manager Entry point to HDInsightContainersManager. */ public static void hDInsightClusterGetInstanceView( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", com.azure.core.util.Context.NONE); + manager.clusters().getInstanceViewWithResponse("rg1", "clusterPool1", "cluster1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetSamples.java index ac9b775bb842f..321f0204bdb6e 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for Clusters Get. */ +/** + * Samples for Clusters Get. + */ public final class ClustersGetSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetCluster.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * GetCluster.json */ /** * Sample code: HDInsightClusterGet. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterGet( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE); + public static void + hDInsightClusterGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListByClusterPoolNameSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListByClusterPoolNameSamples.java index cfd1a2d611bb7..8f1b1983a2081 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListByClusterPoolNameSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListByClusterPoolNameSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for Clusters ListByClusterPoolName. */ +/** + * Samples for Clusters ListByClusterPoolName. + */ public final class ClustersListByClusterPoolNameSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClustersByClusterPoolName.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClustersByClusterPoolName.json */ /** * Sample code: HDInsightClustersListByClusterPoolName. - * + * * @param manager Entry point to HDInsightContainersManager. */ public static void hDInsightClustersListByClusterPoolName( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsSamples.java index 16b7a02e83fda..5c5926bab597b 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for Clusters ListInstanceViews. */ +/** + * Samples for Clusters ListInstanceViews. + */ public final class ClustersListInstanceViewsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterInstanceViews.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClusterInstanceViews.json */ /** * Sample code: HDInsightClusterGetInstanceViews. - * + * * @param manager Entry point to HDInsightContainersManager. */ public static void hDInsightClusterGetInstanceViews( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListServiceConfigsSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListServiceConfigsSamples.java index 316aa59c15044..ac0eca5a61150 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListServiceConfigsSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListServiceConfigsSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for Clusters ListServiceConfigs. */ +/** + * Samples for Clusters ListServiceConfigs. + */ public final class ClustersListServiceConfigsSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ListClusterServiceConfigs.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ListClusterServiceConfigs.json */ /** * Sample code: HDInsightClusterGetServiceConfigs. - * + * * @param manager Entry point to HDInsightContainersManager. */ public static void hDInsightClusterGetServiceConfigs( diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersResizeSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersResizeSamples.java index d8a2b2f26f21d..45d8d42c6f5ef 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersResizeSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersResizeSamples.java @@ -6,25 +6,24 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -/** Samples for Clusters Resize. */ +/** + * Samples for Clusters Resize. + */ public final class ClustersResizeSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/ResizeCluster.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * ResizeCluster.json */ /** * Sample code: HDInsightClusterResize. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClusterResize( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .clusters() - .resize( - "hiloResourcegroup", - "clusterpool1", - "cluster1", - new ClusterResizeData().withLocation("West US 2").withTargetWorkerNodeCount(5), - com.azure.core.util.Context.NONE); + public static void + hDInsightClusterResize(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().resize("hiloResourcegroup", "clusterpool1", "cluster1", + new ClusterResizeData().withLocation("West US 2").withTargetWorkerNodeCount(5), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpdateSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpdateSamples.java index d0c44a95bd5c5..adce026737ce3 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpdateSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpdateSamples.java @@ -13,6 +13,12 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase; +import com.azure.resourcemanager.hdinsight.containers.models.RangerAuditSpec; +import com.azure.resourcemanager.hdinsight.containers.models.RangerProfile; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncMode; +import com.azure.resourcemanager.hdinsight.containers.models.RangerUsersyncSpec; import com.azure.resourcemanager.hdinsight.containers.models.Schedule; import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; @@ -22,122 +28,111 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Clusters Update. */ +/** + * Samples for Clusters Update. + */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/PatchCluster.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * PatchRangerCluster.json */ /** - * Sample code: HDInsightClustersPatchTags. - * + * Sample code: HDInsightRangerClusterPatchTags. + * * @param manager Entry point to HDInsightContainersManager. */ - public static void hDInsightClustersPatchTags( + public static void hDInsightRangerClusterPatchTags( com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - Cluster resource = - manager - .clusters() - .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + Cluster resource = manager.clusters() + .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile() + .withRangerAdmin( + new RangerAdminSpec().withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com")) + .withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net") + .withName("testdb").withPasswordSecretRef("fakeTokenPlaceholder").withUsername("admin"))) + .withRangerAudit( + new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob")) + .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true) + .withGroups( + Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", "13be6971-79db-4f33-9d41-b25589ca25ac")) + .withMode(RangerUsersyncMode.AUTOMATIC) + .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com"))))) + .apply(); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * PatchCluster.json + */ + /** + * Sample code: HDInsightClustersPatchTags. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + hDInsightClustersPatchTags(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + Cluster resource = manager.clusters() + .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() .withClusterProfile( new UpdatableClusterProfile() .withServiceConfigsProfiles( Arrays .asList( new ClusterServiceConfigsProfile() - .withServiceName("TestService1") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("TestComp1") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("TestFile1") - .withValues( - mapOf( - "Test.config.1", - "1", - "Test.config.2", - "2")), - new ClusterConfigFile() - .withFileName("TestFile2") - .withValues( - mapOf( - "Test.config.3", - "3", - "Test.config.4", - "4")))), - new ClusterServiceConfig() - .withComponent("TestComp2") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("TestFile3") - .withContent("TestContent") - .withPath("TestPath"), - new ClusterConfigFile() - .withFileName("TestFile4") - .withValues( - mapOf( - "Test.config.7", - "7", - "Test.config.8", - "8")))))), - new ClusterServiceConfigsProfile() - .withServiceName("TestService2") + .withServiceName( + "TestService1") .withConfigs( Arrays .asList( - new ClusterServiceConfig() - .withComponent("TestComp3") + new ClusterServiceConfig().withComponent("TestComp1") .withFiles( Arrays .asList( - new ClusterConfigFile() - .withFileName("TestFile5") - .withValues(mapOf("Test.config.9", "9")))))))) - .withSshProfile(new SshProfile().withCount(2)) + new ClusterConfigFile().withFileName("TestFile1") + .withValues(mapOf("Test.config.1", "1", + "Test.config.2", "2")), + new ClusterConfigFile().withFileName("TestFile2") + .withValues(mapOf("Test.config.3", "3", + "Test.config.4", "4")))), + new ClusterServiceConfig().withComponent("TestComp2") + .withFiles(Arrays.asList( + new ClusterConfigFile().withFileName("TestFile3") + .withContent("TestContent").withPath("TestPath"), + new ClusterConfigFile().withFileName("TestFile4").withValues( + mapOf("Test.config.7", "7", "Test.config.8", "8")))))), + new ClusterServiceConfigsProfile().withServiceName("TestService2") + .withConfigs(Arrays.asList(new ClusterServiceConfig().withComponent("TestComp3") + .withFiles(Arrays.asList(new ClusterConfigFile().withFileName("TestFile5") + .withValues(mapOf("Test.config.9", "9")))))))) + .withSshProfile( + new SshProfile().withCount(2)) .withAutoscaleProfile( new AutoscaleProfile() - .withEnabled(true) - .withGracefulDecommissionTimeout(-1) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) + .withEnabled(true).withGracefulDecommissionTimeout( + -1) + .withAutoscaleType( + AutoscaleType.SCHEDULE_BASED) .withScheduleBasedConfig( - new ScheduleBasedConfig() - .withTimeZone("Cen. Australia Standard Time") - .withDefaultCount(3) - .withSchedules( - Arrays - .asList( - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays( - Arrays - .asList( - ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), - new Schedule() - .withStartTime("00:00") - .withEndTime("12:00") - .withCount(3) - .withDays(Arrays.asList(ScheduleDay.SUNDAY)))))) + new ScheduleBasedConfig().withTimeZone("Cen. Australia Standard Time") + .withDefaultCount(3).withSchedules( + Arrays.asList( + new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(3) + .withDays(Arrays + .asList(ScheduleDay.fromString("Monday, Tuesday, Wednesday"))), + new Schedule().withStartTime("00:00").withEndTime("12:00").withCount(3) + .withDays(Arrays.asList(ScheduleDay.SUNDAY)))))) .withAuthorizationProfile( new AuthorizationProfile().withUserIds(Arrays.asList("Testuser1", "Testuser2"))) - .withLogAnalyticsProfile( - new ClusterLogAnalyticsProfile() - .withEnabled(true) - .withApplicationLogs( - new ClusterLogAnalyticsApplicationLogs() - .withStdOutEnabled(true) - .withStdErrorEnabled(true)) - .withMetricsEnabled(true))) + .withLogAnalyticsProfile(new ClusterLogAnalyticsProfile().withEnabled(true) + .withApplicationLogs( + new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true).withStdErrorEnabled(true)) + .withMetricsEnabled(true))) .apply(); } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeSamples.java new file mode 100644 index 0000000000000..284d9bb8f9c09 --- /dev/null +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersUpgradeSamples.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.hdinsight.containers.generated; + +import com.azure.resourcemanager.hdinsight.containers.models.ClusterAksPatchVersionUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterHotfixUpgradeProperties; +import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade; + +/** + * Samples for Clusters Upgrade. + */ +public final class ClustersUpgradeSamples { + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * UpgradeAKSPatchVersionForCluster.json + */ + /** + * Sample code: ClustersUpgradeAKSPatchVersion. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void clustersUpgradeAKSPatchVersion( + com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().upgrade("hiloResourcegroup", "clusterpool1", "cluster1", + new ClusterUpgrade().withProperties(new ClusterAksPatchVersionUpgradeProperties()), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * UpgradeHotfixForCluster.json + */ + /** + * Sample code: ClustersUpgradeHotfix. + * + * @param manager Entry point to HDInsightContainersManager. + */ + public static void + clustersUpgradeHotfix(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.clusters().upgrade("hiloResourcegroup", "clusterpool1", "cluster1", + new ClusterUpgrade().withProperties(new ClusterHotfixUpgradeProperties().withTargetOssVersion("1.16.0") + .withTargetClusterVersion("1.0.6").withTargetBuildNumber("3").withComponentName("historyserver")), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilitySamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilitySamples.java index 760a32789218f..c84b408b6a2f6 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilitySamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilitySamples.java @@ -6,25 +6,25 @@ import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -/** Samples for Locations CheckNameAvailability. */ +/** + * Samples for Locations CheckNameAvailability. + */ public final class LocationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/LocationsNameAvailability.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * LocationsNameAvailability.json */ /** * Sample code: LocationsNameAvailability. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void locationsNameAvailability( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { - manager - .locations() - .checkNameAvailabilityWithResponse( - "southeastasia", - new NameAvailabilityParameters() - .withName("contosemember1") - .withType("Microsoft.HDInsight/clusterPools/clusters"), + public static void + locationsNameAvailability(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + manager.locations() + .checkNameAvailabilityWithResponse("southeastasia", new NameAvailabilityParameters() + .withName("contosemember1").withType("Microsoft.HDInsight/clusterPools/clusters"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListSamples.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListSamples.java index 47b9d51129835..020f07d6fb9af 100644 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListSamples.java +++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/samples/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.hdinsight.containers.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-06-01-preview/examples/GetOperations.json + * x-ms-original-file: + * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/ + * GetOperations.json */ /** * Sample code: ListOperations. - * + * * @param manager Entry point to HDInsightContainersManager. */ - public static void listOperations( - com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { + public static void + listOperations(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) { manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java deleted file mode 100644 index 623600ba72bec..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileAksClusterAgentPoolIdentityProfileTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class AksClusterProfileAksClusterAgentPoolIdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksClusterProfileAksClusterAgentPoolIdentityProfile model = - BinaryData - .fromString( - "{\"msiResourceId\":\"ailzydehojwyahu\",\"msiClientId\":\"inpm\",\"msiObjectId\":\"njaqwixjspro\"}") - .toObject(AksClusterProfileAksClusterAgentPoolIdentityProfile.class); - Assertions.assertEquals("ailzydehojwyahu", model.msiResourceId()); - Assertions.assertEquals("inpm", model.msiClientId()); - Assertions.assertEquals("njaqwixjspro", model.msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksClusterProfileAksClusterAgentPoolIdentityProfile model = - new AksClusterProfileAksClusterAgentPoolIdentityProfile() - .withMsiResourceId("ailzydehojwyahu") - .withMsiClientId("inpm") - .withMsiObjectId("njaqwixjspro"); - model = BinaryData.fromObject(model).toObject(AksClusterProfileAksClusterAgentPoolIdentityProfile.class); - Assertions.assertEquals("ailzydehojwyahu", model.msiResourceId()); - Assertions.assertEquals("inpm", model.msiClientId()); - Assertions.assertEquals("njaqwixjspro", model.msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java deleted file mode 100644 index bd8171d70810d..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AksClusterProfileTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class AksClusterProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksClusterProfile model = - BinaryData - .fromString( - "{\"aksClusterResourceId\":\"udccsnhsjc\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ejhkry\",\"msiClientId\":\"tnapczwlokjyemkk\",\"msiObjectId\":\"ni\"},\"aksVersion\":\"oxzjnchgejspod\"}") - .toObject(AksClusterProfile.class); - Assertions.assertEquals("udccsnhsjc", model.aksClusterResourceId()); - Assertions.assertEquals("ejhkry", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("tnapczwlokjyemkk", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("ni", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksClusterProfile model = - new AksClusterProfile() - .withAksClusterResourceId("udccsnhsjc") - .withAksClusterAgentPoolIdentityProfile( - new AksClusterProfileAksClusterAgentPoolIdentityProfile() - .withMsiResourceId("ejhkry") - .withMsiClientId("tnapczwlokjyemkk") - .withMsiObjectId("ni")); - model = BinaryData.fromObject(model).toObject(AksClusterProfile.class); - Assertions.assertEquals("udccsnhsjc", model.aksClusterResourceId()); - Assertions.assertEquals("ejhkry", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("tnapczwlokjyemkk", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("ni", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java deleted file mode 100644 index c4bf76e041546..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AuthorizationProfileTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AuthorizationProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AuthorizationProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthorizationProfile model = - BinaryData - .fromString( - "{\"userIds\":[\"kacspkw\",\"hzdobpxjmflbvvnc\"],\"groupIds\":[\"cciw\",\"zjuqkhrsaj\",\"wkuofoskghsauu\",\"mjmvxieduugidyjr\"]}") - .toObject(AuthorizationProfile.class); - Assertions.assertEquals("kacspkw", model.userIds().get(0)); - Assertions.assertEquals("cciw", model.groupIds().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthorizationProfile model = - new AuthorizationProfile() - .withUserIds(Arrays.asList("kacspkw", "hzdobpxjmflbvvnc")) - .withGroupIds(Arrays.asList("cciw", "zjuqkhrsaj", "wkuofoskghsauu", "mjmvxieduugidyjr")); - model = BinaryData.fromObject(model).toObject(AuthorizationProfile.class); - Assertions.assertEquals("kacspkw", model.userIds().get(0)); - Assertions.assertEquals("cciw", model.groupIds().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java deleted file mode 100644 index 894af248a349d..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AutoscaleProfileTests.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleProfile; -import com.azure.resourcemanager.hdinsight.containers.models.AutoscaleType; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AutoscaleProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoscaleProfile model = - BinaryData - .fromString( - "{\"enabled\":true,\"gracefulDecommissionTimeout\":1640882234,\"autoscaleType\":\"ScheduleBased\",\"scheduleBasedConfig\":{\"timeZone\":\"hdzhlrqj\",\"defaultCount\":203364386,\"schedules\":[{\"startTime\":\"kfrlhrxsbky\",\"endTime\":\"pycanuzbpz\",\"count\":1414672968,\"days\":[\"Wednesday\",\"Friday\",\"Sunday\",\"Saturday\"]}]},\"loadBasedConfig\":{\"minNodes\":870696272,\"maxNodes\":1514524475,\"pollInterval\":1300207213,\"cooldownPeriod\":1267023941,\"scalingRules\":[{\"actionType\":\"scaleup\",\"evaluationCount\":1198251199,\"scalingMetric\":\"eyvjusrtslhspkde\",\"comparisonRule\":{\"operator\":\"lessThan\",\"threshold\":68.91014}},{\"actionType\":\"scaledown\",\"evaluationCount\":441408788,\"scalingMetric\":\"mx\",\"comparisonRule\":{\"operator\":\"lessThanOrEqual\",\"threshold\":7.4486313}}]}}") - .toObject(AutoscaleProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1640882234, model.gracefulDecommissionTimeout()); - Assertions.assertEquals(AutoscaleType.SCHEDULE_BASED, model.autoscaleType()); - Assertions.assertEquals("hdzhlrqj", model.scheduleBasedConfig().timeZone()); - Assertions.assertEquals(203364386, model.scheduleBasedConfig().defaultCount()); - Assertions.assertEquals("kfrlhrxsbky", model.scheduleBasedConfig().schedules().get(0).startTime()); - Assertions.assertEquals("pycanuzbpz", model.scheduleBasedConfig().schedules().get(0).endTime()); - Assertions.assertEquals(1414672968, model.scheduleBasedConfig().schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.WEDNESDAY, model.scheduleBasedConfig().schedules().get(0).days().get(0)); - Assertions.assertEquals(870696272, model.loadBasedConfig().minNodes()); - Assertions.assertEquals(1514524475, model.loadBasedConfig().maxNodes()); - Assertions.assertEquals(1300207213, model.loadBasedConfig().pollInterval()); - Assertions.assertEquals(1267023941, model.loadBasedConfig().cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.loadBasedConfig().scalingRules().get(0).actionType()); - Assertions.assertEquals(1198251199, model.loadBasedConfig().scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("eyvjusrtslhspkde", model.loadBasedConfig().scalingRules().get(0).scalingMetric()); - Assertions - .assertEquals( - ComparisonOperator.LESS_THAN, - model.loadBasedConfig().scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(68.91014f, model.loadBasedConfig().scalingRules().get(0).comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoscaleProfile model = - new AutoscaleProfile() - .withEnabled(true) - .withGracefulDecommissionTimeout(1640882234) - .withAutoscaleType(AutoscaleType.SCHEDULE_BASED) - .withScheduleBasedConfig( - new ScheduleBasedConfig() - .withTimeZone("hdzhlrqj") - .withDefaultCount(203364386) - .withSchedules( - Arrays - .asList( - new Schedule() - .withStartTime("kfrlhrxsbky") - .withEndTime("pycanuzbpz") - .withCount(1414672968) - .withDays( - Arrays - .asList( - ScheduleDay.WEDNESDAY, - ScheduleDay.FRIDAY, - ScheduleDay.SUNDAY, - ScheduleDay.SATURDAY))))) - .withLoadBasedConfig( - new LoadBasedConfig() - .withMinNodes(870696272) - .withMaxNodes(1514524475) - .withPollInterval(1300207213) - .withCooldownPeriod(1267023941) - .withScalingRules( - Arrays - .asList( - new ScalingRule() - .withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(1198251199) - .withScalingMetric("eyvjusrtslhspkde") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(68.91014f)), - new ScalingRule() - .withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(441408788) - .withScalingMetric("mx") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.LESS_THAN_OR_EQUAL) - .withThreshold(7.4486313f))))); - model = BinaryData.fromObject(model).toObject(AutoscaleProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1640882234, model.gracefulDecommissionTimeout()); - Assertions.assertEquals(AutoscaleType.SCHEDULE_BASED, model.autoscaleType()); - Assertions.assertEquals("hdzhlrqj", model.scheduleBasedConfig().timeZone()); - Assertions.assertEquals(203364386, model.scheduleBasedConfig().defaultCount()); - Assertions.assertEquals("kfrlhrxsbky", model.scheduleBasedConfig().schedules().get(0).startTime()); - Assertions.assertEquals("pycanuzbpz", model.scheduleBasedConfig().schedules().get(0).endTime()); - Assertions.assertEquals(1414672968, model.scheduleBasedConfig().schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.WEDNESDAY, model.scheduleBasedConfig().schedules().get(0).days().get(0)); - Assertions.assertEquals(870696272, model.loadBasedConfig().minNodes()); - Assertions.assertEquals(1514524475, model.loadBasedConfig().maxNodes()); - Assertions.assertEquals(1300207213, model.loadBasedConfig().pollInterval()); - Assertions.assertEquals(1267023941, model.loadBasedConfig().cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.loadBasedConfig().scalingRules().get(0).actionType()); - Assertions.assertEquals(1198251199, model.loadBasedConfig().scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("eyvjusrtslhspkde", model.loadBasedConfig().scalingRules().get(0).scalingMetric()); - Assertions - .assertEquals( - ComparisonOperator.LESS_THAN, - model.loadBasedConfig().scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(68.91014f, model.loadBasedConfig().scalingRules().get(0).comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java deleted file mode 100644 index 98ad4624dd0cb..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterPoolVersionsListByLocationMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersion; -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 AvailableClusterPoolVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"clusterPoolVersion\":\"qdhcu\",\"aksVersion\":\"cp\",\"isPreview\":true},\"id\":\"khihihlhzds\",\"name\":\"tzbsrgnowcjhf\",\"type\":\"mvec\"}]}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.availableClusterPoolVersions().listByLocation("ieypef", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qdhcu", response.iterator().next().clusterPoolVersion()); - Assertions.assertEquals("cp", response.iterator().next().aksVersion()); - Assertions.assertEquals(true, response.iterator().next().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java deleted file mode 100644 index 614690b5b14c4..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/AvailableClusterVersionsListByLocationMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersion; -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 AvailableClusterVersionsListByLocationMockTests { - @Test - public void testListByLocation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"clusterType\":\"kqvgqouw\",\"clusterVersion\":\"zmpjwyiv\",\"ossVersion\":\"kfxcvhrfs\",\"clusterPoolVersion\":\"uagrttikteusqc\",\"isPreview\":false,\"components\":[{\"name\":\"xubyjaffmmfblcqc\",\"version\":\"bgq\"},{\"name\":\"rtalmet\",\"version\":\"wgdsl\"}]},\"id\":\"xih\",\"name\":\"rmooizqse\",\"type\":\"pxiutc\"}]}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.availableClusterVersions().listByLocation("ctxmwoteyowcluq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kqvgqouw", response.iterator().next().clusterType()); - Assertions.assertEquals("zmpjwyiv", response.iterator().next().clusterVersion()); - Assertions.assertEquals("kfxcvhrfs", response.iterator().next().ossVersion()); - Assertions.assertEquals("uagrttikteusqc", response.iterator().next().clusterPoolVersion()); - Assertions.assertEquals(false, response.iterator().next().isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java deleted file mode 100644 index 54f1bf789cb5f..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterComponentsItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterComponentsItem; -import org.junit.jupiter.api.Assertions; - -public final class ClusterComponentsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterComponentsItem model = - BinaryData - .fromString("{\"name\":\"lexxbczwtru\",\"version\":\"qzbqjvsov\"}") - .toObject(ClusterComponentsItem.class); - Assertions.assertEquals("lexxbczwtru", model.name()); - Assertions.assertEquals("qzbqjvsov", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterComponentsItem model = new ClusterComponentsItem().withName("lexxbczwtru").withVersion("qzbqjvsov"); - model = BinaryData.fromObject(model).toObject(ClusterComponentsItem.class); - Assertions.assertEquals("lexxbczwtru", model.name()); - Assertions.assertEquals("qzbqjvsov", model.version()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java deleted file mode 100644 index 7046d002e43e8..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterConfigFileTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterConfigFileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterConfigFile model = - BinaryData - .fromString( - "{\"fileName\":\"cykvceo\",\"content\":\"ilovnot\",\"encoding\":\"Base64\",\"path\":\"cnjbkcnxdhbt\",\"values\":{\"wpn\":\"h\",\"mclfplphoxuscr\":\"jtoqne\"}}") - .toObject(ClusterConfigFile.class); - Assertions.assertEquals("cykvceo", model.fileName()); - Assertions.assertEquals("ilovnot", model.content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.encoding()); - Assertions.assertEquals("cnjbkcnxdhbt", model.path()); - Assertions.assertEquals("h", model.values().get("wpn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterConfigFile model = - new ClusterConfigFile() - .withFileName("cykvceo") - .withContent("ilovnot") - .withEncoding(ContentEncoding.BASE64) - .withPath("cnjbkcnxdhbt") - .withValues(mapOf("wpn", "h", "mclfplphoxuscr", "jtoqne")); - model = BinaryData.fromObject(model).toObject(ClusterConfigFile.class); - Assertions.assertEquals("cykvceo", model.fileName()); - Assertions.assertEquals("ilovnot", model.content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.encoding()); - Assertions.assertEquals("cnjbkcnxdhbt", model.path()); - Assertions.assertEquals("h", model.values().get("wpn")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java deleted file mode 100644 index 35084b3c0a989..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesStatusTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewPropertiesStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewPropertiesStatus model = - BinaryData - .fromString("{\"ready\":\"jervtia\",\"reason\":\"sdszue\",\"message\":\"sbzkf\"}") - .toObject(ClusterInstanceViewPropertiesStatus.class); - Assertions.assertEquals("jervtia", model.ready()); - Assertions.assertEquals("sdszue", model.reason()); - Assertions.assertEquals("sbzkf", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewPropertiesStatus model = - new ClusterInstanceViewPropertiesStatus().withReady("jervtia").withReason("sdszue").withMessage("sbzkf"); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewPropertiesStatus.class); - Assertions.assertEquals("jervtia", model.ready()); - Assertions.assertEquals("sdszue", model.reason()); - Assertions.assertEquals("sbzkf", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.java deleted file mode 100644 index 4b8c5f3c36f48..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewPropertiesTests.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.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewProperties model = - BinaryData - .fromString( - "{\"status\":{\"ready\":\"xje\",\"reason\":\"lwnwxuqlcvydyp\",\"message\":\"dooaojkniodko\"},\"serviceStatuses\":[{\"kind\":\"bw\",\"ready\":\"ujhemmsbvdkcrodt\",\"message\":\"nfwjlfltkacjvefk\"},{\"kind\":\"lfoakg\",\"ready\":\"kfpagao\",\"message\":\"ulpqblylsyxkqjn\"}]}") - .toObject(ClusterInstanceViewProperties.class); - Assertions.assertEquals("xje", model.status().ready()); - Assertions.assertEquals("lwnwxuqlcvydyp", model.status().reason()); - Assertions.assertEquals("dooaojkniodko", model.status().message()); - Assertions.assertEquals("bw", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("ujhemmsbvdkcrodt", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("nfwjlfltkacjvefk", model.serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewProperties model = - new ClusterInstanceViewProperties() - .withStatus( - new ClusterInstanceViewPropertiesStatus() - .withReady("xje") - .withReason("lwnwxuqlcvydyp") - .withMessage("dooaojkniodko")) - .withServiceStatuses( - Arrays - .asList( - new ServiceStatus() - .withKind("bw") - .withReady("ujhemmsbvdkcrodt") - .withMessage("nfwjlfltkacjvefk"), - new ServiceStatus() - .withKind("lfoakg") - .withReady("kfpagao") - .withMessage("ulpqblylsyxkqjn"))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewProperties.class); - Assertions.assertEquals("xje", model.status().ready()); - Assertions.assertEquals("lwnwxuqlcvydyp", model.status().reason()); - Assertions.assertEquals("dooaojkniodko", model.status().message()); - Assertions.assertEquals("bw", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("ujhemmsbvdkcrodt", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("nfwjlfltkacjvefk", model.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java deleted file mode 100644 index 00af22ef60983..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultInnerTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewResultInner model = - BinaryData - .fromString( - "{\"name\":\"qidbqfatpxllrxcy\",\"properties\":{\"status\":{\"ready\":\"moadsuvarmy\",\"reason\":\"mjsjqb\",\"message\":\"hyxxrwlycoduhpk\"},\"serviceStatuses\":[{\"kind\":\"gymare\",\"ready\":\"n\",\"message\":\"xqugjhkycubedd\"},{\"kind\":\"ssofwqmzqa\",\"ready\":\"krmnjijpxacqqud\",\"message\":\"byxbaaabjy\"},{\"kind\":\"ayffim\",\"ready\":\"zrtuzq\",\"message\":\"sexnevfdnw\"},{\"kind\":\"wmewzsyy\",\"ready\":\"euzsoi\",\"message\":\"ud\"}]}}") - .toObject(ClusterInstanceViewResultInner.class); - Assertions.assertEquals("qidbqfatpxllrxcy", model.name()); - Assertions.assertEquals("moadsuvarmy", model.status().ready()); - Assertions.assertEquals("mjsjqb", model.status().reason()); - Assertions.assertEquals("hyxxrwlycoduhpk", model.status().message()); - Assertions.assertEquals("gymare", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("n", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("xqugjhkycubedd", model.serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewResultInner model = - new ClusterInstanceViewResultInner() - .withName("qidbqfatpxllrxcy") - .withStatus( - new ClusterInstanceViewPropertiesStatus() - .withReady("moadsuvarmy") - .withReason("mjsjqb") - .withMessage("hyxxrwlycoduhpk")) - .withServiceStatuses( - Arrays - .asList( - new ServiceStatus().withKind("gymare").withReady("n").withMessage("xqugjhkycubedd"), - new ServiceStatus() - .withKind("ssofwqmzqa") - .withReady("krmnjijpxacqqud") - .withMessage("byxbaaabjy"), - new ServiceStatus().withKind("ayffim").withReady("zrtuzq").withMessage("sexnevfdnw"), - new ServiceStatus().withKind("wmewzsyy").withReady("euzsoi").withMessage("ud"))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewResultInner.class); - Assertions.assertEquals("qidbqfatpxllrxcy", model.name()); - Assertions.assertEquals("moadsuvarmy", model.status().ready()); - Assertions.assertEquals("mjsjqb", model.status().reason()); - Assertions.assertEquals("hyxxrwlycoduhpk", model.status().message()); - Assertions.assertEquals("gymare", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("n", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("xqugjhkycubedd", model.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java deleted file mode 100644 index 7ff8790796f04..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewResultPropertiesTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewResultPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewResultProperties model = - BinaryData - .fromString( - "{\"status\":{\"ready\":\"frxtrthzvaytdwk\",\"reason\":\"rqubpaxhexiil\",\"message\":\"pdtii\"},\"serviceStatuses\":[{\"kind\":\"tdqoaxoruzfgsq\",\"ready\":\"yfxrx\",\"message\":\"eptra\"}]}") - .toObject(ClusterInstanceViewResultProperties.class); - Assertions.assertEquals("frxtrthzvaytdwk", model.status().ready()); - Assertions.assertEquals("rqubpaxhexiil", model.status().reason()); - Assertions.assertEquals("pdtii", model.status().message()); - Assertions.assertEquals("tdqoaxoruzfgsq", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("yfxrx", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("eptra", model.serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewResultProperties model = - new ClusterInstanceViewResultProperties() - .withStatus( - new ClusterInstanceViewPropertiesStatus() - .withReady("frxtrthzvaytdwk") - .withReason("rqubpaxhexiil") - .withMessage("pdtii")) - .withServiceStatuses( - Arrays - .asList( - new ServiceStatus().withKind("tdqoaxoruzfgsq").withReady("yfxrx").withMessage("eptra"))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewResultProperties.class); - Assertions.assertEquals("frxtrthzvaytdwk", model.status().ready()); - Assertions.assertEquals("rqubpaxhexiil", model.status().reason()); - Assertions.assertEquals("pdtii", model.status().message()); - Assertions.assertEquals("tdqoaxoruzfgsq", model.serviceStatuses().get(0).kind()); - Assertions.assertEquals("yfxrx", model.serviceStatuses().get(0).ready()); - Assertions.assertEquals("eptra", model.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java deleted file mode 100644 index e6e0b1233a23b..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewStatusTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewStatus; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewStatus model = - BinaryData - .fromString("{\"ready\":\"beyvpnqicvinvkjj\",\"reason\":\"xrbuukzclew\",\"message\":\"mlwpazt\"}") - .toObject(ClusterInstanceViewStatus.class); - Assertions.assertEquals("beyvpnqicvinvkjj", model.ready()); - Assertions.assertEquals("xrbuukzclew", model.reason()); - Assertions.assertEquals("mlwpazt", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewStatus model = - new ClusterInstanceViewStatus() - .withReady("beyvpnqicvinvkjj") - .withReason("xrbuukzclew") - .withMessage("mlwpazt"); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewStatus.class); - Assertions.assertEquals("beyvpnqicvinvkjj", model.ready()); - Assertions.assertEquals("xrbuukzclew", model.reason()); - Assertions.assertEquals("mlwpazt", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.java deleted file mode 100644 index 79806130d85f7..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterInstanceViewsResultTests.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.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewPropertiesStatus; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewsResult; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterInstanceViewsResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterInstanceViewsResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"rgjhxb\",\"properties\":{\"status\":{\"ready\":\"dtlwwrlkd\",\"reason\":\"ncvokotllxdyhg\",\"message\":\"ocogj\"},\"serviceStatuses\":[{\"kind\":\"dtbnnha\",\"ready\":\"oocrkvcikhnv\",\"message\":\"mqg\"},{\"kind\":\"qqu\",\"ready\":\"zikywgg\",\"message\":\"allatmelwuipic\"},{\"kind\":\"jzkzi\",\"ready\":\"gvvcnayrhyr\",\"message\":\"xmueed\"}]}},{\"name\":\"drd\",\"properties\":{\"status\":{\"ready\":\"stkwqqtch\",\"reason\":\"lmfmtdaay\",\"message\":\"v\"},\"serviceStatuses\":[{\"kind\":\"gpiohgwxrtfudxe\",\"ready\":\"xg\",\"message\":\"agvrvmnpkuk\"},{\"kind\":\"himdbl\",\"ready\":\"gwimfn\",\"message\":\"fjxwmsz\"},{\"kind\":\"kfoqreyfkzikfj\",\"ready\":\"wneaiv\",\"message\":\"czelpcirel\"}]}},{\"name\":\"feaenwab\",\"properties\":{\"status\":{\"ready\":\"atklddxbjhwuaa\",\"reason\":\"zjosp\",\"message\":\"oulpjrv\"},\"serviceStatuses\":[{\"kind\":\"glrvimjwosytxi\",\"ready\":\"cskfcktqumiekk\",\"message\":\"zikhl\"}]}}],\"nextLink\":\"jhdgqggebdunyga\"}") - .toObject(ClusterInstanceViewsResult.class); - Assertions.assertEquals("rgjhxb", model.value().get(0).name()); - Assertions.assertEquals("dtlwwrlkd", model.value().get(0).status().ready()); - Assertions.assertEquals("ncvokotllxdyhg", model.value().get(0).status().reason()); - Assertions.assertEquals("ocogj", model.value().get(0).status().message()); - Assertions.assertEquals("dtbnnha", model.value().get(0).serviceStatuses().get(0).kind()); - Assertions.assertEquals("oocrkvcikhnv", model.value().get(0).serviceStatuses().get(0).ready()); - Assertions.assertEquals("mqg", model.value().get(0).serviceStatuses().get(0).message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterInstanceViewsResult model = - new ClusterInstanceViewsResult() - .withValue( - Arrays - .asList( - new ClusterInstanceViewResultInner() - .withName("rgjhxb") - .withStatus( - new ClusterInstanceViewPropertiesStatus() - .withReady("dtlwwrlkd") - .withReason("ncvokotllxdyhg") - .withMessage("ocogj")) - .withServiceStatuses( - Arrays - .asList( - new ServiceStatus() - .withKind("dtbnnha") - .withReady("oocrkvcikhnv") - .withMessage("mqg"), - new ServiceStatus() - .withKind("qqu") - .withReady("zikywgg") - .withMessage("allatmelwuipic"), - new ServiceStatus() - .withKind("jzkzi") - .withReady("gvvcnayrhyr") - .withMessage("xmueed"))), - new ClusterInstanceViewResultInner() - .withName("drd") - .withStatus( - new ClusterInstanceViewPropertiesStatus() - .withReady("stkwqqtch") - .withReason("lmfmtdaay") - .withMessage("v")) - .withServiceStatuses( - Arrays - .asList( - new ServiceStatus() - .withKind("gpiohgwxrtfudxe") - .withReady("xg") - .withMessage("agvrvmnpkuk"), - new ServiceStatus() - .withKind("himdbl") - .withReady("gwimfn") - .withMessage("fjxwmsz"), - new ServiceStatus() - .withKind("kfoqreyfkzikfj") - .withReady("wneaiv") - .withMessage("czelpcirel"))), - new ClusterInstanceViewResultInner() - .withName("feaenwab") - .withStatus( - new ClusterInstanceViewPropertiesStatus() - .withReady("atklddxbjhwuaa") - .withReason("zjosp") - .withMessage("oulpjrv")) - .withServiceStatuses( - Arrays - .asList( - new ServiceStatus() - .withKind("glrvimjwosytxi") - .withReady("cskfcktqumiekk") - .withMessage("zikhl"))))); - model = BinaryData.fromObject(model).toObject(ClusterInstanceViewsResult.class); - Assertions.assertEquals("rgjhxb", model.value().get(0).name()); - Assertions.assertEquals("dtlwwrlkd", model.value().get(0).status().ready()); - Assertions.assertEquals("ncvokotllxdyhg", model.value().get(0).status().reason()); - Assertions.assertEquals("ocogj", model.value().get(0).status().message()); - Assertions.assertEquals("dtbnnha", model.value().get(0).serviceStatuses().get(0).kind()); - Assertions.assertEquals("oocrkvcikhnv", model.value().get(0).serviceStatuses().get(0).ready()); - Assertions.assertEquals("mqg", model.value().get(0).serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java deleted file mode 100644 index 92211bce6ef55..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; - -public final class ClusterJobInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobInner model = - BinaryData - .fromString( - "{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"gx\",\"name\":\"xrslpm\",\"type\":\"twuoegrpkhjwni\"}") - .toObject(ClusterJobInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobInner model = new ClusterJobInner().withProperties(new ClusterJobProperties()); - model = BinaryData.fromObject(model).toObject(ClusterJobInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java deleted file mode 100644 index 28cf4f78eb2b8..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobListTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobList; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterJobListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"luicpdggkzzlvmbm\",\"name\":\"axmodfvuef\",\"type\":\"wsbpfvm\"},{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"hrfou\",\"name\":\"ft\",\"type\":\"akcp\"}],\"nextLink\":\"yzvqt\"}") - .toObject(ClusterJobList.class); - Assertions.assertEquals("yzvqt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobList model = - new ClusterJobList() - .withValue( - Arrays - .asList( - new ClusterJobInner().withProperties(new ClusterJobProperties()), - new ClusterJobInner().withProperties(new ClusterJobProperties()))) - .withNextLink("yzvqt"); - model = BinaryData.fromObject(model).toObject(ClusterJobList.class); - Assertions.assertEquals("yzvqt", model.nextLink()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java deleted file mode 100644 index cc57ab1408902..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobPropertiesTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; - -public final class ClusterJobPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterJobProperties model = - BinaryData.fromString("{\"jobType\":\"ClusterJobProperties\"}").toObject(ClusterJobProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterJobProperties model = new ClusterJobProperties(); - model = BinaryData.fromObject(model).toObject(ClusterJobProperties.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.java deleted file mode 100644 index ec717bbd07b23..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsListMockTests.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.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -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 ClusterJobsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"ukiscvwmzhw\",\"name\":\"lefaxvxilcbtgn\",\"type\":\"nzeyqxtjj\"}]}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusterJobs().list("cdyuibhmfdnbzyd", "f", "fcjnaeoisrvhmgor", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.java deleted file mode 100644 index be8f9c2f51366..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterJobsRunJobMockTests.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.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJob; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties; -import java.nio.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 ClusterJobsRunJobMockTests { - @Test - public void testRunJob() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"jobType\":\"ClusterJobProperties\"},\"id\":\"bunzozudh\",\"name\":\"xg\",\"type\":\"moy\"}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterJob response = - manager - .clusterJobs() - .runJob( - "qojpy", - "vgtrdcnifmzzs", - "ymbrnysuxmpraf", - new ClusterJobInner().withProperties(new ClusterJobProperties()), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java deleted file mode 100644 index 3dada01eae9be..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsApplicationLogsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLogAnalyticsApplicationLogsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLogAnalyticsApplicationLogs model = - BinaryData - .fromString("{\"stdOutEnabled\":true,\"stdErrorEnabled\":false}") - .toObject(ClusterLogAnalyticsApplicationLogs.class); - Assertions.assertEquals(true, model.stdOutEnabled()); - Assertions.assertEquals(false, model.stdErrorEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLogAnalyticsApplicationLogs model = - new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true).withStdErrorEnabled(false); - model = BinaryData.fromObject(model).toObject(ClusterLogAnalyticsApplicationLogs.class); - Assertions.assertEquals(true, model.stdOutEnabled()); - Assertions.assertEquals(false, model.stdErrorEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java deleted file mode 100644 index a9cbeb91e81ff..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterLogAnalyticsProfileTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsApplicationLogs; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterLogAnalyticsProfile model = - BinaryData - .fromString( - "{\"enabled\":true,\"applicationLogs\":{\"stdOutEnabled\":false,\"stdErrorEnabled\":false},\"metricsEnabled\":true}") - .toObject(ClusterLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(false, model.applicationLogs().stdOutEnabled()); - Assertions.assertEquals(false, model.applicationLogs().stdErrorEnabled()); - Assertions.assertEquals(true, model.metricsEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterLogAnalyticsProfile model = - new ClusterLogAnalyticsProfile() - .withEnabled(true) - .withApplicationLogs( - new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(false).withStdErrorEnabled(false)) - .withMetricsEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(false, model.applicationLogs().stdOutEnabled()); - Assertions.assertEquals(false, model.applicationLogs().stdErrorEnabled()); - Assertions.assertEquals(true, model.metricsEnabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java deleted file mode 100644 index c34dded0cd467..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolComputeProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolComputeProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolComputeProfile model = - BinaryData.fromString("{\"vmSize\":\"hiv\",\"count\":1846033}").toObject(ClusterPoolComputeProfile.class); - Assertions.assertEquals("hiv", model.vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolComputeProfile model = new ClusterPoolComputeProfile().withVmSize("hiv"); - model = BinaryData.fromObject(model).toObject(ClusterPoolComputeProfile.class); - Assertions.assertEquals("hiv", model.vmSize()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java deleted file mode 100644 index 3bc87a7b132b4..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolInnerTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\",\"deploymentId\":\"uv\",\"managedResourceGroupName\":\"xpyb\",\"aksManagedResourceGroupName\":\"m\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"mtz\"},\"computeProfile\":{\"vmSize\":\"pbsphrupidgs\",\"count\":1332019186},\"aksClusterProfile\":{\"aksClusterResourceId\":\"hphoycm\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ao\",\"msiClientId\":\"hdxbmtqio\",\"msiObjectId\":\"jzehtb\"},\"aksVersion\":\"fpownoizhwlr\"},\"networkProfile\":{\"subnetId\":\"bqsoqijg\"},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"pazlobcufpdz\"},\"status\":\"btcqq\"},\"location\":\"qglhq\",\"tags\":{\"wifsq\":\"foooj\"},\"id\":\"saagdf\",\"name\":\"glzlhjxrifkwmrv\",\"type\":\"tsizntocipaoua\"}") - .toObject(ClusterPoolInner.class); - Assertions.assertEquals("qglhq", model.location()); - Assertions.assertEquals("foooj", model.tags().get("wifsq")); - Assertions.assertEquals("xpyb", model.managedResourceGroupName()); - Assertions.assertEquals("mtz", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("pbsphrupidgs", model.computeProfile().vmSize()); - Assertions.assertEquals("bqsoqijg", model.networkProfile().subnetId()); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("pazlobcufpdz", model.logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolInner model = - new ClusterPoolInner() - .withLocation("qglhq") - .withTags(mapOf("wifsq", "foooj")) - .withManagedResourceGroupName("xpyb") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("mtz")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("pbsphrupidgs")) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("bqsoqijg")) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile() - .withEnabled(true) - .withWorkspaceId("pazlobcufpdz")); - model = BinaryData.fromObject(model).toObject(ClusterPoolInner.class); - Assertions.assertEquals("qglhq", model.location()); - Assertions.assertEquals("foooj", model.tags().get("wifsq")); - Assertions.assertEquals("xpyb", model.managedResourceGroupName()); - Assertions.assertEquals("mtz", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("pbsphrupidgs", model.computeProfile().vmSize()); - Assertions.assertEquals("bqsoqijg", model.networkProfile().subnetId()); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("pazlobcufpdz", model.logAnalyticsProfile().workspaceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java deleted file mode 100644 index c35e24121476f..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolListResultTests.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolListResult; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"deploymentId\":\"ybb\",\"managedResourceGroupName\":\"odepoogin\",\"aksManagedResourceGroupName\":\"amiheognarxz\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"heotusiv\"},\"computeProfile\":{\"vmSize\":\"evcciqihnhun\",\"count\":1154149650},\"aksClusterProfile\":{\"aksClusterResourceId\":\"rnfygxgispem\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"zfkufubljofx\",\"msiClientId\":\"eofjaeqjh\",\"msiObjectId\":\"jbasvmsmjqulngs\"},\"aksVersion\":\"nbybkzgcwrwcl\"},\"networkProfile\":{\"subnetId\":\"wrljdouskc\"},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"cr\"},\"status\":\"dkwt\"},\"location\":\"xbnjbiksq\",\"tags\":{\"fmppe\":\"ssainqpjwnzll\",\"c\":\"bvmgxsabkyqduuji\"},\"id\":\"czdzev\",\"name\":\"dhkrwpdappdsbdk\",\"type\":\"wrwjfeu\"},{\"properties\":{\"provisioningState\":\"Failed\",\"deploymentId\":\"je\",\"managedResourceGroupName\":\"mrldhu\",\"aksManagedResourceGroupName\":\"zzd\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"qxhocdgeablgphut\"},\"computeProfile\":{\"vmSize\":\"cndvkaozwyiftyhx\",\"count\":1298689588},\"aksClusterProfile\":{\"aksClusterResourceId\":\"ftyxolniw\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"cukjf\",\"msiClientId\":\"giawx\",\"msiObjectId\":\"lryplwckbasyy\"},\"aksVersion\":\"ddhsgcbacphe\"},\"networkProfile\":{\"subnetId\":\"ot\"},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"oulzndlikwyq\"},\"status\":\"fgibmadgakeq\"},\"location\":\"xybz\",\"tags\":{\"kzsmodm\":\"dqytbciqfouflmm\"},\"id\":\"lougpbkw\",\"name\":\"mutduqktaps\",\"type\":\"wgcu\"},{\"properties\":{\"provisioningState\":\"Failed\",\"deploymentId\":\"kdosvqw\",\"managedResourceGroupName\":\"mdgbbjfdd\",\"aksManagedResourceGroupName\":\"bmbexppbhtqqro\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"p\"},\"computeProfile\":{\"vmSize\":\"psalgbqux\",\"count\":596871405},\"aksClusterProfile\":{\"aksClusterResourceId\":\"gzjaoyfhrtxilne\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ujysvle\",\"msiClientId\":\"uvfqawrlyxwj\",\"msiObjectId\":\"cpr\"},\"aksVersion\":\"wbxgjvt\"},\"networkProfile\":{\"subnetId\":\"p\"},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"dnrujqguhmuouqfp\"},\"status\":\"zw\"},\"location\":\"g\",\"tags\":{\"gazxuf\":\"nwui\"},\"id\":\"zuckyfi\",\"name\":\"rfidfvzwdz\",\"type\":\"htymw\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"deploymentId\":\"thwxmnteiwaopvkm\",\"managedResourceGroupName\":\"c\",\"aksManagedResourceGroupName\":\"xdcu\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"fsrpymzidnse\"},\"computeProfile\":{\"vmSize\":\"cxtbzsg\",\"count\":121296393},\"aksClusterProfile\":{\"aksClusterResourceId\":\"newmdwzjeiachbo\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"flnrosfqpteehzz\",\"msiClientId\":\"ypyqrimzinp\",\"msiObjectId\":\"swjdkirso\"},\"aksVersion\":\"qxhcrmn\"},\"networkProfile\":{\"subnetId\":\"jtckwhdso\"},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"i\"},\"status\":\"xsqwpgrjbznorc\"},\"location\":\"vsnb\",\"tags\":{\"zafb\":\"abnmocpcyshu\",\"oq\":\"jjgpb\"},\"id\":\"jmkljavbqidtqajz\",\"name\":\"ulpkudjkrl\",\"type\":\"hbzhfepg\"}],\"nextLink\":\"qex\"}") - .toObject(ClusterPoolListResult.class); - Assertions.assertEquals("xbnjbiksq", model.value().get(0).location()); - Assertions.assertEquals("ssainqpjwnzll", model.value().get(0).tags().get("fmppe")); - Assertions.assertEquals("odepoogin", model.value().get(0).managedResourceGroupName()); - Assertions.assertEquals("heotusiv", model.value().get(0).clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("evcciqihnhun", model.value().get(0).computeProfile().vmSize()); - Assertions.assertEquals("wrljdouskc", model.value().get(0).networkProfile().subnetId()); - Assertions.assertEquals(true, model.value().get(0).logAnalyticsProfile().enabled()); - Assertions.assertEquals("cr", model.value().get(0).logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolListResult model = - new ClusterPoolListResult() - .withValue( - Arrays - .asList( - new ClusterPoolInner() - .withLocation("xbnjbiksq") - .withTags(mapOf("fmppe", "ssainqpjwnzll", "c", "bvmgxsabkyqduuji")) - .withManagedResourceGroupName("odepoogin") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile() - .withClusterPoolVersion("heotusiv")) - .withComputeProfile( - new ClusterPoolResourcePropertiesComputeProfile().withVmSize("evcciqihnhun")) - .withNetworkProfile( - new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("wrljdouskc")) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile() - .withEnabled(true) - .withWorkspaceId("cr")), - new ClusterPoolInner() - .withLocation("xybz") - .withTags(mapOf("kzsmodm", "dqytbciqfouflmm")) - .withManagedResourceGroupName("mrldhu") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile() - .withClusterPoolVersion("qxhocdgeablgphut")) - .withComputeProfile( - new ClusterPoolResourcePropertiesComputeProfile().withVmSize("cndvkaozwyiftyhx")) - .withNetworkProfile( - new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("ot")) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile() - .withEnabled(false) - .withWorkspaceId("oulzndlikwyq")), - new ClusterPoolInner() - .withLocation("g") - .withTags(mapOf("gazxuf", "nwui")) - .withManagedResourceGroupName("mdgbbjfdd") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("p")) - .withComputeProfile( - new ClusterPoolResourcePropertiesComputeProfile().withVmSize("psalgbqux")) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("p")) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile() - .withEnabled(false) - .withWorkspaceId("dnrujqguhmuouqfp")), - new ClusterPoolInner() - .withLocation("vsnb") - .withTags(mapOf("zafb", "abnmocpcyshu", "oq", "jjgpb")) - .withManagedResourceGroupName("c") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile() - .withClusterPoolVersion("fsrpymzidnse")) - .withComputeProfile( - new ClusterPoolResourcePropertiesComputeProfile().withVmSize("cxtbzsg")) - .withNetworkProfile( - new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("jtckwhdso")) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile() - .withEnabled(false) - .withWorkspaceId("i")))); - model = BinaryData.fromObject(model).toObject(ClusterPoolListResult.class); - Assertions.assertEquals("xbnjbiksq", model.value().get(0).location()); - Assertions.assertEquals("ssainqpjwnzll", model.value().get(0).tags().get("fmppe")); - Assertions.assertEquals("odepoogin", model.value().get(0).managedResourceGroupName()); - Assertions.assertEquals("heotusiv", model.value().get(0).clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("evcciqihnhun", model.value().get(0).computeProfile().vmSize()); - Assertions.assertEquals("wrljdouskc", model.value().get(0).networkProfile().subnetId()); - Assertions.assertEquals(true, model.value().get(0).logAnalyticsProfile().enabled()); - Assertions.assertEquals("cr", model.value().get(0).logAnalyticsProfile().workspaceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java deleted file mode 100644 index 4195817874b92..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolLogAnalyticsProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolLogAnalyticsProfile model = - BinaryData - .fromString("{\"enabled\":false,\"workspaceId\":\"ahbc\"}") - .toObject(ClusterPoolLogAnalyticsProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("ahbc", model.workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolLogAnalyticsProfile model = - new ClusterPoolLogAnalyticsProfile().withEnabled(false).withWorkspaceId("ahbc"); - model = BinaryData.fromObject(model).toObject(ClusterPoolLogAnalyticsProfile.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("ahbc", model.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java deleted file mode 100644 index 26673db80f5b0..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolNetworkProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolNetworkProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolNetworkProfile model = - BinaryData.fromString("{\"subnetId\":\"vwryoqpso\"}").toObject(ClusterPoolNetworkProfile.class); - Assertions.assertEquals("vwryoqpso", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolNetworkProfile model = new ClusterPoolNetworkProfile().withSubnetId("vwryoqpso"); - model = BinaryData.fromObject(model).toObject(ClusterPoolNetworkProfile.class); - Assertions.assertEquals("vwryoqpso", model.subnetId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java deleted file mode 100644 index 94fbdb59b1a76..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolProfile model = - BinaryData.fromString("{\"clusterPoolVersion\":\"ithxqhabifpi\"}").toObject(ClusterPoolProfile.class); - Assertions.assertEquals("ithxqhabifpi", model.clusterPoolVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolProfile model = new ClusterPoolProfile().withClusterPoolVersion("ithxqhabifpi"); - model = BinaryData.fromObject(model).toObject(ClusterPoolProfile.class); - Assertions.assertEquals("ithxqhabifpi", model.clusterPoolVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java deleted file mode 100644 index 103fc92ddd56d..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesAksClusterProfileTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.AksClusterProfileAksClusterAgentPoolIdentityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesAksClusterProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesAksClusterProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesAksClusterProfile model = - BinaryData - .fromString( - "{\"aksClusterResourceId\":\"wby\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"k\",\"msiClientId\":\"vd\",\"msiObjectId\":\"mjgr\"},\"aksVersion\":\"wvukx\"}") - .toObject(ClusterPoolResourcePropertiesAksClusterProfile.class); - Assertions.assertEquals("wby", model.aksClusterResourceId()); - Assertions.assertEquals("k", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("vd", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("mjgr", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesAksClusterProfile model = - new ClusterPoolResourcePropertiesAksClusterProfile() - .withAksClusterResourceId("wby") - .withAksClusterAgentPoolIdentityProfile( - new AksClusterProfileAksClusterAgentPoolIdentityProfile() - .withMsiResourceId("k") - .withMsiClientId("vd") - .withMsiObjectId("mjgr")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesAksClusterProfile.class); - Assertions.assertEquals("wby", model.aksClusterResourceId()); - Assertions.assertEquals("k", model.aksClusterAgentPoolIdentityProfile().msiResourceId()); - Assertions.assertEquals("vd", model.aksClusterAgentPoolIdentityProfile().msiClientId()); - Assertions.assertEquals("mjgr", model.aksClusterAgentPoolIdentityProfile().msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java deleted file mode 100644 index d134e222c2615..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesClusterPoolProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesClusterPoolProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesClusterPoolProfile model = - BinaryData - .fromString("{\"clusterPoolVersion\":\"a\"}") - .toObject(ClusterPoolResourcePropertiesClusterPoolProfile.class); - Assertions.assertEquals("a", model.clusterPoolVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesClusterPoolProfile model = - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("a"); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesClusterPoolProfile.class); - Assertions.assertEquals("a", model.clusterPoolVersion()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java deleted file mode 100644 index 0a553fc3e46cd..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesComputeProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesComputeProfile model = - BinaryData - .fromString("{\"vmSize\":\"xwczbyscnp\",\"count\":219984358}") - .toObject(ClusterPoolResourcePropertiesComputeProfile.class); - Assertions.assertEquals("xwczbyscnp", model.vmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesComputeProfile model = - new ClusterPoolResourcePropertiesComputeProfile().withVmSize("xwczbyscnp"); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesComputeProfile.class); - Assertions.assertEquals("xwczbyscnp", model.vmSize()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java deleted file mode 100644 index b9d90bf6d9a12..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesLogAnalyticsProfileTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesLogAnalyticsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesLogAnalyticsProfile model = - BinaryData - .fromString("{\"enabled\":true,\"workspaceId\":\"tazak\"}") - .toObject(ClusterPoolResourcePropertiesLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("tazak", model.workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesLogAnalyticsProfile model = - new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(true).withWorkspaceId("tazak"); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesLogAnalyticsProfile.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("tazak", model.workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java deleted file mode 100644 index f2bd34496edb2..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesNetworkProfileTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourcePropertiesNetworkProfile model = - BinaryData - .fromString("{\"subnetId\":\"odjpslwejd\"}") - .toObject(ClusterPoolResourcePropertiesNetworkProfile.class); - Assertions.assertEquals("odjpslwejd", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourcePropertiesNetworkProfile model = - new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("odjpslwejd"); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourcePropertiesNetworkProfile.class); - Assertions.assertEquals("odjpslwejd", model.subnetId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.java deleted file mode 100644 index 49bdb5fa4fded..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolResourcePropertiesTests.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.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolResourceProperties; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolResourceProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Accepted\",\"deploymentId\":\"ucmpoyfd\",\"managedResourceGroupName\":\"ogknygjofjdd\",\"aksManagedResourceGroupName\":\"s\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"eupewnwreitjz\"},\"computeProfile\":{\"vmSize\":\"flusarhmof\",\"count\":313282977},\"aksClusterProfile\":{\"aksClusterResourceId\":\"yurkdtmlxhekuksj\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"ukcdmparcryuanzw\",\"msiClientId\":\"xzdxtayrlhmwh\",\"msiObjectId\":\"pmrqobm\"},\"aksVersion\":\"kknryrtihf\"},\"networkProfile\":{\"subnetId\":\"ijbpzvgnwzsymgl\"},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"yzkohdbihanuf\"},\"status\":\"cbjy\"}") - .toObject(ClusterPoolResourceProperties.class); - Assertions.assertEquals("ogknygjofjdd", model.managedResourceGroupName()); - Assertions.assertEquals("eupewnwreitjz", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("flusarhmof", model.computeProfile().vmSize()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.networkProfile().subnetId()); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("yzkohdbihanuf", model.logAnalyticsProfile().workspaceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolResourceProperties model = - new ClusterPoolResourceProperties() - .withManagedResourceGroupName("ogknygjofjdd") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("eupewnwreitjz")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("flusarhmof")) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("ijbpzvgnwzsymgl")) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile() - .withEnabled(true) - .withWorkspaceId("yzkohdbihanuf")); - model = BinaryData.fromObject(model).toObject(ClusterPoolResourceProperties.class); - Assertions.assertEquals("ogknygjofjdd", model.managedResourceGroupName()); - Assertions.assertEquals("eupewnwreitjz", model.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("flusarhmof", model.computeProfile().vmSize()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.networkProfile().subnetId()); - Assertions.assertEquals(true, model.logAnalyticsProfile().enabled()); - Assertions.assertEquals("yzkohdbihanuf", model.logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java deleted file mode 100644 index b1ea80fd6ba07..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"clusterPoolVersion\":\"ae\",\"aksVersion\":\"iahxicsl\",\"isPreview\":true},\"id\":\"qzpiyyl\",\"name\":\"alnswhccsphk\",\"type\":\"ivwitqscywugg\"}") - .toObject(ClusterPoolVersionInner.class); - Assertions.assertEquals("ae", model.clusterPoolVersion()); - Assertions.assertEquals("iahxicsl", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionInner model = - new ClusterPoolVersionInner().withClusterPoolVersion("ae").withAksVersion("iahxicsl").withIsPreview(true); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionInner.class); - Assertions.assertEquals("ae", model.clusterPoolVersion()); - Assertions.assertEquals("iahxicsl", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java deleted file mode 100644 index 778030c23e806..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionProperties model = - BinaryData - .fromString("{\"clusterPoolVersion\":\"luhczbw\",\"aksVersion\":\"hairsbrgzdwms\",\"isPreview\":true}") - .toObject(ClusterPoolVersionProperties.class); - Assertions.assertEquals("luhczbw", model.clusterPoolVersion()); - Assertions.assertEquals("hairsbrgzdwms", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionProperties model = - new ClusterPoolVersionProperties() - .withClusterPoolVersion("luhczbw") - .withAksVersion("hairsbrgzdwms") - .withIsPreview(true); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionProperties.class); - Assertions.assertEquals("luhczbw", model.clusterPoolVersion()); - Assertions.assertEquals("hairsbrgzdwms", model.aksVersion()); - Assertions.assertEquals(true, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.java deleted file mode 100644 index 407c515481f59..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolVersionsListResultTests.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.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPoolVersionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPoolVersionsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"clusterPoolVersion\":\"wntoegokdwbwh\",\"aksVersion\":\"z\",\"isPreview\":false},\"id\":\"rvexztvb\",\"name\":\"qgsfraoyzkoow\",\"type\":\"lmnguxaw\"},{\"properties\":{\"clusterPoolVersion\":\"dsyuuximerqfob\",\"aksVersion\":\"znkbykutwpfhpagm\",\"isPreview\":true},\"id\":\"kdsnfdsdoakgtdl\",\"name\":\"kkze\",\"type\":\"dlhewp\"},{\"properties\":{\"clusterPoolVersion\":\"sttwvogvbbe\",\"aksVersion\":\"cngqqmoakufgmjz\",\"isPreview\":false},\"id\":\"dgrtwaenuuzkopbm\",\"name\":\"nrfdw\",\"type\":\"yuhhziu\"}],\"nextLink\":\"fozbhdmsmlmzqhof\"}") - .toObject(ClusterPoolVersionsListResult.class); - Assertions.assertEquals("wntoegokdwbwh", model.value().get(0).clusterPoolVersion()); - Assertions.assertEquals("z", model.value().get(0).aksVersion()); - Assertions.assertEquals(false, model.value().get(0).isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPoolVersionsListResult model = - new ClusterPoolVersionsListResult() - .withValue( - Arrays - .asList( - new ClusterPoolVersionInner() - .withClusterPoolVersion("wntoegokdwbwh") - .withAksVersion("z") - .withIsPreview(false), - new ClusterPoolVersionInner() - .withClusterPoolVersion("dsyuuximerqfob") - .withAksVersion("znkbykutwpfhpagm") - .withIsPreview(true), - new ClusterPoolVersionInner() - .withClusterPoolVersion("sttwvogvbbe") - .withAksVersion("cngqqmoakufgmjz") - .withIsPreview(false))); - model = BinaryData.fromObject(model).toObject(ClusterPoolVersionsListResult.class); - Assertions.assertEquals("wntoegokdwbwh", model.value().get(0).clusterPoolVersion()); - Assertions.assertEquals("z", model.value().get(0).aksVersion()); - Assertions.assertEquals(false, model.value().get(0).isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 43331507c7656..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesClusterPoolProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesLogAnalyticsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ClusterPoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"twnawjslbiwkojgc\",\"managedResourceGroupName\":\"tsf\",\"aksManagedResourceGroupName\":\"nbaeqphchqn\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"rpxeh\"},\"computeProfile\":{\"vmSize\":\"wrykqgai\",\"count\":1319062444},\"aksClusterProfile\":{\"aksClusterResourceId\":\"lb\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"vkhbejdznx\",\"msiClientId\":\"vdsrhnjiv\",\"msiObjectId\":\"lvtno\"},\"aksVersion\":\"fzg\"},\"networkProfile\":{\"subnetId\":\"jdftuljltd\"},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"mtmczuome\"},\"status\":\"cwwqiokn\"},\"location\":\"xmojmsvpkjp\",\"tags\":{\"zheydbsdshmk\":\"wcfzqljyxgt\"},\"id\":\"maehvbbxurip\",\"name\":\"tfnhtbaxkgxywr\",\"type\":\"kpyklyhp\"}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response = - manager - .clusterPools() - .define("zzxscyhwzdgiruj") - .withRegion("utr") - .withExistingResourceGroup("cluyovwxnbkf") - .withTags(mapOf("qhih", "pauutpw", "fqntcyp", "jqgwzp")) - .withManagedResourceGroupName("niyujv") - .withClusterPoolProfile( - new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("shfssnrbgyef")) - .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("ymsgaojfmwnc")) - .withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId("mrsreuzvxurisjnh")) - .withLogAnalyticsProfile( - new ClusterPoolResourcePropertiesLogAnalyticsProfile().withEnabled(false).withWorkspaceId("ifqjz")) - .create(); - - Assertions.assertEquals("xmojmsvpkjp", response.location()); - Assertions.assertEquals("wcfzqljyxgt", response.tags().get("zheydbsdshmk")); - Assertions.assertEquals("tsf", response.managedResourceGroupName()); - Assertions.assertEquals("rpxeh", response.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("wrykqgai", response.computeProfile().vmSize()); - Assertions.assertEquals("jdftuljltd", response.networkProfile().subnetId()); - Assertions.assertEquals(false, response.logAnalyticsProfile().enabled()); - Assertions.assertEquals("mtmczuome", response.logAnalyticsProfile().workspaceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.java deleted file mode 100644 index b134c8554c2d7..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsDeleteMockTests.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.containers.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.containers.HDInsightContainersManager; -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 ClusterPoolsDeleteMockTests { - @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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusterPools().delete("jjoqkagf", "sxtta", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index b2d7e116ce311..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -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 ClusterPoolsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Canceled\",\"deploymentId\":\"jioolvrwxk\",\"managedResourceGroupName\":\"kkgll\",\"aksManagedResourceGroupName\":\"jygvjayvbl\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"vkzuhbxvvyhgso\"},\"computeProfile\":{\"vmSize\":\"byrqufeg\",\"count\":659096869},\"aksClusterProfile\":{\"aksClusterResourceId\":\"fbn\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"mctlpdngitv\",\"msiClientId\":\"bmhrixkwmyijejv\",\"msiObjectId\":\"grhbpn\"},\"aksVersion\":\"xexccbdreaxhcexd\"},\"networkProfile\":{\"subnetId\":\"vqahqkghtpwi\"},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"jsvfycxzbfvoowv\"},\"status\":\"mtg\"},\"location\":\"ppyostronzmyhgf\",\"tags\":{\"waekrrjreafxtsgu\":\"sxkm\",\"wslolbqp\":\"hjglikk\",\"felfktg\":\"uzlm\",\"xeznoi\":\"lcrpw\"},\"id\":\"brnjwmw\",\"name\":\"pn\",\"type\":\"saz\"}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPool response = - manager - .clusterPools() - .getByResourceGroupWithResponse("yuzhlhkjoqrvq", "aatjinrvgoupmfi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ppyostronzmyhgf", response.location()); - Assertions.assertEquals("sxkm", response.tags().get("waekrrjreafxtsgu")); - Assertions.assertEquals("kkgll", response.managedResourceGroupName()); - Assertions.assertEquals("vkzuhbxvvyhgso", response.clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("byrqufeg", response.computeProfile().vmSize()); - Assertions.assertEquals("vqahqkghtpwi", response.networkProfile().subnetId()); - Assertions.assertEquals(true, response.logAnalyticsProfile().enabled()); - Assertions.assertEquals("jsvfycxzbfvoowv", response.logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.java deleted file mode 100644 index 8143b296783f7..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListByResourceGroupMockTests.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.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -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 ClusterPoolsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentId\":\"nqfiufxqknpi\",\"managedResourceGroupName\":\"nepttwqmsni\",\"aksManagedResourceGroupName\":\"cdm\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"r\"},\"computeProfile\":{\"vmSize\":\"jlpijnkrx\",\"count\":621511915},\"aksClusterProfile\":{\"aksClusterResourceId\":\"c\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"tizzronasxif\",\"msiClientId\":\"ozqyzh\",\"msiObjectId\":\"tw\"},\"aksVersion\":\"gogczhonnxkrlgny\"},\"networkProfile\":{\"subnetId\":\"ossxk\"},\"logAnalyticsProfile\":{\"enabled\":false,\"workspaceId\":\"rrghxjbdhqxvcxgf\"},\"status\":\"dsofbshrns\"},\"location\":\"uswdv\",\"tags\":{\"wnopqgikyzirtx\":\"bycnunvjsrtkf\",\"ilqu\":\"yuxzejntpsewgi\",\"eoxorggufhyao\":\"rydxtqm\"},\"id\":\"tbghhavgrvkf\",\"name\":\"ovjzhpjbibgjmfx\",\"type\":\"mv\"}]}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusterPools().listByResourceGroup("ytsbwtovv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uswdv", response.iterator().next().location()); - Assertions.assertEquals("bycnunvjsrtkf", response.iterator().next().tags().get("wnopqgikyzirtx")); - Assertions.assertEquals("nepttwqmsni", response.iterator().next().managedResourceGroupName()); - Assertions.assertEquals("r", response.iterator().next().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("jlpijnkrx", response.iterator().next().computeProfile().vmSize()); - Assertions.assertEquals("ossxk", response.iterator().next().networkProfile().subnetId()); - Assertions.assertEquals(false, response.iterator().next().logAnalyticsProfile().enabled()); - Assertions.assertEquals("rrghxjbdhqxvcxgf", response.iterator().next().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.java deleted file mode 100644 index 56de6674e8b30..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPoolsListMockTests.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.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool; -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 ClusterPoolsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"deploymentId\":\"faazpxdtnkdmkqjj\",\"managedResourceGroupName\":\"uenvrkp\",\"aksManagedResourceGroupName\":\"uaibrebqaaysj\",\"clusterPoolProfile\":{\"clusterPoolVersion\":\"xqtnq\"},\"computeProfile\":{\"vmSize\":\"tezlwff\",\"count\":1105838597},\"aksClusterProfile\":{\"aksClusterResourceId\":\"jpqqmted\",\"aksClusterAgentPoolIdentityProfile\":{\"msiResourceId\":\"mmji\",\"msiClientId\":\"yeozphvwauyqncy\",\"msiObjectId\":\"upkvipmdsc\"},\"aksVersion\":\"qupevzh\"},\"networkProfile\":{\"subnetId\":\"totxhojujb\"},\"logAnalyticsProfile\":{\"enabled\":true,\"workspaceId\":\"mc\"},\"status\":\"hixbjxyfwnyl\"},\"location\":\"ool\",\"tags\":{\"iwkkbn\":\"p\",\"rd\":\"jrywvtylbfpnc\",\"htywubxcbihwq\":\"iwii\",\"wjchrdg\":\"nfdn\"},\"id\":\"ihxumwctondzj\",\"name\":\"uu\",\"type\":\"fdlwg\"}]}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.clusterPools().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ool", response.iterator().next().location()); - Assertions.assertEquals("p", response.iterator().next().tags().get("iwkkbn")); - Assertions.assertEquals("uenvrkp", response.iterator().next().managedResourceGroupName()); - Assertions.assertEquals("xqtnq", response.iterator().next().clusterPoolProfile().clusterPoolVersion()); - Assertions.assertEquals("tezlwff", response.iterator().next().computeProfile().vmSize()); - Assertions.assertEquals("totxhojujb", response.iterator().next().networkProfile().subnetId()); - Assertions.assertEquals(true, response.iterator().next().logAnalyticsProfile().enabled()); - Assertions.assertEquals("mc", response.iterator().next().logAnalyticsProfile().workspaceId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java deleted file mode 100644 index 24b0f263c841a..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterPrometheusProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterPrometheusProfile; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrometheusProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrometheusProfile model = - BinaryData.fromString("{\"enabled\":true}").toObject(ClusterPrometheusProfile.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrometheusProfile model = new ClusterPrometheusProfile().withEnabled(true); - model = BinaryData.fromObject(model).toObject(ClusterPrometheusProfile.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.java deleted file mode 100644 index afbe06b32108f..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizeDataTests.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.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterResizeDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterResizeData model = - BinaryData - .fromString( - "{\"properties\":{\"targetWorkerNodeCount\":1761160515},\"location\":\"pt\",\"tags\":{\"pzfqrhhuaoppp\":\"gpfqbuace\",\"z\":\"qeqxo\"},\"id\":\"ahzxctobgbk\",\"name\":\"moizpos\",\"type\":\"mgrcfbu\"}") - .toObject(ClusterResizeData.class); - Assertions.assertEquals("pt", model.location()); - Assertions.assertEquals("gpfqbuace", model.tags().get("pzfqrhhuaoppp")); - Assertions.assertEquals(1761160515, model.targetWorkerNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterResizeData model = - new ClusterResizeData() - .withLocation("pt") - .withTags(mapOf("pzfqrhhuaoppp", "gpfqbuace", "z", "qeqxo")) - .withTargetWorkerNodeCount(1761160515); - model = BinaryData.fromObject(model).toObject(ClusterResizeData.class); - Assertions.assertEquals("pt", model.location()); - Assertions.assertEquals("gpfqbuace", model.tags().get("pzfqrhhuaoppp")); - Assertions.assertEquals(1761160515, model.targetWorkerNodeCount()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java deleted file mode 100644 index 07d446cf15c66..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterResizePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterResizeProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterResizePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterResizeProperties model = - BinaryData.fromString("{\"targetWorkerNodeCount\":1194461063}").toObject(ClusterResizeProperties.class); - Assertions.assertEquals(1194461063, model.targetWorkerNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterResizeProperties model = new ClusterResizeProperties().withTargetWorkerNodeCount(1194461063); - model = BinaryData.fromObject(model).toObject(ClusterResizeProperties.class); - Assertions.assertEquals(1194461063, model.targetWorkerNodeCount()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java deleted file mode 100644 index 767584ae644cc..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterServiceConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterServiceConfig model = - BinaryData - .fromString( - "{\"component\":\"nkxmyskpbhenbtk\",\"files\":[{\"fileName\":\"ywn\",\"content\":\"nrs\",\"encoding\":\"Base64\",\"path\":\"idybyxczf\",\"values\":{\"fkts\":\"aaxdbabphlwrq\",\"nyyazttbtwwrqpue\":\"hsucoc\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\"}},{\"fileName\":\"zyoxaepdkzjan\",\"content\":\"xrhdwbavxbniwdjs\",\"encoding\":\"Base64\",\"path\":\"dbpgnxytxhp\",\"values\":{\"hxw\":\"zpfzabglc\",\"bbovplwzbhvgyugu\":\"ctyqik\"}},{\"fileName\":\"svmkfssxquk\",\"content\":\"plgmgsxnk\",\"encoding\":\"Base64\",\"path\":\"es\",\"values\":{\"xpkd\":\"lopwiyig\",\"iuebbaumny\":\"zb\",\"txp\":\"upedeojnabckhs\"}},{\"fileName\":\"ie\",\"content\":\"fhvpesaps\",\"encoding\":\"Base64\",\"path\":\"mhjjdhtldwkyzx\",\"values\":{\"ws\":\"kn\",\"vnm\":\"wsvlxotogtwrupqs\"}}]}") - .toObject(ClusterServiceConfig.class); - Assertions.assertEquals("nkxmyskpbhenbtk", model.component()); - Assertions.assertEquals("ywn", model.files().get(0).fileName()); - Assertions.assertEquals("nrs", model.files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.files().get(0).encoding()); - Assertions.assertEquals("idybyxczf", model.files().get(0).path()); - Assertions.assertEquals("aaxdbabphlwrq", model.files().get(0).values().get("fkts")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterServiceConfig model = - new ClusterServiceConfig() - .withComponent("nkxmyskpbhenbtk") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("ywn") - .withContent("nrs") - .withEncoding(ContentEncoding.BASE64) - .withPath("idybyxczf") - .withValues( - mapOf( - "fkts", - "aaxdbabphlwrq", - "nyyazttbtwwrqpue", - "hsucoc", - "xibxujwbhqwalm", - "ckzywbiexzfeyue")), - new ClusterConfigFile() - .withFileName("zyoxaepdkzjan") - .withContent("xrhdwbavxbniwdjs") - .withEncoding(ContentEncoding.BASE64) - .withPath("dbpgnxytxhp") - .withValues(mapOf("hxw", "zpfzabglc", "bbovplwzbhvgyugu", "ctyqik")), - new ClusterConfigFile() - .withFileName("svmkfssxquk") - .withContent("plgmgsxnk") - .withEncoding(ContentEncoding.BASE64) - .withPath("es") - .withValues(mapOf("xpkd", "lopwiyig", "iuebbaumny", "zb", "txp", "upedeojnabckhs")), - new ClusterConfigFile() - .withFileName("ie") - .withContent("fhvpesaps") - .withEncoding(ContentEncoding.BASE64) - .withPath("mhjjdhtldwkyzx") - .withValues(mapOf("ws", "kn", "vnm", "wsvlxotogtwrupqs")))); - model = BinaryData.fromObject(model).toObject(ClusterServiceConfig.class); - Assertions.assertEquals("nkxmyskpbhenbtk", model.component()); - Assertions.assertEquals("ywn", model.files().get(0).fileName()); - Assertions.assertEquals("nrs", model.files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.files().get(0).encoding()); - Assertions.assertEquals("idybyxczf", model.files().get(0).path()); - Assertions.assertEquals("aaxdbabphlwrq", model.files().get(0).values().get("fkts")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java deleted file mode 100644 index f9c42866680dd..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterServiceConfigsProfileTests.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterConfigFile; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfigsProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ContentEncoding; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClusterServiceConfigsProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterServiceConfigsProfile model = - BinaryData - .fromString( - "{\"serviceName\":\"onpc\",\"configs\":[{\"component\":\"ocohslkevleg\",\"files\":[{\"fileName\":\"fbuhfmvfaxkffe\",\"content\":\"th\",\"encoding\":\"Base64\",\"path\":\"zy\",\"values\":{\"grxwbu\":\"xmzsbbzogg\",\"dptkoenkouk\":\"vjxxjnsp\",\"pocipazyxoegu\":\"vudwtiukbldng\",\"npiucgygevqznty\":\"g\"}},{\"fileName\":\"mrbpizcdrqj\",\"content\":\"pyd\",\"encoding\":\"None\",\"path\":\"xdeoejzic\",\"values\":{\"bkh\":\"sjttgzfbish\"}}]},{\"component\":\"jdeyeamdpha\",\"files\":[{\"fileName\":\"lpbuxwgipwhonowk\",\"content\":\"hwankixzbinjepu\",\"encoding\":\"Base64\",\"path\":\"ywnuzoq\",\"values\":{\"zlsico\":\"yqzrnkcqvyxlw\",\"hheunmmqhgyx\":\"oqqnwvlryav\"}},{\"fileName\":\"konocu\",\"content\":\"klyaxuconu\",\"encoding\":\"Base64\",\"path\":\"kbeype\",\"values\":{\"kt\":\"jmwvvj\",\"ffrzpwvlqdqgbiqy\":\"xsenhwlr\",\"vf\":\"ihkaetcktvfc\"}},{\"fileName\":\"nkymuctqhjfbebrj\",\"content\":\"erfuwuttt\",\"encoding\":\"None\",\"path\":\"rbirphxe\",\"values\":{\"jky\":\"vahfn\"}},{\"fileName\":\"xjvuujqgidokg\",\"content\":\"jyoxgvclt\",\"encoding\":\"None\",\"path\":\"c\",\"values\":{\"xbf\":\"jeszzhbijhtxfv\",\"ec\":\"mxnehmp\"}}]},{\"component\":\"godebfqkkrbmpu\",\"files\":[{\"fileName\":\"riwflzlfb\",\"content\":\"puz\",\"encoding\":\"None\",\"path\":\"pnq\",\"values\":{\"qqkpikadrg\":\"mgkbrpyydhibn\",\"jggmebfsiarbu\":\"tqagnbuynh\",\"ttdbhrbnl\":\"rcvpnazzmhjrunmp\"}}]}]}") - .toObject(ClusterServiceConfigsProfile.class); - Assertions.assertEquals("onpc", model.serviceName()); - Assertions.assertEquals("ocohslkevleg", model.configs().get(0).component()); - Assertions.assertEquals("fbuhfmvfaxkffe", model.configs().get(0).files().get(0).fileName()); - Assertions.assertEquals("th", model.configs().get(0).files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.configs().get(0).files().get(0).encoding()); - Assertions.assertEquals("zy", model.configs().get(0).files().get(0).path()); - Assertions.assertEquals("xmzsbbzogg", model.configs().get(0).files().get(0).values().get("grxwbu")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterServiceConfigsProfile model = - new ClusterServiceConfigsProfile() - .withServiceName("onpc") - .withConfigs( - Arrays - .asList( - new ClusterServiceConfig() - .withComponent("ocohslkevleg") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("fbuhfmvfaxkffe") - .withContent("th") - .withEncoding(ContentEncoding.BASE64) - .withPath("zy") - .withValues( - mapOf( - "grxwbu", - "xmzsbbzogg", - "dptkoenkouk", - "vjxxjnsp", - "pocipazyxoegu", - "vudwtiukbldng", - "npiucgygevqznty", - "g")), - new ClusterConfigFile() - .withFileName("mrbpizcdrqj") - .withContent("pyd") - .withEncoding(ContentEncoding.NONE) - .withPath("xdeoejzic") - .withValues(mapOf("bkh", "sjttgzfbish")))), - new ClusterServiceConfig() - .withComponent("jdeyeamdpha") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("lpbuxwgipwhonowk") - .withContent("hwankixzbinjepu") - .withEncoding(ContentEncoding.BASE64) - .withPath("ywnuzoq") - .withValues( - mapOf("zlsico", "yqzrnkcqvyxlw", "hheunmmqhgyx", "oqqnwvlryav")), - new ClusterConfigFile() - .withFileName("konocu") - .withContent("klyaxuconu") - .withEncoding(ContentEncoding.BASE64) - .withPath("kbeype") - .withValues( - mapOf( - "kt", - "jmwvvj", - "ffrzpwvlqdqgbiqy", - "xsenhwlr", - "vf", - "ihkaetcktvfc")), - new ClusterConfigFile() - .withFileName("nkymuctqhjfbebrj") - .withContent("erfuwuttt") - .withEncoding(ContentEncoding.NONE) - .withPath("rbirphxe") - .withValues(mapOf("jky", "vahfn")), - new ClusterConfigFile() - .withFileName("xjvuujqgidokg") - .withContent("jyoxgvclt") - .withEncoding(ContentEncoding.NONE) - .withPath("c") - .withValues(mapOf("xbf", "jeszzhbijhtxfv", "ec", "mxnehmp")))), - new ClusterServiceConfig() - .withComponent("godebfqkkrbmpu") - .withFiles( - Arrays - .asList( - new ClusterConfigFile() - .withFileName("riwflzlfb") - .withContent("puz") - .withEncoding(ContentEncoding.NONE) - .withPath("pnq") - .withValues( - mapOf( - "qqkpikadrg", - "mgkbrpyydhibn", - "jggmebfsiarbu", - "tqagnbuynh", - "ttdbhrbnl", - "rcvpnazzmhjrunmp")))))); - model = BinaryData.fromObject(model).toObject(ClusterServiceConfigsProfile.class); - Assertions.assertEquals("onpc", model.serviceName()); - Assertions.assertEquals("ocohslkevleg", model.configs().get(0).component()); - Assertions.assertEquals("fbuhfmvfaxkffe", model.configs().get(0).files().get(0).fileName()); - Assertions.assertEquals("th", model.configs().get(0).files().get(0).content()); - Assertions.assertEquals(ContentEncoding.BASE64, model.configs().get(0).files().get(0).encoding()); - Assertions.assertEquals("zy", model.configs().get(0).files().get(0).path()); - Assertions.assertEquals("xmzsbbzogg", model.configs().get(0).files().get(0).values().get("grxwbu")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java deleted file mode 100644 index a05e29d706266..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"clusterType\":\"j\",\"clusterVersion\":\"nlfzxiavrmbz\",\"ossVersion\":\"okixrjqcir\",\"clusterPoolVersion\":\"pfrlazsz\",\"isPreview\":false,\"components\":[{\"name\":\"ndfpwpj\",\"version\":\"wbtlhflsjcdh\"}]},\"id\":\"zfjvfbgofe\",\"name\":\"jagrqmqhldvr\",\"type\":\"iiojnal\"}") - .toObject(ClusterVersionInner.class); - Assertions.assertEquals("j", model.clusterType()); - Assertions.assertEquals("nlfzxiavrmbz", model.clusterVersion()); - Assertions.assertEquals("okixrjqcir", model.ossVersion()); - Assertions.assertEquals("pfrlazsz", model.clusterPoolVersion()); - Assertions.assertEquals(false, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionInner model = - new ClusterVersionInner() - .withClusterType("j") - .withClusterVersion("nlfzxiavrmbz") - .withOssVersion("okixrjqcir") - .withClusterPoolVersion("pfrlazsz") - .withIsPreview(false); - model = BinaryData.fromObject(model).toObject(ClusterVersionInner.class); - Assertions.assertEquals("j", model.clusterType()); - Assertions.assertEquals("nlfzxiavrmbz", model.clusterVersion()); - Assertions.assertEquals("okixrjqcir", model.ossVersion()); - Assertions.assertEquals("pfrlazsz", model.clusterPoolVersion()); - Assertions.assertEquals(false, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java deleted file mode 100644 index bce0f95bc9f6a..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionPropertiesTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionProperties; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionProperties model = - BinaryData - .fromString( - "{\"clusterType\":\"fk\",\"clusterVersion\":\"vsexsowuelu\",\"ossVersion\":\"hahhxvrhmzkwpj\",\"clusterPoolVersion\":\"wspughftqsxhqx\",\"isPreview\":true,\"components\":[{\"name\":\"dxdigr\",\"version\":\"uufzdmsyqtfihw\"},{\"name\":\"otzi\",\"version\":\"amvpphoszqzudph\"},{\"name\":\"mvdk\",\"version\":\"ynwcvtbv\"}]}") - .toObject(ClusterVersionProperties.class); - Assertions.assertEquals("fk", model.clusterType()); - Assertions.assertEquals("vsexsowuelu", model.clusterVersion()); - Assertions.assertEquals("hahhxvrhmzkwpj", model.ossVersion()); - Assertions.assertEquals("wspughftqsxhqx", model.clusterPoolVersion()); - Assertions.assertEquals(true, model.isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionProperties model = - new ClusterVersionProperties() - .withClusterType("fk") - .withClusterVersion("vsexsowuelu") - .withOssVersion("hahhxvrhmzkwpj") - .withClusterPoolVersion("wspughftqsxhqx") - .withIsPreview(true); - model = BinaryData.fromObject(model).toObject(ClusterVersionProperties.class); - Assertions.assertEquals("fk", model.clusterType()); - Assertions.assertEquals("vsexsowuelu", model.clusterVersion()); - Assertions.assertEquals("hahhxvrhmzkwpj", model.ossVersion()); - Assertions.assertEquals("wspughftqsxhqx", model.clusterPoolVersion()); - Assertions.assertEquals(true, model.isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java deleted file mode 100644 index 2671b6a991cfc..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClusterVersionsListResultTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterVersionInner; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionsListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterVersionsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterVersionsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"clusterType\":\"xggicccnxqhuexmk\",\"clusterVersion\":\"lstvlzywe\",\"ossVersion\":\"zrncsdt\",\"clusterPoolVersion\":\"u\",\"isPreview\":true,\"components\":[{\"name\":\"fgytguslfeadcyg\",\"version\":\"kyhejhzisxgf\"},{\"name\":\"lolp\",\"version\":\"ksrpqv\"},{\"name\":\"zraehtwd\",\"version\":\"ftswibyrcdlbhsh\"},{\"name\":\"p\",\"version\":\"cstwity\"}]},\"id\":\"hevxcced\",\"name\":\"pnmdyodnwzxltjcv\",\"type\":\"hlt\"},{\"properties\":{\"clusterType\":\"cxnavv\",\"clusterVersion\":\"qiby\",\"ossVersion\":\"nyowxwlmdjrkvfg\",\"clusterPoolVersion\":\"fvpdbo\",\"isPreview\":true,\"components\":[{\"name\":\"j\",\"version\":\"hkr\"},{\"name\":\"bdeibqipqk\",\"version\":\"vxndz\"}]},\"id\":\"mkrefajpjorwkq\",\"name\":\"yhgbijtjivfx\",\"type\":\"sjabibs\"},{\"properties\":{\"clusterType\":\"awfsdjpvkvpbjxbk\",\"clusterVersion\":\"zkdvncja\",\"ossVersion\":\"durgkakmokz\",\"clusterPoolVersion\":\"jk\",\"isPreview\":false,\"components\":[{\"name\":\"uwqlgzrfzeey\",\"version\":\"izikayuhq\"},{\"name\":\"jbsybbqw\",\"version\":\"t\"},{\"name\":\"gmfpgvmp\",\"version\":\"as\"},{\"name\":\"haq\",\"version\":\"ss\"}]},\"id\":\"wutwbdsre\",\"name\":\"pdrhne\",\"type\":\"yowqkdwytisibir\"}],\"nextLink\":\"pikpz\"}") - .toObject(ClusterVersionsListResult.class); - Assertions.assertEquals("xggicccnxqhuexmk", model.value().get(0).clusterType()); - Assertions.assertEquals("lstvlzywe", model.value().get(0).clusterVersion()); - Assertions.assertEquals("zrncsdt", model.value().get(0).ossVersion()); - Assertions.assertEquals("u", model.value().get(0).clusterPoolVersion()); - Assertions.assertEquals(true, model.value().get(0).isPreview()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterVersionsListResult model = - new ClusterVersionsListResult() - .withValue( - Arrays - .asList( - new ClusterVersionInner() - .withClusterType("xggicccnxqhuexmk") - .withClusterVersion("lstvlzywe") - .withOssVersion("zrncsdt") - .withClusterPoolVersion("u") - .withIsPreview(true), - new ClusterVersionInner() - .withClusterType("cxnavv") - .withClusterVersion("qiby") - .withOssVersion("nyowxwlmdjrkvfg") - .withClusterPoolVersion("fvpdbo") - .withIsPreview(true), - new ClusterVersionInner() - .withClusterType("awfsdjpvkvpbjxbk") - .withClusterVersion("zkdvncja") - .withOssVersion("durgkakmokz") - .withClusterPoolVersion("jk") - .withIsPreview(false))); - model = BinaryData.fromObject(model).toObject(ClusterVersionsListResult.class); - Assertions.assertEquals("xggicccnxqhuexmk", model.value().get(0).clusterType()); - Assertions.assertEquals("lstvlzywe", model.value().get(0).clusterVersion()); - Assertions.assertEquals("zrncsdt", model.value().get(0).ossVersion()); - Assertions.assertEquals("u", model.value().get(0).clusterPoolVersion()); - Assertions.assertEquals(true, model.value().get(0).isPreview()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersDeleteMockTests.java deleted file mode 100644 index 4ffab9d1c777a..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/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.containers.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.containers.HDInsightContainersManager; -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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.clusters().delete("te", "ybfhjxa", "vvjgslor", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java deleted file mode 100644 index 6383c53061dc3..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersGetInstanceViewWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -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 ClustersGetInstanceViewWithResponseMockTests { - @Test - public void testGetInstanceViewWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"name\":\"negvmnvuqe\",\"properties\":{\"status\":{\"ready\":\"vldspa\",\"reason\":\"jbkkdmflvestmjl\",\"message\":\"ril\"},\"serviceStatuses\":[{\"kind\":\"apeewchpxlkt\",\"ready\":\"kuziycsle\",\"message\":\"f\"},{\"kind\":\"ztcktyh\",\"ready\":\"tqedcgzulwm\",\"message\":\"qzz\"},{\"kind\":\"rjvpglydzgkrvqee\",\"ready\":\"toepryu\",\"message\":\"wytpzdmovz\"}]}}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterInstanceViewResult response = - manager - .clusters() - .getInstanceViewWithResponse("kjpvdwxf", "wiivwzjbhyzsx", "rkambt", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("negvmnvuqe", response.name()); - Assertions.assertEquals("vldspa", response.status().ready()); - Assertions.assertEquals("jbkkdmflvestmjl", response.status().reason()); - Assertions.assertEquals("ril", response.status().message()); - Assertions.assertEquals("apeewchpxlkt", response.serviceStatuses().get(0).kind()); - Assertions.assertEquals("kuziycsle", response.serviceStatuses().get(0).ready()); - Assertions.assertEquals("f", response.serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.java deleted file mode 100644 index 1cbfb755788ac..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ClustersListInstanceViewsMockTests.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.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult; -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 ClustersListInstanceViewsMockTests { - @Test - public void testListInstanceViews() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"vsjcswsmystuluqy\",\"properties\":{\"status\":{\"ready\":\"fcvlerch\",\"reason\":\"bm\",\"message\":\"jbabwidf\"},\"serviceStatuses\":[{\"kind\":\"sspuunnoxyhkx\",\"ready\":\"qddrihpfhoqcaae\",\"message\":\"aomdjvlpjxx\"},{\"kind\":\"zb\",\"ready\":\"msgeivsiykzk\",\"message\":\"cjdx\"},{\"kind\":\"nbzoggcu\",\"ready\":\"apzwyrpgog\",\"message\":\"xepnyl\"},{\"kind\":\"fuajly\",\"ready\":\"tlvofq\",\"message\":\"vfcibyfmowux\"}]}}]}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.clusters().listInstanceViews("xlllchp", "db", "evwrdnhfuk", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("vsjcswsmystuluqy", response.iterator().next().name()); - Assertions.assertEquals("fcvlerch", response.iterator().next().status().ready()); - Assertions.assertEquals("bm", response.iterator().next().status().reason()); - Assertions.assertEquals("jbabwidf", response.iterator().next().status().message()); - Assertions.assertEquals("sspuunnoxyhkx", response.iterator().next().serviceStatuses().get(0).kind()); - Assertions.assertEquals("qddrihpfhoqcaae", response.iterator().next().serviceStatuses().get(0).ready()); - Assertions.assertEquals("aomdjvlpjxx", response.iterator().next().serviceStatuses().get(0).message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java deleted file mode 100644 index 28d56103f75ca..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComparisonRuleTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import org.junit.jupiter.api.Assertions; - -public final class ComparisonRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComparisonRule model = - BinaryData - .fromString("{\"operator\":\"greaterThan\",\"threshold\":36.36004}") - .toObject(ComparisonRule.class); - Assertions.assertEquals(ComparisonOperator.GREATER_THAN, model.operator()); - Assertions.assertEquals(36.36004f, model.threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComparisonRule model = - new ComparisonRule().withOperator(ComparisonOperator.GREATER_THAN).withThreshold(36.36004f); - model = BinaryData.fromObject(model).toObject(ComparisonRule.class); - Assertions.assertEquals(ComparisonOperator.GREATER_THAN, model.operator()); - Assertions.assertEquals(36.36004f, model.threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java deleted file mode 100644 index 003d70f732798..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeProfileTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComputeProfile; -import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeProfile model = - BinaryData - .fromString( - "{\"nodes\":[{\"type\":\"azjdyggd\",\"vmSize\":\"jixhbk\",\"count\":2140516005},{\"type\":\"fqweykhmene\",\"vmSize\":\"fyexfwhy\",\"count\":1506978127},{\"type\":\"i\",\"vmSize\":\"vyvdcs\",\"count\":1668619152},{\"type\":\"ynnaam\",\"vmSize\":\"ectehf\",\"count\":736113941}]}") - .toObject(ComputeProfile.class); - Assertions.assertEquals("azjdyggd", model.nodes().get(0).type()); - Assertions.assertEquals("jixhbk", model.nodes().get(0).vmSize()); - Assertions.assertEquals(2140516005, model.nodes().get(0).count()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeProfile model = - new ComputeProfile() - .withNodes( - Arrays - .asList( - new NodeProfile().withType("azjdyggd").withVmSize("jixhbk").withCount(2140516005), - new NodeProfile().withType("fqweykhmene").withVmSize("fyexfwhy").withCount(1506978127), - new NodeProfile().withType("i").withVmSize("vyvdcs").withCount(1668619152), - new NodeProfile().withType("ynnaam").withVmSize("ectehf").withCount(736113941))); - model = BinaryData.fromObject(model).toObject(ComputeProfile.class); - Assertions.assertEquals("azjdyggd", model.nodes().get(0).type()); - Assertions.assertEquals("jixhbk", model.nodes().get(0).vmSize()); - Assertions.assertEquals(2140516005, model.nodes().get(0).count()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java deleted file mode 100644 index 74d06133002d7..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ComputeResourceDefinitionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComputeResourceDefinition; -import org.junit.jupiter.api.Assertions; - -public final class ComputeResourceDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeResourceDefinition model = - BinaryData - .fromString("{\"cpu\":48.283417,\"memory\":5016929626022013570}") - .toObject(ComputeResourceDefinition.class); - Assertions.assertEquals(48.283417f, model.cpu()); - Assertions.assertEquals(5016929626022013570L, model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeResourceDefinition model = - new ComputeResourceDefinition().withCpu(48.283417f).withMemory(5016929626022013570L); - model = BinaryData.fromObject(model).toObject(ComputeResourceDefinition.class); - Assertions.assertEquals(48.283417f, model.cpu()); - Assertions.assertEquals(5016929626022013570L, model.memory()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java deleted file mode 100644 index 581c0740524b7..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfile; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfileWeb; -import com.azure.resourcemanager.hdinsight.containers.models.SshConnectivityEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ConnectivityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectivityProfile model = - BinaryData - .fromString("{\"web\":{\"fqdn\":\"abgy\"},\"ssh\":[{\"endpoint\":\"bjtazqugxywpmu\"}]}") - .toObject(ConnectivityProfile.class); - Assertions.assertEquals("abgy", model.web().fqdn()); - Assertions.assertEquals("bjtazqugxywpmu", model.ssh().get(0).endpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectivityProfile model = - new ConnectivityProfile() - .withWeb(new ConnectivityProfileWeb().withFqdn("abgy")) - .withSsh(Arrays.asList(new SshConnectivityEndpoint().withEndpoint("bjtazqugxywpmu"))); - model = BinaryData.fromObject(model).toObject(ConnectivityProfile.class); - Assertions.assertEquals("abgy", model.web().fqdn()); - Assertions.assertEquals("bjtazqugxywpmu", model.ssh().get(0).endpoint()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java deleted file mode 100644 index 5dd053cadbda5..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ConnectivityProfileWebTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ConnectivityProfileWeb; -import org.junit.jupiter.api.Assertions; - -public final class ConnectivityProfileWebTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConnectivityProfileWeb model = - BinaryData.fromString("{\"fqdn\":\"ef\"}").toObject(ConnectivityProfileWeb.class); - Assertions.assertEquals("ef", model.fqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConnectivityProfileWeb model = new ConnectivityProfileWeb().withFqdn("ef"); - model = BinaryData.fromObject(model).toObject(ConnectivityProfileWeb.class); - Assertions.assertEquals("ef", model.fqdn()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.java deleted file mode 100644 index d1935fd8cf39d..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/FlinkJobPropertiesTests.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.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Action; -import com.azure.resourcemanager.hdinsight.containers.models.FlinkJobProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FlinkJobPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlinkJobProperties model = - BinaryData - .fromString( - "{\"jobType\":\"FlinkJob\",\"jobName\":\"ayhmtnvyqiatkz\",\"jobJarDirectory\":\"cnpwzcjaesgvvscc\",\"jarName\":\"jguq\",\"entryClass\":\"wygzlvdnkfxusem\",\"args\":\"zrmuhapfcqdps\",\"savePointName\":\"qvpsvuoymg\",\"action\":\"STOP\",\"flinkConfiguration\":{\"feo\":\"ezrypql\",\"edkowepbqpcrfk\":\"erqwkyhkobopg\",\"tn\":\"wccsnjvcdwxlpqek\"},\"jobId\":\"tjsyin\",\"status\":\"fq\",\"jobOutput\":\"mtdh\",\"actionResult\":\"dvypgikdgsz\",\"lastSavePoint\":\"kbir\"}") - .toObject(FlinkJobProperties.class); - Assertions.assertEquals("ayhmtnvyqiatkz", model.jobName()); - Assertions.assertEquals("cnpwzcjaesgvvscc", model.jobJarDirectory()); - Assertions.assertEquals("jguq", model.jarName()); - Assertions.assertEquals("wygzlvdnkfxusem", model.entryClass()); - Assertions.assertEquals("zrmuhapfcqdps", model.args()); - Assertions.assertEquals("qvpsvuoymg", model.savePointName()); - Assertions.assertEquals(Action.STOP, model.action()); - Assertions.assertEquals("ezrypql", model.flinkConfiguration().get("feo")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlinkJobProperties model = - new FlinkJobProperties() - .withJobName("ayhmtnvyqiatkz") - .withJobJarDirectory("cnpwzcjaesgvvscc") - .withJarName("jguq") - .withEntryClass("wygzlvdnkfxusem") - .withArgs("zrmuhapfcqdps") - .withSavePointName("qvpsvuoymg") - .withAction(Action.STOP) - .withFlinkConfiguration( - mapOf("feo", "ezrypql", "edkowepbqpcrfk", "erqwkyhkobopg", "tn", "wccsnjvcdwxlpqek")); - model = BinaryData.fromObject(model).toObject(FlinkJobProperties.class); - Assertions.assertEquals("ayhmtnvyqiatkz", model.jobName()); - Assertions.assertEquals("cnpwzcjaesgvvscc", model.jobJarDirectory()); - Assertions.assertEquals("jguq", model.jarName()); - Assertions.assertEquals("wygzlvdnkfxusem", model.entryClass()); - Assertions.assertEquals("zrmuhapfcqdps", model.args()); - Assertions.assertEquals("qvpsvuoymg", model.savePointName()); - Assertions.assertEquals(Action.STOP, model.action()); - Assertions.assertEquals("ezrypql", model.flinkConfiguration().get("feo")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java deleted file mode 100644 index 9735fadae103e..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/IdentityProfileTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.IdentityProfile; -import org.junit.jupiter.api.Assertions; - -public final class IdentityProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityProfile model = - BinaryData - .fromString( - "{\"msiResourceId\":\"vcputegj\",\"msiClientId\":\"wmfdatscmdvpjhul\",\"msiObjectId\":\"uuvmkjozkrwfnd\"}") - .toObject(IdentityProfile.class); - Assertions.assertEquals("vcputegj", model.msiResourceId()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.msiClientId()); - Assertions.assertEquals("uuvmkjozkrwfnd", model.msiObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityProfile model = - new IdentityProfile() - .withMsiResourceId("vcputegj") - .withMsiClientId("wmfdatscmdvpjhul") - .withMsiObjectId("uuvmkjozkrwfnd"); - model = BinaryData.fromObject(model).toObject(IdentityProfile.class); - Assertions.assertEquals("vcputegj", model.msiResourceId()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.msiClientId()); - Assertions.assertEquals("uuvmkjozkrwfnd", model.msiObjectId()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.java deleted file mode 100644 index 14cd338311d87..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LoadBasedConfigTests.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.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoadBasedConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoadBasedConfig model = - BinaryData - .fromString( - "{\"minNodes\":1002567642,\"maxNodes\":38783234,\"pollInterval\":585972520,\"cooldownPeriod\":1879830205,\"scalingRules\":[{\"actionType\":\"scaledown\",\"evaluationCount\":302712597,\"scalingMetric\":\"xdje\",\"comparisonRule\":{\"operator\":\"lessThan\",\"threshold\":77.09733}},{\"actionType\":\"scaleup\",\"evaluationCount\":741000017,\"scalingMetric\":\"wwfvov\",\"comparisonRule\":{\"operator\":\"greaterThanOrEqual\",\"threshold\":18.919855}},{\"actionType\":\"scaledown\",\"evaluationCount\":2004605521,\"scalingMetric\":\"ecivyh\",\"comparisonRule\":{\"operator\":\"greaterThan\",\"threshold\":58.396214}}]}") - .toObject(LoadBasedConfig.class); - Assertions.assertEquals(1002567642, model.minNodes()); - Assertions.assertEquals(38783234, model.maxNodes()); - Assertions.assertEquals(585972520, model.pollInterval()); - Assertions.assertEquals(1879830205, model.cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.scalingRules().get(0).actionType()); - Assertions.assertEquals(302712597, model.scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("xdje", model.scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(77.09733f, model.scalingRules().get(0).comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoadBasedConfig model = - new LoadBasedConfig() - .withMinNodes(1002567642) - .withMaxNodes(38783234) - .withPollInterval(585972520) - .withCooldownPeriod(1879830205) - .withScalingRules( - Arrays - .asList( - new ScalingRule() - .withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(302712597) - .withScalingMetric("xdje") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.LESS_THAN) - .withThreshold(77.09733f)), - new ScalingRule() - .withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(741000017) - .withScalingMetric("wwfvov") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.GREATER_THAN_OR_EQUAL) - .withThreshold(18.919855f)), - new ScalingRule() - .withActionType(ScaleActionType.SCALEDOWN) - .withEvaluationCount(2004605521) - .withScalingMetric("ecivyh") - .withComparisonRule( - new ComparisonRule() - .withOperator(ComparisonOperator.GREATER_THAN) - .withThreshold(58.396214f)))); - model = BinaryData.fromObject(model).toObject(LoadBasedConfig.class); - Assertions.assertEquals(1002567642, model.minNodes()); - Assertions.assertEquals(38783234, model.maxNodes()); - Assertions.assertEquals(585972520, model.pollInterval()); - Assertions.assertEquals(1879830205, model.cooldownPeriod()); - Assertions.assertEquals(ScaleActionType.SCALEDOWN, model.scalingRules().get(0).actionType()); - Assertions.assertEquals(302712597, model.scalingRules().get(0).evaluationCount()); - Assertions.assertEquals("xdje", model.scalingRules().get(0).scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.scalingRules().get(0).comparisonRule().operator()); - Assertions.assertEquals(77.09733f, model.scalingRules().get(0).comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index dd2334026f174..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/LocationsCheckNameAvailabilityWithResponseMockTests.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.containers.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"knlrariaawiuagy\",\"message\":\"qfby\"}"; - - 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); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - NameAvailabilityResult response = - manager - .locations() - .checkNameAvailabilityWithResponse( - "zqlqhyc", - new NameAvailabilityParameters().withName("odggx").withType("ee"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("knlrariaawiuagy", response.reason()); - Assertions.assertEquals("qfby", response.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java deleted file mode 100644 index 142c853d62f1a..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityParametersTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityParameters; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityParameters model = - BinaryData - .fromString("{\"name\":\"dy\",\"type\":\"rwyhqmibzyhwitsm\"}") - .toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("dy", model.name()); - Assertions.assertEquals("rwyhqmibzyhwitsm", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityParameters model = new NameAvailabilityParameters().withName("dy").withType("rwyhqmibzyhwitsm"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityParameters.class); - Assertions.assertEquals("dy", model.name()); - Assertions.assertEquals("rwyhqmibzyhwitsm", model.type()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java deleted file mode 100644 index 72d12c3a669ee..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NameAvailabilityResultInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.NameAvailabilityResultInner; -import org.junit.jupiter.api.Assertions; - -public final class NameAvailabilityResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NameAvailabilityResultInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"npcdpumnzgm\",\"message\":\"nmabik\"}") - .toObject(NameAvailabilityResultInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("npcdpumnzgm", model.reason()); - Assertions.assertEquals("nmabik", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NameAvailabilityResultInner model = - new NameAvailabilityResultInner().withNameAvailable(true).withReason("npcdpumnzgm").withMessage("nmabik"); - model = BinaryData.fromObject(model).toObject(NameAvailabilityResultInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("npcdpumnzgm", model.reason()); - Assertions.assertEquals("nmabik", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java deleted file mode 100644 index 0d748c66a3aa6..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/NodeProfileTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile; -import org.junit.jupiter.api.Assertions; - -public final class NodeProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeProfile model = - BinaryData - .fromString("{\"type\":\"scjeypv\",\"vmSize\":\"ezrkgqhcjrefo\",\"count\":450468139}") - .toObject(NodeProfile.class); - Assertions.assertEquals("scjeypv", model.type()); - Assertions.assertEquals("ezrkgqhcjrefo", model.vmSize()); - Assertions.assertEquals(450468139, model.count()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeProfile model = new NodeProfile().withType("scjeypv").withVmSize("ezrkgqhcjrefo").withCount(450468139); - model = BinaryData.fromObject(model).toObject(NodeProfile.class); - Assertions.assertEquals("scjeypv", model.type()); - Assertions.assertEquals("ezrkgqhcjrefo", model.vmSize()); - Assertions.assertEquals(450468139, model.count()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java deleted file mode 100644 index eef76e5f88da3..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationDisplayTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"dcpzfoqo\",\"resource\":\"cybxa\",\"operation\":\"gszufoxciqopid\",\"description\":\"mciodhkhazxkhn\"}") - .toObject(OperationDisplay.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay(); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java deleted file mode 100644 index 0674451312b04..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationInnerTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.OperationInner; -import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"jmqlgkfb\",\"isDataAction\":false,\"display\":{\"provider\":\"ongbjcnt\",\"resource\":\"i\",\"operation\":\"jed\",\"description\":\"wwa\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}") - .toObject(OperationInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withDisplay(new OperationDisplay()); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java deleted file mode 100644 index 6b679b9027f4e..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.OperationListResult; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"qztpp\",\"isDataAction\":false,\"display\":{\"provider\":\"or\",\"resource\":\"lt\",\"operation\":\"mncwsobqwcsdb\",\"description\":\"dcfhucqdpf\"},\"origin\":\"system\",\"actionType\":\"Internal\"},{\"name\":\"jjcanvxbvtv\",\"isDataAction\":false,\"display\":{\"provider\":\"cormr\",\"resource\":\"qtvcofudflvkgj\",\"operation\":\"gdknnqv\",\"description\":\"znqntoru\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"},{\"name\":\"mkycgra\",\"isDataAction\":true,\"display\":{\"provider\":\"taeburuvdm\",\"resource\":\"s\",\"operation\":\"l\",\"description\":\"ab\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"ifrvtpu\"}") - .toObject(OperationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = new OperationListResult(); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java deleted file mode 100644 index 43326a34f6d64..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.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.containers.HDInsightContainersManager; -import com.azure.resourcemanager.hdinsight.containers.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"rfgi\",\"isDataAction\":true,\"display\":{\"provider\":\"jocqwogfnzjvusf\",\"resource\":\"dmozu\",\"operation\":\"lfsbtkadpysow\",\"description\":\"tgkbugrjqctojc\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - HDInsightContainersManager manager = - HDInsightContainersManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java deleted file mode 100644 index bf62c938c7b0d..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScalingRuleTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator; -import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule; -import com.azure.resourcemanager.hdinsight.containers.models.ScaleActionType; -import com.azure.resourcemanager.hdinsight.containers.models.ScalingRule; -import org.junit.jupiter.api.Assertions; - -public final class ScalingRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScalingRule model = - BinaryData - .fromString( - "{\"actionType\":\"scaleup\",\"evaluationCount\":1628145340,\"scalingMetric\":\"jgjrwjueiotwm\",\"comparisonRule\":{\"operator\":\"lessThan\",\"threshold\":43.039276}}") - .toObject(ScalingRule.class); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.actionType()); - Assertions.assertEquals(1628145340, model.evaluationCount()); - Assertions.assertEquals("jgjrwjueiotwm", model.scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.comparisonRule().operator()); - Assertions.assertEquals(43.039276f, model.comparisonRule().threshold()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScalingRule model = - new ScalingRule() - .withActionType(ScaleActionType.SCALEUP) - .withEvaluationCount(1628145340) - .withScalingMetric("jgjrwjueiotwm") - .withComparisonRule( - new ComparisonRule().withOperator(ComparisonOperator.LESS_THAN).withThreshold(43.039276f)); - model = BinaryData.fromObject(model).toObject(ScalingRule.class); - Assertions.assertEquals(ScaleActionType.SCALEUP, model.actionType()); - Assertions.assertEquals(1628145340, model.evaluationCount()); - Assertions.assertEquals("jgjrwjueiotwm", model.scalingMetric()); - Assertions.assertEquals(ComparisonOperator.LESS_THAN, model.comparisonRule().operator()); - Assertions.assertEquals(43.039276f, model.comparisonRule().threshold()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java deleted file mode 100644 index 9739a81d8c5a2..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleBasedConfigTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleBasedConfig; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBasedConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBasedConfig model = - BinaryData - .fromString( - "{\"timeZone\":\"vt\",\"defaultCount\":1243858380,\"schedules\":[{\"startTime\":\"mqkrhahvljuahaqu\",\"endTime\":\"c\",\"count\":1312333731,\"days\":[\"Thursday\"]},{\"startTime\":\"ualaexqpvfadmw\",\"endTime\":\"rcrgvx\",\"count\":1281697798,\"days\":[\"Sunday\"]},{\"startTime\":\"mzlfmisgwb\",\"endTime\":\"b\",\"count\":85144126,\"days\":[\"Friday\",\"Monday\",\"Tuesday\",\"Tuesday\"]}]}") - .toObject(ScheduleBasedConfig.class); - Assertions.assertEquals("vt", model.timeZone()); - Assertions.assertEquals(1243858380, model.defaultCount()); - Assertions.assertEquals("mqkrhahvljuahaqu", model.schedules().get(0).startTime()); - Assertions.assertEquals("c", model.schedules().get(0).endTime()); - Assertions.assertEquals(1312333731, model.schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.THURSDAY, model.schedules().get(0).days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBasedConfig model = - new ScheduleBasedConfig() - .withTimeZone("vt") - .withDefaultCount(1243858380) - .withSchedules( - Arrays - .asList( - new Schedule() - .withStartTime("mqkrhahvljuahaqu") - .withEndTime("c") - .withCount(1312333731) - .withDays(Arrays.asList(ScheduleDay.THURSDAY)), - new Schedule() - .withStartTime("ualaexqpvfadmw") - .withEndTime("rcrgvx") - .withCount(1281697798) - .withDays(Arrays.asList(ScheduleDay.SUNDAY)), - new Schedule() - .withStartTime("mzlfmisgwb") - .withEndTime("b") - .withCount(85144126) - .withDays( - Arrays - .asList( - ScheduleDay.FRIDAY, - ScheduleDay.MONDAY, - ScheduleDay.TUESDAY, - ScheduleDay.TUESDAY)))); - model = BinaryData.fromObject(model).toObject(ScheduleBasedConfig.class); - Assertions.assertEquals("vt", model.timeZone()); - Assertions.assertEquals(1243858380, model.defaultCount()); - Assertions.assertEquals("mqkrhahvljuahaqu", model.schedules().get(0).startTime()); - Assertions.assertEquals("c", model.schedules().get(0).endTime()); - Assertions.assertEquals(1312333731, model.schedules().get(0).count()); - Assertions.assertEquals(ScheduleDay.THURSDAY, model.schedules().get(0).days().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java deleted file mode 100644 index ef1dceeca54b6..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScheduleTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.Schedule; -import com.azure.resourcemanager.hdinsight.containers.models.ScheduleDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Schedule model = - BinaryData - .fromString( - "{\"startTime\":\"zbaliourqha\",\"endTime\":\"auhashsfwx\",\"count\":10004909,\"days\":[\"Tuesday\",\"Wednesday\"]}") - .toObject(Schedule.class); - Assertions.assertEquals("zbaliourqha", model.startTime()); - Assertions.assertEquals("auhashsfwx", model.endTime()); - Assertions.assertEquals(10004909, model.count()); - Assertions.assertEquals(ScheduleDay.TUESDAY, model.days().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Schedule model = - new Schedule() - .withStartTime("zbaliourqha") - .withEndTime("auhashsfwx") - .withCount(10004909) - .withDays(Arrays.asList(ScheduleDay.TUESDAY, ScheduleDay.WEDNESDAY)); - model = BinaryData.fromObject(model).toObject(Schedule.class); - Assertions.assertEquals("zbaliourqha", model.startTime()); - Assertions.assertEquals("auhashsfwx", model.endTime()); - Assertions.assertEquals(10004909, model.count()); - Assertions.assertEquals(ScheduleDay.TUESDAY, model.days().get(0)); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java deleted file mode 100644 index 4f15b0af3b47c..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ScriptActionProfileTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ScriptActionProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ScriptActionProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptActionProfile model = - BinaryData - .fromString( - "{\"type\":\"cslyjpk\",\"name\":\"idzyexznelixhnr\",\"url\":\"tfolhbnx\",\"parameters\":\"alaulppggdtpnapn\",\"services\":[\"ropuhpigv\",\"gylgqgitxmedjvcs\",\"ynqwwncwzzhxgk\",\"rmgucnap\"],\"timeoutInMinutes\":1324416407,\"shouldPersist\":true}") - .toObject(ScriptActionProfile.class); - Assertions.assertEquals("cslyjpk", model.type()); - Assertions.assertEquals("idzyexznelixhnr", model.name()); - Assertions.assertEquals("tfolhbnx", model.url()); - Assertions.assertEquals("alaulppggdtpnapn", model.parameters()); - Assertions.assertEquals("ropuhpigv", model.services().get(0)); - Assertions.assertEquals(1324416407, model.timeoutInMinutes()); - Assertions.assertEquals(true, model.shouldPersist()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptActionProfile model = - new ScriptActionProfile() - .withType("cslyjpk") - .withName("idzyexznelixhnr") - .withUrl("tfolhbnx") - .withParameters("alaulppggdtpnapn") - .withServices(Arrays.asList("ropuhpigv", "gylgqgitxmedjvcs", "ynqwwncwzzhxgk", "rmgucnap")) - .withTimeoutInMinutes(1324416407) - .withShouldPersist(true); - model = BinaryData.fromObject(model).toObject(ScriptActionProfile.class); - Assertions.assertEquals("cslyjpk", model.type()); - Assertions.assertEquals("idzyexznelixhnr", model.name()); - Assertions.assertEquals("tfolhbnx", model.url()); - Assertions.assertEquals("alaulppggdtpnapn", model.parameters()); - Assertions.assertEquals("ropuhpigv", model.services().get(0)); - Assertions.assertEquals(1324416407, model.timeoutInMinutes()); - Assertions.assertEquals(true, model.shouldPersist()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java deleted file mode 100644 index b542a9ff1f4cb..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceConfigListResultValueEntityTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResultValueEntity; -import org.junit.jupiter.api.Assertions; - -public final class ServiceConfigListResultValueEntityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceConfigListResultValueEntity model = - BinaryData - .fromString("{\"value\":\"slyzrpzbchckqq\",\"description\":\"ioxiysuiizyn\"}") - .toObject(ServiceConfigListResultValueEntity.class); - Assertions.assertEquals("slyzrpzbchckqq", model.value()); - Assertions.assertEquals("ioxiysuiizyn", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceConfigListResultValueEntity model = - new ServiceConfigListResultValueEntity().withValue("slyzrpzbchckqq").withDescription("ioxiysuiizyn"); - model = BinaryData.fromObject(model).toObject(ServiceConfigListResultValueEntity.class); - Assertions.assertEquals("slyzrpzbchckqq", model.value()); - Assertions.assertEquals("ioxiysuiizyn", model.description()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java deleted file mode 100644 index 308eba046852a..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/ServiceStatusTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.ServiceStatus; -import org.junit.jupiter.api.Assertions; - -public final class ServiceStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceStatus model = - BinaryData - .fromString("{\"kind\":\"pofncck\",\"ready\":\"yfzqwhxxbu\",\"message\":\"a\"}") - .toObject(ServiceStatus.class); - Assertions.assertEquals("pofncck", model.kind()); - Assertions.assertEquals("yfzqwhxxbu", model.ready()); - Assertions.assertEquals("a", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceStatus model = new ServiceStatus().withKind("pofncck").withReady("yfzqwhxxbu").withMessage("a"); - model = BinaryData.fromObject(model).toObject(ServiceStatus.class); - Assertions.assertEquals("pofncck", model.kind()); - Assertions.assertEquals("yfzqwhxxbu", model.ready()); - Assertions.assertEquals("a", model.message()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java deleted file mode 100644 index 5f6329a26b1a8..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugin; -import org.junit.jupiter.api.Assertions; - -public final class SparkUserPluginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkUserPlugin model = BinaryData.fromString("{\"path\":\"joya\"}").toObject(SparkUserPlugin.class); - Assertions.assertEquals("joya", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkUserPlugin model = new SparkUserPlugin().withPath("joya"); - model = BinaryData.fromObject(model).toObject(SparkUserPlugin.class); - Assertions.assertEquals("joya", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java deleted file mode 100644 index db03b50632b6e..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SparkUserPluginsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugin; -import com.azure.resourcemanager.hdinsight.containers.models.SparkUserPlugins; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SparkUserPluginsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkUserPlugins model = - BinaryData.fromString("{\"plugins\":[{\"path\":\"lnjixisxya\"}]}").toObject(SparkUserPlugins.class); - Assertions.assertEquals("lnjixisxya", model.plugins().get(0).path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkUserPlugins model = - new SparkUserPlugins().withPlugins(Arrays.asList(new SparkUserPlugin().withPath("lnjixisxya"))); - model = BinaryData.fromObject(model).toObject(SparkUserPlugins.class); - Assertions.assertEquals("lnjixisxya", model.plugins().get(0).path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java deleted file mode 100644 index 82ee4c36cdc2e..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshConnectivityEndpointTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SshConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class SshConnectivityEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SshConnectivityEndpoint model = - BinaryData.fromString("{\"endpoint\":\"bglaocqxtccm\"}").toObject(SshConnectivityEndpoint.class); - Assertions.assertEquals("bglaocqxtccm", model.endpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SshConnectivityEndpoint model = new SshConnectivityEndpoint().withEndpoint("bglaocqxtccm"); - model = BinaryData.fromObject(model).toObject(SshConnectivityEndpoint.class); - Assertions.assertEquals("bglaocqxtccm", model.endpoint()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java deleted file mode 100644 index e32fdca60ce1f..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/SshProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.SshProfile; -import org.junit.jupiter.api.Assertions; - -public final class SshProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SshProfile model = - BinaryData.fromString("{\"count\":1793540494,\"podPrefix\":\"u\"}").toObject(SshProfile.class); - Assertions.assertEquals(1793540494, model.count()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SshProfile model = new SshProfile().withCount(1793540494); - model = BinaryData.fromObject(model).toObject(SshProfile.class); - Assertions.assertEquals(1793540494, model.count()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java deleted file mode 100644 index 0bd4e92d75220..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TagsObjectTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TagsObject; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TagsObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TagsObject model = - BinaryData - .fromString( - "{\"tags\":{\"jakhmsbzjh\":\"fdfdosygexpa\",\"hqtrgqjbpf\":\"rzevdphlxaol\",\"tfell\":\"fsinzgvfcjrwzoxx\",\"lxofpdvhpfxxypin\":\"wfzitonpeqfpjk\"}}") - .toObject(TagsObject.class); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TagsObject model = - new TagsObject() - .withTags( - mapOf( - "jakhmsbzjh", - "fdfdosygexpa", - "hqtrgqjbpf", - "rzevdphlxaol", - "tfell", - "fsinzgvfcjrwzoxx", - "lxofpdvhpfxxypin", - "wfzitonpeqfpjk")); - model = BinaryData.fromObject(model).toObject(TagsObject.class); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java deleted file mode 100644 index 08698aec6d2aa..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoCoordinatorTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoCoordinator; -import org.junit.jupiter.api.Assertions; - -public final class TrinoCoordinatorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoCoordinator model = - BinaryData - .fromString( - "{\"debug\":{\"enable\":false,\"port\":284483918,\"suspend\":false},\"highAvailabilityEnabled\":false}") - .toObject(TrinoCoordinator.class); - Assertions.assertEquals(false, model.highAvailabilityEnabled()); - Assertions.assertEquals(false, model.enable()); - Assertions.assertEquals(284483918, model.port()); - Assertions.assertEquals(false, model.suspend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoCoordinator model = - new TrinoCoordinator() - .withHighAvailabilityEnabled(false) - .withEnable(false) - .withPort(284483918) - .withSuspend(false); - model = BinaryData.fromObject(model).toObject(TrinoCoordinator.class); - Assertions.assertEquals(false, model.highAvailabilityEnabled()); - Assertions.assertEquals(false, model.enable()); - Assertions.assertEquals(284483918, model.port()); - Assertions.assertEquals(false, model.suspend()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java deleted file mode 100644 index 65ae2f715d766..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoDebugConfigTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.fluent.models.TrinoDebugConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoDebugConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoDebugConfig model = - BinaryData - .fromString("{\"enable\":true,\"port\":741975656,\"suspend\":true}") - .toObject(TrinoDebugConfig.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(741975656, model.port()); - Assertions.assertEquals(true, model.suspend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoDebugConfig model = new TrinoDebugConfig().withEnable(true).withPort(741975656).withSuspend(true); - model = BinaryData.fromObject(model).toObject(TrinoDebugConfig.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(741975656, model.port()); - Assertions.assertEquals(true, model.suspend()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java deleted file mode 100644 index d0d989cd0e4cf..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoTelemetryConfigTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoTelemetryConfig; -import org.junit.jupiter.api.Assertions; - -public final class TrinoTelemetryConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoTelemetryConfig model = - BinaryData - .fromString( - "{\"hivecatalogName\":\"yqbexrmcqibycno\",\"hivecatalogSchema\":\"knme\",\"partitionRetentionInDays\":1391032405,\"path\":\"zvahapjy\"}") - .toObject(TrinoTelemetryConfig.class); - Assertions.assertEquals("yqbexrmcqibycno", model.hivecatalogName()); - Assertions.assertEquals("knme", model.hivecatalogSchema()); - Assertions.assertEquals(1391032405, model.partitionRetentionInDays()); - Assertions.assertEquals("zvahapjy", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoTelemetryConfig model = - new TrinoTelemetryConfig() - .withHivecatalogName("yqbexrmcqibycno") - .withHivecatalogSchema("knme") - .withPartitionRetentionInDays(1391032405) - .withPath("zvahapjy"); - model = BinaryData.fromObject(model).toObject(TrinoTelemetryConfig.class); - Assertions.assertEquals("yqbexrmcqibycno", model.hivecatalogName()); - Assertions.assertEquals("knme", model.hivecatalogSchema()); - Assertions.assertEquals(1391032405, model.partitionRetentionInDays()); - Assertions.assertEquals("zvahapjy", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java deleted file mode 100644 index 01cbce8eaeaf2..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugin; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserPluginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserPlugin model = - BinaryData - .fromString("{\"enabled\":false,\"name\":\"iebwwaloayqcgwrt\",\"path\":\"uzgwyzmhtx\"}") - .toObject(TrinoUserPlugin.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("iebwwaloayqcgwrt", model.name()); - Assertions.assertEquals("uzgwyzmhtx", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserPlugin model = - new TrinoUserPlugin().withEnabled(false).withName("iebwwaloayqcgwrt").withPath("uzgwyzmhtx"); - model = BinaryData.fromObject(model).toObject(TrinoUserPlugin.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("iebwwaloayqcgwrt", model.name()); - Assertions.assertEquals("uzgwyzmhtx", model.path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java deleted file mode 100644 index 85ea126740b69..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserPluginsTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugin; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserPlugins; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserPluginsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserPlugins model = - BinaryData - .fromString( - "{\"plugins\":[{\"enabled\":false,\"name\":\"j\",\"path\":\"hfxobbcswsrtj\"},{\"enabled\":true,\"name\":\"rbpbewtghfgblcg\",\"path\":\"zvlvqhjkbegib\"}]}") - .toObject(TrinoUserPlugins.class); - Assertions.assertEquals(false, model.plugins().get(0).enabled()); - Assertions.assertEquals("j", model.plugins().get(0).name()); - Assertions.assertEquals("hfxobbcswsrtj", model.plugins().get(0).path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserPlugins model = - new TrinoUserPlugins() - .withPlugins( - Arrays - .asList( - new TrinoUserPlugin().withEnabled(false).withName("j").withPath("hfxobbcswsrtj"), - new TrinoUserPlugin() - .withEnabled(true) - .withName("rbpbewtghfgblcg") - .withPath("zvlvqhjkbegib"))); - model = BinaryData.fromObject(model).toObject(TrinoUserPlugins.class); - Assertions.assertEquals(false, model.plugins().get(0).enabled()); - Assertions.assertEquals("j", model.plugins().get(0).name()); - Assertions.assertEquals("hfxobbcswsrtj", model.plugins().get(0).path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java deleted file mode 100644 index 465313c537b88..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoUserTelemetryTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoTelemetryConfig; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoUserTelemetry; -import org.junit.jupiter.api.Assertions; - -public final class TrinoUserTelemetryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoUserTelemetry model = - BinaryData - .fromString( - "{\"storage\":{\"hivecatalogName\":\"mtsavjcbpwxqp\",\"hivecatalogSchema\":\"knftguvriuh\",\"partitionRetentionInDays\":499230067,\"path\":\"dyvxqtayriww\"}}") - .toObject(TrinoUserTelemetry.class); - Assertions.assertEquals("mtsavjcbpwxqp", model.storage().hivecatalogName()); - Assertions.assertEquals("knftguvriuh", model.storage().hivecatalogSchema()); - Assertions.assertEquals(499230067, model.storage().partitionRetentionInDays()); - Assertions.assertEquals("dyvxqtayriww", model.storage().path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoUserTelemetry model = - new TrinoUserTelemetry() - .withStorage( - new TrinoTelemetryConfig() - .withHivecatalogName("mtsavjcbpwxqp") - .withHivecatalogSchema("knftguvriuh") - .withPartitionRetentionInDays(499230067) - .withPath("dyvxqtayriww")); - model = BinaryData.fromObject(model).toObject(TrinoUserTelemetry.class); - Assertions.assertEquals("mtsavjcbpwxqp", model.storage().hivecatalogName()); - Assertions.assertEquals("knftguvriuh", model.storage().hivecatalogSchema()); - Assertions.assertEquals(499230067, model.storage().partitionRetentionInDays()); - Assertions.assertEquals("dyvxqtayriww", model.storage().path()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java deleted file mode 100644 index 5fe60550328d7..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/TrinoWorkerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.TrinoWorker; -import org.junit.jupiter.api.Assertions; - -public final class TrinoWorkerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrinoWorker model = - BinaryData - .fromString("{\"debug\":{\"enable\":true,\"port\":139980296,\"suspend\":true}}") - .toObject(TrinoWorker.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(139980296, model.port()); - Assertions.assertEquals(true, model.suspend()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrinoWorker model = new TrinoWorker().withEnable(true).withPort(139980296).withSuspend(true); - model = BinaryData.fromObject(model).toObject(TrinoWorker.class); - Assertions.assertEquals(true, model.enable()); - Assertions.assertEquals(139980296, model.port()); - Assertions.assertEquals(true, model.suspend()); - } -} diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java deleted file mode 100644 index fa42efa16696f..0000000000000 --- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/test/java/com/azure/resourcemanager/hdinsight/containers/generated/WebConnectivityEndpointTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.hdinsight.containers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hdinsight.containers.models.WebConnectivityEndpoint; -import org.junit.jupiter.api.Assertions; - -public final class WebConnectivityEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WebConnectivityEndpoint model = - BinaryData.fromString("{\"fqdn\":\"zwfqkqujidsuyon\"}").toObject(WebConnectivityEndpoint.class); - Assertions.assertEquals("zwfqkqujidsuyon", model.fqdn()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WebConnectivityEndpoint model = new WebConnectivityEndpoint().withFqdn("zwfqkqujidsuyon"); - model = BinaryData.fromObject(model).toObject(WebConnectivityEndpoint.class); - Assertions.assertEquals("zwfqkqujidsuyon", model.fqdn()); - } -}