diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md
index a1aae67e5a690..968c9000d81dd 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/CHANGELOG.md
@@ -1,14 +1,754 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.3 (2024-08-22)
-### Features Added
+- Azure Resource Manager HDInsightContainers client library for Java. This package contains Microsoft Azure SDK for HDInsightContainers Management SDK. HDInsight Containers Management Client. Package tag package-preview-2024-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.ClusterHotfixUpgradeProperties` was modified
+
+* `targetBuildNumber()` was removed
+* `targetClusterVersion()` was removed
+* `componentName()` was removed
+* `targetOssVersion()` was removed
+
+#### `models.ClusterAvailableUpgradeHotfixUpgradeProperties` was modified
+
+* `componentName()` was removed
+* `description()` was removed
+* `sourceOssVersion()` was removed
+* `extendedProperties()` was removed
+* `targetOssVersion()` was removed
+* `sourceClusterVersion()` was removed
+* `targetBuildNumber()` was removed
+* `createdTime()` was removed
+* `sourceBuildNumber()` was removed
+* `severity()` was removed
+* `targetClusterVersion()` was removed
+
+#### `models.KafkaProfile` was modified
+
+* `clusterIdentity()` was removed
+
+### Features Added
+
+* `models.ClusterPatchVersionUpgradeRollbackHistoryProperties` was added
+
+* `models.PyPiLibraryProperties` was added
+
+* `models.ClusterPoolUpgradeHistoryListResult` was added
+
+* `models.ClusterAvailableUpgradePatchVersionUpgradeProperties` was added
+
+* `models.ClusterLibraryManagementOperation` was added
+
+* `models.ClusterPoolUpgradeHistoryType` was added
+
+* `models.ClusterAvailableInPlaceUpgradeProperties` was added
+
+* `models.ManagedIdentityType` was added
+
+* `models.ClusterPoolUpgradeHistories` was added
+
+* `models.ClusterPoolNodeOsUpgradeHistoryProperties` was added
+
+* `models.ClusterUpgradeHistoryType` was added
+
+* `models.ClusterUpgradeHistory` was added
+
+* `models.Category` was added
+
+* `models.Status` was added
+
+* `models.ClusterLibraries` was added
+
+* `models.ClusterUpgradeHistorySeverityType` was added
+
+* `models.ClusterAksPatchUpgradeHistoryProperties` was added
+
+* `models.ClusterLibraryManagementOperationProperties` was added
+
+* `models.MavenLibraryProperties` was added
+
+* `models.ClusterUpgradeHistoryListResult` was added
+
+* `models.ClusterUpgradeRollback` was added
+
+* `models.ClusterHotfixUpgradeHistoryProperties` was added
+
+* `models.ClusterInPlaceUpgradeHistoryProperties` was added
+
+* `models.ClusterLibraryList` was added
+
+* `models.ClusterPatchVersionUpgradeProperties` was added
+
+* `models.Type` was added
+
+* `models.ClusterPoolUpgradeHistoryUpgradeResultType` was added
+
+* `models.ClusterUpgradeHistories` was added
+
+* `models.ClusterUpgradeRollbackProperties` was added
+
+* `models.ClusterPoolUpgradeHistory` was added
+
+* `models.ManagedIdentityProfile` was added
+
+* `models.ClusterInPlaceUpgradeProperties` was added
+
+* `models.IpTag` was added
+
+* `models.ClusterLibrary` was added
+
+* `models.ClusterPatchVersionUpgradeHistoryProperties` was added
+
+* `models.ClusterPoolUpgradeHistoryProperties` was added
+
+* `models.ClusterLibraryProperties` was added
+
+* `models.ClusterPoolAksPatchUpgradeHistoryProperties` was added
+
+* `models.LibraryManagementAction` was added
+
+* `models.ClusterUpgradeHistoryUpgradeResultType` was added
+
+* `models.ClusterUpgradeHistoryProperties` was added
+
+* `models.ManagedIdentitySpec` was added
+
+* `models.ClusterHotfixUpgradeRollbackHistoryProperties` was added
+
+#### `models.ClusterServiceConfig` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterUpgradeProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `upgradeType()` was added
+
+#### `models.RangerAdminSpecDatabase` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterInstanceViewStatus` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ScriptActionProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ServiceConfigResultProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.RangerUsersyncSpec` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPatchProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolResourcePropertiesAksClusterProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `aksVersion()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolNodeOsImageUpdateProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `upgradeType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TrinoCoordinator` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolResourcePropertiesComputeProfile` was modified
+
+* `count()` was added
+* `withAvailabilityZones(java.util.List)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterAccessProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.SecretReference` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Cluster` was modified
+
+* `upgradeManualRollback(models.ClusterUpgradeRollback)` was added
+* `upgradeManualRollback(models.ClusterUpgradeRollback,com.azure.core.util.Context)` was added
+
+#### `models.ServiceConfigListResultProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.FlinkProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TrinoUserPlugin` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.FlinkCatalogOptions` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterProfile` was modified
+
+* `managedIdentityProfile()` was added
+* `withManagedIdentityProfile(models.ManagedIdentityProfile)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterAvailableUpgradeAksPatchUpgradeProperties` was modified
+
+* `upgradeType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.SparkUserPlugins` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.CatalogOptions` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.SparkProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPatch` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterResizeProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterRangerPluginProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterInstanceViewsResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ServiceConfigListResultValueEntity` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterHotfixUpgradeProperties` was modified
+
+* `withTargetOssVersion(java.lang.String)` was added
+* `upgradeType()` was added
+* `withTargetBuildNumber(java.lang.String)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withComponentName(java.lang.String)` was added
+* `withTargetClusterVersion(java.lang.String)` was added
+
+#### `models.ComputeProfile` was modified
+
+* `availabilityZones()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withAvailabilityZones(java.util.List)` was added
+
+#### `models.ClusterLogAnalyticsApplicationLogs` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ConnectivityProfileWeb` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterAvailableUpgradeProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `upgradeType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolVersionsListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TrinoUserPlugins` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `HDInsightContainersManager` was modified
+
+* `clusterLibraries()` was added
+* `clusterPoolUpgradeHistories()` was added
+* `clusterUpgradeHistories()` was added
+
+#### `models.ClusterPoolResourcePropertiesNetworkProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.LoadBasedConfig` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterAvailableUpgradeHotfixUpgradeProperties` was modified
+
+* `withTargetBuildNumber(java.lang.String)` was added
+* `withSourceClusterVersion(java.lang.String)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withCreatedTime(java.time.OffsetDateTime)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `withComponentName(java.lang.String)` was added
+* `upgradeType()` was added
+* `withExtendedProperties(java.lang.String)` was added
+* `withSourceOssVersion(java.lang.String)` was added
+* `withTargetClusterVersion(java.lang.String)` was added
+* `withDescription(java.lang.String)` was added
+* `withSourceBuildNumber(java.lang.String)` was added
+* `withSeverity(models.Severity)` was added
+* `withTargetOssVersion(java.lang.String)` was added
+
+#### `models.ClusterServiceConfigsProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.SecretsProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.SparkUserPlugin` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.WebConnectivityEndpoint` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TrinoDebugConfig` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterVersionsListResult` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterAksPatchVersionUpgradeProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `upgradeType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ScheduleBasedConfig` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TrinoWorker` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolAvailableUpgradeList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolVersionProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.SshConnectivityEndpoint` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TagsObject` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.TrinoTelemetryConfig` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.KafkaProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolComputeProfile` was modified
+
+* `withAvailabilityZones(java.util.List)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `availabilityZones()` was added
+
+#### `models.ClusterResizeData` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `id()` was added
+* `type()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `name()` was added
+
+#### `models.DiskStorageProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AksClusterProfileAksClusterAgentPoolIdentityProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AutoscaleProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolResourcePropertiesLogAnalyticsProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.KafkaConnectivityEndpoints` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.RangerAuditSpec` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.SshProfile` was modified
+
+* `withVmSize(java.lang.String)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `vmSize()` was added
+
+#### `models.ClusterVersionProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AksClusterProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.NameAvailabilityParameters` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.TrinoUserTelemetry` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolResourcePropertiesClusterPoolProfile` was modified
+
+* `withPublicIpTag(models.IpTag)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolUpgrade` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterJobList` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolAvailableUpgradeNodeOsUpgradeProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `upgradeType()` was added
+
+#### `models.ClusterPoolAksPatchVersionUpgradeProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `upgradeType()` was added
+
+#### `models.ClusterComponentsItem` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.FlinkJobProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ConnectivityProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `withPublicIpTag(models.IpTag)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `publicIpTag()` was added
+
+#### `models.FlinkJobProperties` was modified
+
+* `jobType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.OperationDisplay` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ComparisonRule` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.TrinoProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.RangerProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterAvailableUpgradeList` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ScalingRule` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.RangerAdminSpec` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ServiceConfigListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterLogAnalyticsProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterPoolNetworkProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterInstanceViewResultProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterUpgrade` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.AuthorizationProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.FlinkStorageProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.Schedule` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.NodeProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterInstanceViewPropertiesStatus` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterResourceProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.SparkMetastoreSpec` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.IdentityProfile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterInstanceViewProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterJobProperties` was modified
+
+* `jobType()` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolLogAnalyticsProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.Clusters` was modified
+
+* `upgradeManualRollback(java.lang.String,java.lang.String,java.lang.String,models.ClusterUpgradeRollback,com.azure.core.util.Context)` was added
+* `upgradeManualRollback(java.lang.String,java.lang.String,java.lang.String,models.ClusterUpgradeRollback)` was added
+
+#### `models.UpdatableClusterProfile` was modified
+
+* `secretsProfile()` was added
+* `withTrinoProfile(models.TrinoProfile)` was added
+* `withSecretsProfile(models.SecretsProfile)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `trinoProfile()` was added
+
+#### `models.OperationListResult` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolAvailableUpgradeProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+* `upgradeType()` was added
+
+#### `models.ClusterPrometheusProfile` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.FlinkHiveCatalogOption` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolResourceProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.HiveCatalogOption` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ClusterConfigFile` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ComputeResourceDefinition` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.ServiceStatus` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ClusterPoolAvailableUpgradeAksPatchUpgradeProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `upgradeType()` was added
+
+#### `models.ClusterPoolUpgradeProperties` was modified
-### Other Changes
+* `upgradeType()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
## 1.0.0-beta.2 (2024-04-03)
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/README.md
index 8ac9e242a0584..da157e7c2bb00 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-preview-2023-11. 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-2024-05. 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.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
@@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen
### Authentication
-By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
+Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
-- `AZURE_CLIENT_ID` for Azure client ID.
-- `AZURE_TENANT_ID` for Azure tenant ID.
-- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-
-With above configuration, `azure` client can be authenticated using the following code:
+Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[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_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md
index 7193bd2c4441e..fb4e97399eb4b 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/SAMPLE.md
@@ -18,10 +18,19 @@
- [List](#clusterjobs_list)
- [RunJob](#clusterjobs_runjob)
+## ClusterLibraries
+
+- [List](#clusterlibraries_list)
+- [ManageLibraries](#clusterlibraries_managelibraries)
+
## ClusterPoolAvailableUpgrades
- [List](#clusterpoolavailableupgrades_list)
+## ClusterPoolUpgradeHistories
+
+- [List](#clusterpoolupgradehistories_list)
+
## ClusterPools
- [CreateOrUpdate](#clusterpools_createorupdate)
@@ -32,6 +41,10 @@
- [UpdateTags](#clusterpools_updatetags)
- [Upgrade](#clusterpools_upgrade)
+## ClusterUpgradeHistories
+
+- [List](#clusterupgradehistories_list)
+
## Clusters
- [Create](#clusters_create)
@@ -44,6 +57,7 @@
- [Resize](#clusters_resize)
- [Update](#clusters_update)
- [Upgrade](#clusters_upgrade)
+- [UpgradeManualRollback](#clusters_upgrademanualrollback)
## Locations
@@ -61,7 +75,7 @@
public final class AvailableClusterPoolVersionsListByLocationSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListAvailableClusterPoolVersions.json
*/
/**
@@ -85,7 +99,7 @@ public final class AvailableClusterPoolVersionsListByLocationSamples {
public final class AvailableClusterVersionsListByLocationSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListAvailableClusterVersions.json
*/
/**
@@ -109,7 +123,7 @@ public final class AvailableClusterVersionsListByLocationSamples {
public final class ClusterAvailableUpgradesListSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClusterAvailableUpgrades.json
*/
/**
@@ -119,8 +133,8 @@ public final class ClusterAvailableUpgradesListSamples {
*/
public static void
getClusterAvailableUpgrade(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusterAvailableUpgrades().list("hiloResourcegroup", "clusterpool1", "cluster1",
- com.azure.core.util.Context.NONE);
+ manager.clusterAvailableUpgrades()
+ .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE);
}
}
```
@@ -134,7 +148,7 @@ public final class ClusterAvailableUpgradesListSamples {
public final class ClusterJobsListSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClusterJobs.json
*/
/**
@@ -144,8 +158,8 @@ public final class ClusterJobsListSamples {
*/
public static void
listClusterJobs(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusterJobs().list("hiloResourcegroup", "clusterPool1", "cluster1", null,
- com.azure.core.util.Context.NONE);
+ manager.clusterJobs()
+ .list("hiloResourcegroup", "clusterPool1", "cluster1", null, com.azure.core.util.Context.NONE);
}
}
```
@@ -165,7 +179,7 @@ import java.util.Map;
public final class ClusterJobsRunJobSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* RunClusterJob.json
*/
/**
@@ -181,7 +195,8 @@ public final class ClusterJobsRunJobSamples {
.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)
+ .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);
@@ -201,6 +216,119 @@ public final class ClusterJobsRunJobSamples {
}
```
+### ClusterLibraries_List
+
+```java
+import com.azure.resourcemanager.hdinsight.containers.models.Category;
+
+/**
+ * Samples for ClusterLibraries List.
+ */
+public final class ClusterLibrariesListSamples {
+ /*
+ * x-ms-original-file:
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
+ * ListPredefinedClusterLibraries.json
+ */
+ /**
+ * Sample code: ListPredefinedClusterLibraries.
+ *
+ * @param manager Entry point to HDInsightContainersManager.
+ */
+ public static void listPredefinedClusterLibraries(
+ com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
+ manager.clusterLibraries()
+ .list("hiloResourceGroup", "clusterPool", "cluster", Category.PREDEFINED, com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
+ * ListUserCustomClusterLibraries.json
+ */
+ /**
+ * Sample code: ListUserCustomClusterLibraries.
+ *
+ * @param manager Entry point to HDInsightContainersManager.
+ */
+ public static void listUserCustomClusterLibraries(
+ com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
+ manager.clusterLibraries()
+ .list("hiloResourceGroup", "clusterPool", "cluster", Category.CUSTOM, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ClusterLibraries_ManageLibraries
+
+```java
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperationProperties;
+import com.azure.resourcemanager.hdinsight.containers.models.LibraryManagementAction;
+import com.azure.resourcemanager.hdinsight.containers.models.MavenLibraryProperties;
+import com.azure.resourcemanager.hdinsight.containers.models.PyPiLibraryProperties;
+import java.util.Arrays;
+
+/**
+ * Samples for ClusterLibraries ManageLibraries.
+ */
+public final class ClusterLibrariesManageLibrariesSamples {
+ /*
+ * x-ms-original-file:
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
+ * UninstallExistingClusterLibraries.json
+ */
+ /**
+ * Sample code: UninstallExistingClusterLibraries.
+ *
+ * @param manager Entry point to HDInsightContainersManager.
+ */
+ public static void uninstallExistingClusterLibraries(
+ com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
+ manager.clusterLibraries()
+ .manageLibraries("hiloResourceGroup", "clusterPool", "cluster",
+ new ClusterLibraryManagementOperation().withProperties(new ClusterLibraryManagementOperationProperties()
+ .withAction(LibraryManagementAction.UNINSTALL)
+ .withLibraries(Arrays.asList(
+ new ClusterLibraryInner().withProperties(new PyPiLibraryProperties().withName("tensorflow")),
+ new ClusterLibraryInner()
+ .withProperties(new MavenLibraryProperties().withGroupId("org.apache.flink")
+ .withName("flink-connector-hudi"))))),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file:
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
+ * InstallNewClusterLibraries.json
+ */
+ /**
+ * Sample code: InstallNewClusterLibraries.
+ *
+ * @param manager Entry point to HDInsightContainersManager.
+ */
+ public static void
+ installNewClusterLibraries(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
+ manager.clusterLibraries()
+ .manageLibraries("hiloResourceGroup", "clusterPool", "cluster",
+ new ClusterLibraryManagementOperation().withProperties(
+ new ClusterLibraryManagementOperationProperties().withAction(LibraryManagementAction.INSTALL)
+ .withLibraries(Arrays.asList(
+ new ClusterLibraryInner()
+ .withProperties(new PyPiLibraryProperties().withRemarks("PyPi packages.")
+ .withName("requests")
+ .withVersion("2.31.0")),
+ new ClusterLibraryInner()
+ .withProperties(new MavenLibraryProperties().withRemarks("Maven packages.")
+ .withGroupId("org.apache.flink")
+ .withName("flink-connector-kafka")
+ .withVersion("3.0.2-1.18"))))),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### ClusterPoolAvailableUpgrades_List
```java
@@ -210,7 +338,7 @@ public final class ClusterJobsRunJobSamples {
public final class ClusterPoolAvailableUpgradesListSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClusterPoolAvailableUpgrades.json
*/
/**
@@ -220,8 +348,33 @@ public final class ClusterPoolAvailableUpgradesListSamples {
*/
public static void getClusterPoolAvailableUpgrade(
com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusterPoolAvailableUpgrades().list("hiloResourcegroup", "clusterpool1",
- com.azure.core.util.Context.NONE);
+ manager.clusterPoolAvailableUpgrades()
+ .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ClusterPoolUpgradeHistories_List
+
+```java
+/**
+ * Samples for ClusterPoolUpgradeHistories List.
+ */
+public final class ClusterPoolUpgradeHistoriesListSamples {
+ /*
+ * x-ms-original-file:
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
+ * ListClusterPoolUpgradeHistory.json
+ */
+ /**
+ * Sample code: ClusterPoolUpgradeHistoriesListResult.
+ *
+ * @param manager Entry point to HDInsightContainersManager.
+ */
+ public static void clusterPoolUpgradeHistoriesListResult(
+ com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
+ manager.clusterPoolUpgradeHistories()
+ .list("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE);
}
}
```
@@ -234,6 +387,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResource
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesComputeProfile;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourcePropertiesNetworkProfile;
import com.azure.resourcemanager.hdinsight.containers.models.OutboundType;
+import java.util.Arrays;
/**
* Samples for ClusterPools CreateOrUpdate.
@@ -241,7 +395,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.OutboundType;
public final class ClusterPoolsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* CreateClusterPoolWithPrivateAks.json
*/
/**
@@ -251,12 +405,15 @@ public final class ClusterPoolsCreateOrUpdateSamples {
*/
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")
.withProperties(new ClusterPoolResourceProperties()
.withClusterPoolProfile(
new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2"))
- .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2"))
+ .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")
+ .withAvailabilityZones(Arrays.asList("1", "2", "3")))
.withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId(
"/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
.withEnablePrivateApiServer(true)))
@@ -265,7 +422,7 @@ public final class ClusterPoolsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* CreateClusterPoolWithUDRAks.json
*/
/**
@@ -275,12 +432,15 @@ public final class ClusterPoolsCreateOrUpdateSamples {
*/
public static void
clusterPoolPutWithUDRAks(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")
.withProperties(new ClusterPoolResourceProperties()
.withClusterPoolProfile(
new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2"))
- .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2"))
+ .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")
+ .withAvailabilityZones(Arrays.asList("1", "2", "3")))
.withNetworkProfile(new ClusterPoolResourcePropertiesNetworkProfile().withSubnetId(
"/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
.withOutboundType(OutboundType.USER_DEFINED_ROUTING)))
@@ -289,7 +449,7 @@ public final class ClusterPoolsCreateOrUpdateSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* CreateClusterPool.json
*/
/**
@@ -299,12 +459,15 @@ public final class ClusterPoolsCreateOrUpdateSamples {
*/
public static void
clusterPoolPut(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")
.withProperties(new ClusterPoolResourceProperties()
.withClusterPoolProfile(
new ClusterPoolResourcePropertiesClusterPoolProfile().withClusterPoolVersion("1.2"))
- .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")))
+ .withComputeProfile(new ClusterPoolResourcePropertiesComputeProfile().withVmSize("Standard_D3_v2")
+ .withAvailabilityZones(Arrays.asList("1", "2", "3"))))
.create();
}
}
@@ -319,7 +482,7 @@ public final class ClusterPoolsCreateOrUpdateSamples {
public final class ClusterPoolsDeleteSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* DeleteClusterPool.json
*/
/**
@@ -343,7 +506,7 @@ public final class ClusterPoolsDeleteSamples {
public final class ClusterPoolsGetByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* GetClusterPool.json
*/
/**
@@ -353,8 +516,8 @@ public final class ClusterPoolsGetByResourceGroupSamples {
*/
public static void
clusterPoolGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusterPools().getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1",
- com.azure.core.util.Context.NONE);
+ manager.clusterPools()
+ .getByResourceGroupWithResponse("hiloResourcegroup", "clusterpool1", com.azure.core.util.Context.NONE);
}
}
```
@@ -368,7 +531,7 @@ public final class ClusterPoolsGetByResourceGroupSamples {
public final class ClusterPoolsListSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClusterPoolsSubscription.json
*/
/**
@@ -392,7 +555,7 @@ public final class ClusterPoolsListSamples {
public final class ClusterPoolsListByResourceGroupSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClusterPools.json
*/
/**
@@ -420,7 +583,7 @@ import java.util.Map;
public final class ClusterPoolsUpdateTagsSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* PatchClusterPool.json
*/
/**
@@ -463,7 +626,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade;
public final class ClusterPoolsUpgradeSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* UpgradeNodeOsForClusterPool.json
*/
/**
@@ -473,14 +636,15 @@ public final class ClusterPoolsUpgradeSamples {
*/
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);
+ 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/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* UpgradeAKSPatchVersionForClusterPool.json
*/
/**
@@ -490,10 +654,37 @@ public final class ClusterPoolsUpgradeSamples {
*/
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);
+ manager.clusterPools()
+ .upgrade("hiloResourcegroup", "clusterpool1",
+ new ClusterPoolUpgrade()
+ .withProperties(new ClusterPoolAksPatchVersionUpgradeProperties().withUpgradeClusterPool(true)
+ .withUpgradeAllClusterNodes(false)),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ClusterUpgradeHistories_List
+
+```java
+/**
+ * Samples for ClusterUpgradeHistories List.
+ */
+public final class ClusterUpgradeHistoriesListSamples {
+ /*
+ * x-ms-original-file:
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
+ * ListClusterUpgradeHistory.json
+ */
+ /**
+ * Sample code: ClusterUpgradeHistoriesListResult.
+ *
+ * @param manager Entry point to HDInsightContainersManager.
+ */
+ public static void clusterUpgradeHistoriesListResult(
+ com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
+ manager.clusterUpgradeHistories()
+ .list("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE);
}
}
```
@@ -513,8 +704,10 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterServiceConfi
import com.azure.resourcemanager.hdinsight.containers.models.ComparisonOperator;
import com.azure.resourcemanager.hdinsight.containers.models.ComparisonRule;
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.ManagedIdentityProfile;
+import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentitySpec;
+import com.azure.resourcemanager.hdinsight.containers.models.ManagedIdentityType;
import com.azure.resourcemanager.hdinsight.containers.models.NodeProfile;
import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpec;
import com.azure.resourcemanager.hdinsight.containers.models.RangerAdminSpecDatabase;
@@ -540,7 +733,7 @@ import java.util.Map;
public final class ClustersCreateSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* CreateSparkCluster.json
*/
/**
@@ -550,22 +743,28 @@ public final class ClustersCreateSamples {
*/
public static void
hDInsightSparkClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusters().define("cluster1").withRegion("West US 2")
+ manager.clusters()
+ .define("cluster1")
+ .withRegion("West US 2")
.withExistingClusterpool("hiloResourcegroup", "clusterpool1")
.withProperties(new ClusterResourceProperties().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"))
+ .withComputeProfile(new ComputeProfile()
+ .withNodes(
+ Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))
+ .withAvailabilityZones(Arrays.asList("1", "2", "3")))
+ .withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1")
+ .withOssVersion("2.2.3")
+ .withManagedIdentityProfile(new ManagedIdentityProfile()
+ .withIdentityList(Arrays.asList(new ManagedIdentitySpec().withType(ManagedIdentityType.CLUSTER)
+ .withResourceId(
+ "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi")
+ .withClientId("de91f1d8-767f-460a-ac11-3cf103f74b34")
+ .withObjectId("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")
+ 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")
@@ -578,13 +777,14 @@ public final class ClustersCreateSamples {
"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())))
+ .withSshProfile(new SshProfile().withCount(2).withVmSize("Standard_D3_v2"))
+ .withSparkProfile(new SparkProfile())))
.create();
}
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* CreateSparkClusterWithInternalIngress.json
*/
/**
@@ -594,22 +794,28 @@ public final class ClustersCreateSamples {
*/
public static void hDInsightSparkClusterPutWithInternalIngress(
com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusters().define("cluster1").withRegion("West US 2")
+ manager.clusters()
+ .define("cluster1")
+ .withRegion("West US 2")
.withExistingClusterpool("hiloResourcegroup", "clusterpool1")
.withProperties(new ClusterResourceProperties().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"))
+ .withComputeProfile(new ComputeProfile()
+ .withNodes(
+ Arrays.asList(new NodeProfile().withType("worker").withVmSize("Standard_D3_v2").withCount(4)))
+ .withAvailabilityZones(Arrays.asList("1", "2", "3")))
+ .withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1")
+ .withOssVersion("2.2.3")
+ .withManagedIdentityProfile(new ManagedIdentityProfile()
+ .withIdentityList(Arrays.asList(new ManagedIdentitySpec().withType(ManagedIdentityType.CLUSTER)
+ .withResourceId(
+ "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi")
+ .withClientId("de91f1d8-767f-460a-ac11-3cf103f74b34")
+ .withObjectId("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")
+ 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")
@@ -623,13 +829,14 @@ public final class ClustersCreateSamples {
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())))
+ .withSshProfile(new SshProfile().withCount(2).withVmSize("Standard_D3_v2"))
+ .withSparkProfile(new SparkProfile())))
.create();
}
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* CreateAutoscaleCluster.json
*/
/**
@@ -639,48 +846,62 @@ public final class ClustersCreateSamples {
*/
public static void
hDInsightClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusters().define("cluster1").withRegion("West US 2")
+ manager.clusters()
+ .define("cluster1")
+ .withRegion("West US 2")
.withExistingClusterpool("hiloResourcegroup", "clusterpool1")
.withProperties(new ClusterResourceProperties().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"))
+ .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)))
+ .withAvailabilityZones(Arrays.asList("1", "2", "3")))
+ .withClusterProfile(new ClusterProfile().withClusterVersion("1.0.6")
+ .withOssVersion("0.410.0")
+ .withManagedIdentityProfile(new ManagedIdentityProfile()
+ .withIdentityList(Arrays.asList(new ManagedIdentitySpec().withType(ManagedIdentityType.CLUSTER)
+ .withResourceId(
+ "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi")
+ .withClientId("de91f1d8-767f-460a-ac11-3cf103f74b34")
+ .withObjectId("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))))))
+ .withSshProfile(new SshProfile().withCount(2).withVmSize("Standard_E8as_v5"))
+ .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/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* CreateRangerCluster.json
*/
/**
@@ -690,22 +911,32 @@ public final class ClustersCreateSamples {
*/
public static void
hDInsightRangerClusterPut(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusters().define("cluster1").withRegion("West US 2")
+ manager.clusters()
+ .define("cluster1")
+ .withRegion("West US 2")
.withExistingClusterpool("hiloResourcegroup", "clusterpool1")
.withProperties(new ClusterResourceProperties().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"))
+ .withComputeProfile(new ComputeProfile()
+ .withNodes(
+ Arrays.asList(new NodeProfile().withType("head").withVmSize("Standard_D3_v2").withCount(2)))
+ .withAvailabilityZones(Arrays.asList("1", "2", "3")))
+ .withClusterProfile(new ClusterProfile().withClusterVersion("0.0.1")
+ .withOssVersion("2.2.3")
+ .withManagedIdentityProfile(new ManagedIdentityProfile()
+ .withIdentityList(Arrays.asList(new ManagedIdentitySpec().withType(ManagedIdentityType.CLUSTER)
+ .withResourceId(
+ "/subscriptions/subid/resourceGroups/hiloResourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-msi")
+ .withClientId("de91f1d8-767f-460a-ac11-3cf103f74b34")
+ .withObjectId("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")))
+ .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)
@@ -739,7 +970,7 @@ public final class ClustersCreateSamples {
public final class ClustersDeleteSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* DeleteCluster.json
*/
/**
@@ -763,7 +994,7 @@ public final class ClustersDeleteSamples {
public final class ClustersGetSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* GetCluster.json
*/
/**
@@ -773,8 +1004,8 @@ public final class ClustersGetSamples {
*/
public static void
hDInsightClusterGet(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusters().getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1",
- com.azure.core.util.Context.NONE);
+ manager.clusters()
+ .getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE);
}
}
```
@@ -788,7 +1019,7 @@ public final class ClustersGetSamples {
public final class ClustersGetInstanceViewSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* GetClusterInstanceView.json
*/
/**
@@ -798,8 +1029,8 @@ public final class ClustersGetInstanceViewSamples {
*/
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);
}
}
```
@@ -813,7 +1044,7 @@ public final class ClustersGetInstanceViewSamples {
public final class ClustersListByClusterPoolNameSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClustersByClusterPoolName.json
*/
/**
@@ -837,7 +1068,7 @@ public final class ClustersListByClusterPoolNameSamples {
public final class ClustersListInstanceViewsSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClusterInstanceViews.json
*/
/**
@@ -861,7 +1092,7 @@ public final class ClustersListInstanceViewsSamples {
public final class ClustersListServiceConfigsSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ListClusterServiceConfigs.json
*/
/**
@@ -888,7 +1119,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeProper
public final class ClustersResizeSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* ResizeCluster.json
*/
/**
@@ -898,10 +1129,11 @@ public final class ClustersResizeSamples {
*/
public static void
hDInsightClusterResize(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusters().resize(
- "hiloResourcegroup", "clusterpool1", "cluster1", new ClusterResizeData().withLocation("West US 2")
- .withProperties(new ClusterResizeProperties().withTargetWorkerNodeCount(5)),
- com.azure.core.util.Context.NONE);
+ manager.clusters()
+ .resize("hiloResourcegroup", "clusterpool1", "cluster1",
+ new ClusterResizeData().withLocation("West US 2")
+ .withProperties(new ClusterResizeProperties().withTargetWorkerNodeCount(5)),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -940,7 +1172,7 @@ import java.util.Map;
public final class ClustersUpdateSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* PatchRangerCluster.json
*/
/**
@@ -953,25 +1185,28 @@ public final class ClustersUpdateSamples {
Cluster resource = manager.clusters()
.getWithResponse("hiloResourcegroup", "clusterpool1", "cluster1", com.azure.core.util.Context.NONE)
.getValue();
- resource.update().withProperties(new ClusterPatchProperties()
- .withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile()
- .withRangerAdmin(
- new RangerAdminSpec().withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com"))
+ resource.update()
+ .withProperties(new ClusterPatchProperties()
+ .withClusterProfile(new UpdatableClusterProfile().withRangerProfile(new RangerProfile()
+ .withRangerAdmin(new RangerAdminSpec()
+ .withAdmins(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com"))
.withDatabase(new RangerAdminSpecDatabase().withHost("testsqlserver.database.windows.net")
- .withName("testdb").withPasswordSecretRef("fakeTokenPlaceholder").withUsername("admin")))
- .withRangerAudit(
- new RangerAuditSpec().withStorageAccount("https://teststorage.blob.core.windows.net/testblob"))
- .withRangerUsersync(new RangerUsersyncSpec().withEnabled(true)
- .withGroups(
- Arrays.asList("0a53828f-36c9-44c3-be3d-99a7fce977ad", "13be6971-79db-4f33-9d41-b25589ca25ac"))
- .withMode(RangerUsersyncMode.AUTOMATIC)
- .withUsers(Arrays.asList("testuser1@contoso.com", "testuser2@contoso.com"))))))
+ .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/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* PatchCluster.json
*/
/**
@@ -997,48 +1232,55 @@ public final class ClustersUpdateSamples {
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")))),
+ .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")))))),
+ .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))
+ .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))))))
+ 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))))
+ .withLogAnalyticsProfile(new ClusterLogAnalyticsProfile().withEnabled(true)
+ .withApplicationLogs(new ClusterLogAnalyticsApplicationLogs().withStdOutEnabled(true)
+ .withStdErrorEnabled(true))
+ .withMetricsEnabled(true))))
.apply();
}
@@ -1069,7 +1311,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade;
public final class ClustersUpgradeSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* UpgradeAKSPatchVersionForCluster.json
*/
/**
@@ -1079,14 +1321,15 @@ public final class ClustersUpgradeSamples {
*/
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);
+ 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/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* UpgradeHotfixForCluster.json
*/
/**
@@ -1096,10 +1339,44 @@ public final class ClustersUpgradeSamples {
*/
public static void
clustersUpgradeHotfix(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
- manager.clusters().upgrade("hiloResourcegroup", "clusterpool1", "cluster1",
- new ClusterUpgrade().withProperties(new ClusterHotfixUpgradeProperties().withTargetOssVersion("1.16.0")
- .withTargetClusterVersion("1.0.6").withTargetBuildNumber("3").withComponentName("historyserver")),
- com.azure.core.util.Context.NONE);
+ manager.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);
+ }
+}
+```
+
+### Clusters_UpgradeManualRollback
+
+```java
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollbackProperties;
+
+/**
+ * Samples for Clusters UpgradeManualRollback.
+ */
+public final class ClustersUpgradeManualRollbackSamples {
+ /*
+ * x-ms-original-file:
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
+ * ClusterUpgradeRollback.json
+ */
+ /**
+ * Sample code: ClusterUpgradeRollback.
+ *
+ * @param manager Entry point to HDInsightContainersManager.
+ */
+ public static void
+ clusterUpgradeRollback(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
+ manager.clusters()
+ .upgradeManualRollback("hiloResourcegroup", "clusterpool1", "cluster1",
+ new ClusterUpgradeRollback().withProperties(new ClusterUpgradeRollbackProperties().withUpgradeHistory(
+ "/subscriptions/10e32bab-26da-4cc4-a441-52b318f824e6/resourceGroups/hiloResourcegroup/providers/Microsoft.HDInsight/clusterpools/clusterpool1/clusters/cluster1/upgradeHistories/01_11_2024_02_35_03_AM-HotfixUpgrade")),
+ com.azure.core.util.Context.NONE);
}
}
```
@@ -1115,7 +1392,7 @@ import com.azure.resourcemanager.hdinsight.containers.models.NameAvailabilityPar
public final class LocationsCheckNameAvailabilitySamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* LocationsNameAvailability.json
*/
/**
@@ -1126,8 +1403,9 @@ public final class LocationsCheckNameAvailabilitySamples {
public static void
locationsNameAvailability(com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager manager) {
manager.locations()
- .checkNameAvailabilityWithResponse("southeastasia", new NameAvailabilityParameters()
- .withName("contosemember1").withType("Microsoft.HDInsight/clusterPools/clusters"),
+ .checkNameAvailabilityWithResponse("southeastasia",
+ new NameAvailabilityParameters().withName("contosemember1")
+ .withType("Microsoft.HDInsight/clusterPools/clusters"),
com.azure.core.util.Context.NONE);
}
}
@@ -1142,7 +1420,7 @@ public final class LocationsCheckNameAvailabilitySamples {
public final class OperationsListSamples {
/*
* x-ms-original-file:
- * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2023-11-01-preview/examples/
+ * specification/hdinsight/resource-manager/Microsoft.HDInsight/HDInsightOnAks/preview/2024-05-01-preview/examples/
* GetOperations.json
*/
/**
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/pom.xml
index 296289d4fe742..5a8ee80b2e339 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-preview-2023-11.
+ 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-2024-05.
https://github.com/Azure/azure-sdk-for-java
@@ -48,6 +48,11 @@
true
+
+ com.azure
+ azure-json
+ 1.2.0
+
com.azure
azure-core
@@ -82,6 +87,12 @@
5.9.3
test
+
+ org.slf4j
+ slf4j-simple
+ 1.7.36
+ test
+
org.mockito
mockito-core
@@ -100,11 +111,5 @@
1.14.12
test
-
- org.slf4j
- slf4j-simple
- 1.7.36
- test
-
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java
index ed613de528708..838aa644c5cdd 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/HDInsightContainersManager.java
@@ -11,8 +11,8 @@
import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
-import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpPipelinePolicy;
import com.azure.core.http.policy.HttpPolicyProviders;
import com.azure.core.http.policy.RequestIdPolicy;
@@ -28,9 +28,12 @@
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.ClusterLibrariesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolAvailableUpgradesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolsImpl;
+import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterPoolUpgradeHistoriesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.ClustersImpl;
+import com.azure.resourcemanager.hdinsight.containers.implementation.ClusterUpgradeHistoriesImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.HDInsightContainersManagementClientBuilder;
import com.azure.resourcemanager.hdinsight.containers.implementation.LocationsImpl;
import com.azure.resourcemanager.hdinsight.containers.implementation.OperationsImpl;
@@ -38,9 +41,12 @@
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.ClusterLibraries;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgrades;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistories;
import com.azure.resourcemanager.hdinsight.containers.models.Clusters;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistories;
import com.azure.resourcemanager.hdinsight.containers.models.Locations;
import com.azure.resourcemanager.hdinsight.containers.models.Operations;
import java.time.Duration;
@@ -59,10 +65,14 @@ public final class HDInsightContainersManager {
private ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades;
+ private ClusterPoolUpgradeHistories clusterPoolUpgradeHistories;
+
private Clusters clusters;
private ClusterAvailableUpgrades clusterAvailableUpgrades;
+ private ClusterUpgradeHistories clusterUpgradeHistories;
+
private ClusterJobs clusterJobs;
private Locations locations;
@@ -73,14 +83,18 @@ public final class HDInsightContainersManager {
private AvailableClusterVersions availableClusterVersions;
+ private ClusterLibraries clusterLibraries;
+
private final HDInsightContainersManagementClient clientObject;
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();
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
}
/**
@@ -231,12 +245,19 @@ 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.2");
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.hdinsight.containers")
+ .append("/")
+ .append("1.0.0-beta.3");
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,18 +276,21 @@ 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)
+ 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()));
+ .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();
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
return new HDInsightContainersManager(httpPipeline, profile, defaultPollInterval);
}
}
@@ -296,6 +320,19 @@ public ClusterPoolAvailableUpgrades clusterPoolAvailableUpgrades() {
return clusterPoolAvailableUpgrades;
}
+ /**
+ * Gets the resource collection API of ClusterPoolUpgradeHistories.
+ *
+ * @return Resource collection API of ClusterPoolUpgradeHistories.
+ */
+ public ClusterPoolUpgradeHistories clusterPoolUpgradeHistories() {
+ if (this.clusterPoolUpgradeHistories == null) {
+ this.clusterPoolUpgradeHistories
+ = new ClusterPoolUpgradeHistoriesImpl(clientObject.getClusterPoolUpgradeHistories(), this);
+ }
+ return clusterPoolUpgradeHistories;
+ }
+
/**
* Gets the resource collection API of Clusters. It manages Cluster.
*
@@ -321,6 +358,19 @@ public ClusterAvailableUpgrades clusterAvailableUpgrades() {
return clusterAvailableUpgrades;
}
+ /**
+ * Gets the resource collection API of ClusterUpgradeHistories.
+ *
+ * @return Resource collection API of ClusterUpgradeHistories.
+ */
+ public ClusterUpgradeHistories clusterUpgradeHistories() {
+ if (this.clusterUpgradeHistories == null) {
+ this.clusterUpgradeHistories
+ = new ClusterUpgradeHistoriesImpl(clientObject.getClusterUpgradeHistories(), this);
+ }
+ return clusterUpgradeHistories;
+ }
+
/**
* Gets the resource collection API of ClusterJobs.
*
@@ -383,6 +433,18 @@ public AvailableClusterVersions availableClusterVersions() {
return availableClusterVersions;
}
+ /**
+ * Gets the resource collection API of ClusterLibraries.
+ *
+ * @return Resource collection API of ClusterLibraries.
+ */
+ public ClusterLibraries clusterLibraries() {
+ if (this.clusterLibraries == null) {
+ this.clusterLibraries = new ClusterLibrariesImpl(clientObject.getClusterLibraries(), this);
+ }
+ return clusterLibraries;
+ }
+
/**
* Gets wrapped service client HDInsightContainersManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterLibrariesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterLibrariesClient.java
new file mode 100644
index 0000000000000..2f8bb95b769d2
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterLibrariesClient.java
@@ -0,0 +1,119 @@
+// Copyright (c) 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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.Category;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation;
+
+/**
+ * An instance of this class provides access to all the operations defined in ClusterLibrariesClient.
+ */
+public interface ClusterLibrariesClient {
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category);
+
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category, Context context);
+
+ /**
+ * Library management operations on 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 operation The library management 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginManageLibraries(String resourceGroupName, String clusterPoolName,
+ String clusterName, ClusterLibraryManagementOperation operation);
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginManageLibraries(String resourceGroupName, String clusterPoolName,
+ String clusterName, ClusterLibraryManagementOperation operation, Context context);
+
+ /**
+ * Library management operations on 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 operation The library management 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation);
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation, Context context);
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolUpgradeHistoriesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolUpgradeHistoriesClient.java
new file mode 100644
index 0000000000000..daf1ada193c6d
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterPoolUpgradeHistoriesClient.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.ClusterPoolUpgradeHistoryInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ClusterPoolUpgradeHistoriesClient.
+ */
+public interface ClusterPoolUpgradeHistoriesClient {
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterPoolName);
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history 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/ClusterUpgradeHistoriesClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterUpgradeHistoriesClient.java
new file mode 100644
index 0000000000000..2617808046195
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClusterUpgradeHistoriesClient.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.ClusterUpgradeHistoryInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ClusterUpgradeHistoriesClient.
+ */
+public interface ClusterUpgradeHistoriesClient {
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String clusterPoolName,
+ String clusterName);
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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/ClustersClient.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/ClustersClient.java
index 36f90598a2f8e..0cdcc92c6cdbb 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
@@ -17,6 +17,7 @@
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.ClusterUpgradeRollback;
/**
* An instance of this class provides access to all the operations defined in ClustersClient.
@@ -116,6 +117,73 @@ ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String cl
ClusterInner upgrade(String resourceGroupName, String clusterPoolName, String clusterName,
ClusterUpgrade clusterUpgradeRequest, Context context);
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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> beginUpgradeManualRollback(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest);
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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> beginUpgradeManualRollback(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest,
+ Context context);
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollback(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterUpgradeRollback clusterRollbackUpgradeRequest);
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollback(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterUpgradeRollback clusterRollbackUpgradeRequest, Context context);
+
/**
* Resize an existing Cluster.
*
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 091ad26b7807b..751a70d276d88 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
@@ -60,6 +60,13 @@ public interface HDInsightContainersManagementClient {
*/
ClusterPoolAvailableUpgradesClient getClusterPoolAvailableUpgrades();
+ /**
+ * Gets the ClusterPoolUpgradeHistoriesClient object to access its operations.
+ *
+ * @return the ClusterPoolUpgradeHistoriesClient object.
+ */
+ ClusterPoolUpgradeHistoriesClient getClusterPoolUpgradeHistories();
+
/**
* Gets the ClustersClient object to access its operations.
*
@@ -74,6 +81,13 @@ public interface HDInsightContainersManagementClient {
*/
ClusterAvailableUpgradesClient getClusterAvailableUpgrades();
+ /**
+ * Gets the ClusterUpgradeHistoriesClient object to access its operations.
+ *
+ * @return the ClusterUpgradeHistoriesClient object.
+ */
+ ClusterUpgradeHistoriesClient getClusterUpgradeHistories();
+
/**
* Gets the ClusterJobsClient object to access its operations.
*
@@ -108,4 +122,11 @@ public interface HDInsightContainersManagementClient {
* @return the AvailableClusterVersionsClient object.
*/
AvailableClusterVersionsClient getAvailableClusterVersions();
+
+ /**
+ * Gets the ClusterLibrariesClient object to access its operations.
+ *
+ * @return the ClusterLibrariesClient object.
+ */
+ ClusterLibrariesClient getClusterLibraries();
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java
index 0a2d6aaa8b99c..1ffc775adb1e6 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterAvailableUpgradeInner.java
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterAvailableUpgradeProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Cluster available upgrade.
@@ -18,15 +21,28 @@ 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;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterAvailableUpgradeInner class.
*/
@@ -62,6 +78,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* Validates the instance.
*
@@ -72,4 +118,50 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAvailableUpgradeInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAvailableUpgradeInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterAvailableUpgradeInner.
+ */
+ public static ClusterAvailableUpgradeInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAvailableUpgradeInner deserializedClusterAvailableUpgradeInner = new ClusterAvailableUpgradeInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeInner.properties
+ = ClusterAvailableUpgradeProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAvailableUpgradeInner;
+ });
+ }
}
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 c1f891fa4c784..7292d9e2eb2d7 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
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterResourceProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.Map;
/**
@@ -19,15 +22,28 @@ public final class ClusterInner extends Resource {
/*
* Gets or sets the properties. Define cluster specific properties.
*/
- @JsonProperty(value = "properties")
private ClusterResourceProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterInner class.
*/
@@ -63,6 +79,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* {@inheritDoc}
*/
@@ -91,4 +137,56 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterInner.
+ */
+ public static ClusterInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInner deserializedClusterInner = new ClusterInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedClusterInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedClusterInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterInner.properties = ClusterResourceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInner;
+ });
+ }
}
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 35568c8830898..fd87f7ddcd508 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
@@ -6,24 +6,26 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResultProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Cluster Instance View.
*/
@Fluent
-public final class ClusterInstanceViewResultInner {
+public final class ClusterInstanceViewResultInner implements JsonSerializable {
/*
* Name of the instance view.
*/
- @JsonProperty(value = "name", required = true)
private String name;
/*
* Properties of the instance view.
*/
- @JsonProperty(value = "properties", required = true)
private ClusterInstanceViewResultProperties properties;
/**
@@ -79,16 +81,60 @@ public ClusterInstanceViewResultInner withProperties(ClusterInstanceViewResultPr
*/
public void validate() {
if (name() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property name in model ClusterInstanceViewResultInner"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property name in model ClusterInstanceViewResultInner"));
}
if (properties() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property properties in model ClusterInstanceViewResultInner"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property properties in model ClusterInstanceViewResultInner"));
} else {
properties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterInstanceViewResultInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInstanceViewResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInstanceViewResultInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterInstanceViewResultInner.
+ */
+ public static ClusterInstanceViewResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInstanceViewResultInner deserializedClusterInstanceViewResultInner
+ = new ClusterInstanceViewResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedClusterInstanceViewResultInner.name = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterInstanceViewResultInner.properties
+ = ClusterInstanceViewResultProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInstanceViewResultInner;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java
index 3946842fd6ac6..241650c87ebb3 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterJobInner.java
@@ -8,8 +8,11 @@
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterJobProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Cluster job.
@@ -19,15 +22,28 @@ public final class ClusterJobInner extends ProxyResource {
/*
* Properties of cluster job.
*/
- @JsonProperty(value = "properties", required = true)
private ClusterJobProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterJobInner class.
*/
@@ -63,6 +79,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* Validates the instance.
*
@@ -70,12 +116,57 @@ public SystemData systemData() {
*/
public void validate() {
if (properties() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property properties in model ClusterJobInner"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property properties in model ClusterJobInner"));
} else {
properties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterJobInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterJobInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterJobInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterJobInner.
+ */
+ public static ClusterJobInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterJobInner deserializedClusterJobInner = new ClusterJobInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterJobInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterJobInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterJobInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterJobInner.properties = ClusterJobProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterJobInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterJobInner;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java
new file mode 100644
index 0000000000000..5e974cf7dc7af
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterLibraryInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) 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.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties;
+import java.io.IOException;
+
+/**
+ * Libraries in the cluster.
+ */
+@Fluent
+public final class ClusterLibraryInner extends ProxyResource {
+ /*
+ * Properties of a library in the cluster.
+ */
+ private ClusterLibraryProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /**
+ * Creates an instance of ClusterLibraryInner class.
+ */
+ public ClusterLibraryInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of a library in the cluster.
+ *
+ * @return the properties value.
+ */
+ public ClusterLibraryProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of a library in the cluster.
+ *
+ * @param properties the properties value to set.
+ * @return the ClusterLibraryInner object itself.
+ */
+ public ClusterLibraryInner withProperties(ClusterLibraryProperties 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;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property properties in model ClusterLibraryInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterLibraryInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterLibraryInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterLibraryInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterLibraryInner.
+ */
+ public static ClusterLibraryInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterLibraryInner deserializedClusterLibraryInner = new ClusterLibraryInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterLibraryInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterLibraryInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterLibraryInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterLibraryInner.properties = ClusterLibraryProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterLibraryInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterLibraryInner;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java
index 99115c8ebcfe8..799614adf89f3 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolAvailableUpgradeInner.java
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolAvailableUpgradeProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Cluster pool available upgrade.
@@ -18,15 +21,28 @@ public final class ClusterPoolAvailableUpgradeInner extends ProxyResource {
/*
* Gets or sets the properties. Define cluster pool upgrade specific properties.
*/
- @JsonProperty(value = "properties")
private ClusterPoolAvailableUpgradeProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterPoolAvailableUpgradeInner class.
*/
@@ -62,6 +78,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* Validates the instance.
*
@@ -72,4 +118,51 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolAvailableUpgradeInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolAvailableUpgradeInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolAvailableUpgradeInner.
+ */
+ public static ClusterPoolAvailableUpgradeInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolAvailableUpgradeInner deserializedClusterPoolAvailableUpgradeInner
+ = new ClusterPoolAvailableUpgradeInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeInner.properties
+ = ClusterPoolAvailableUpgradeProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolAvailableUpgradeInner;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java
index 034f7b5187189..ee1080e153942 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolInner.java
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolResourceProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.Map;
/**
@@ -19,15 +22,28 @@ public final class ClusterPoolInner extends Resource {
/*
* Gets or sets the properties. Define cluster pool specific properties.
*/
- @JsonProperty(value = "properties")
private ClusterPoolResourceProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterPoolInner class.
*/
@@ -63,6 +79,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* {@inheritDoc}
*/
@@ -91,4 +137,56 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolInner.
+ */
+ public static ClusterPoolInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolInner deserializedClusterPoolInner = new ClusterPoolInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterPoolInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterPoolInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterPoolInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedClusterPoolInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedClusterPoolInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterPoolInner.properties = ClusterPoolResourceProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterPoolInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolInner;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java
new file mode 100644
index 0000000000000..72761269ac310
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterPoolUpgradeHistoryInner.java
@@ -0,0 +1,175 @@
+// Copyright (c) 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.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties;
+import java.io.IOException;
+
+/**
+ * Cluster pool upgrade history.
+ */
+@Fluent
+public final class ClusterPoolUpgradeHistoryInner extends ProxyResource {
+ /*
+ * Properties of cluster pool upgrade history.
+ */
+ private ClusterPoolUpgradeHistoryProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /**
+ * Creates an instance of ClusterPoolUpgradeHistoryInner class.
+ */
+ public ClusterPoolUpgradeHistoryInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of cluster pool upgrade history.
+ *
+ * @return the properties value.
+ */
+ public ClusterPoolUpgradeHistoryProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of cluster pool upgrade history.
+ *
+ * @param properties the properties value to set.
+ * @return the ClusterPoolUpgradeHistoryInner object itself.
+ */
+ public ClusterPoolUpgradeHistoryInner withProperties(ClusterPoolUpgradeHistoryProperties 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;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property properties in model ClusterPoolUpgradeHistoryInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolUpgradeHistoryInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolUpgradeHistoryInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolUpgradeHistoryInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolUpgradeHistoryInner.
+ */
+ public static ClusterPoolUpgradeHistoryInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolUpgradeHistoryInner deserializedClusterPoolUpgradeHistoryInner
+ = new ClusterPoolUpgradeHistoryInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryInner.properties
+ = ClusterPoolUpgradeHistoryProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolUpgradeHistoryInner;
+ });
+ }
+}
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 1127d403b139c..f907a9bf97278 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
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolVersionProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Available cluster pool version.
@@ -18,15 +21,28 @@ public final class ClusterPoolVersionInner extends ProxyResource {
/*
* Cluster pool version properties.
*/
- @JsonProperty(value = "properties")
private ClusterPoolVersionProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterPoolVersionInner class.
*/
@@ -62,6 +78,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* Validates the instance.
*
@@ -72,4 +118,49 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolVersionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolVersionInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolVersionInner.
+ */
+ public static ClusterPoolVersionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolVersionInner deserializedClusterPoolVersionInner = new ClusterPoolVersionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterPoolVersionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterPoolVersionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterPoolVersionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterPoolVersionInner.properties = ClusterPoolVersionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterPoolVersionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolVersionInner;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java
new file mode 100644
index 0000000000000..41ebd3a022747
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/fluent/models/ClusterUpgradeHistoryInner.java
@@ -0,0 +1,174 @@
+// Copyright (c) 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.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties;
+import java.io.IOException;
+
+/**
+ * Cluster upgrade history.
+ */
+@Fluent
+public final class ClusterUpgradeHistoryInner extends ProxyResource {
+ /*
+ * Properties of cluster upgrade history.
+ */
+ private ClusterUpgradeHistoryProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /**
+ * Creates an instance of ClusterUpgradeHistoryInner class.
+ */
+ public ClusterUpgradeHistoryInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of cluster upgrade history.
+ *
+ * @return the properties value.
+ */
+ public ClusterUpgradeHistoryProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of cluster upgrade history.
+ *
+ * @param properties the properties value to set.
+ * @return the ClusterUpgradeHistoryInner object itself.
+ */
+ public ClusterUpgradeHistoryInner withProperties(ClusterUpgradeHistoryProperties 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;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property properties in model ClusterUpgradeHistoryInner"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgradeHistoryInner.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterUpgradeHistoryInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterUpgradeHistoryInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterUpgradeHistoryInner.
+ */
+ public static ClusterUpgradeHistoryInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterUpgradeHistoryInner deserializedClusterUpgradeHistoryInner = new ClusterUpgradeHistoryInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterUpgradeHistoryInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterUpgradeHistoryInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterUpgradeHistoryInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterUpgradeHistoryInner.properties
+ = ClusterUpgradeHistoryProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterUpgradeHistoryInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterUpgradeHistoryInner;
+ });
+ }
+}
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 0926b256b977a..4b015d370c511 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
@@ -7,8 +7,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterVersionProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Available cluster version.
@@ -18,15 +21,28 @@ public final class ClusterVersionInner extends ProxyResource {
/*
* Cluster version properties.
*/
- @JsonProperty(value = "properties")
private ClusterVersionProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterVersionInner class.
*/
@@ -62,6 +78,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* Validates the instance.
*
@@ -72,4 +118,49 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterVersionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterVersionInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterVersionInner.
+ */
+ public static ClusterVersionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterVersionInner deserializedClusterVersionInner = new ClusterVersionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterVersionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterVersionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterVersionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterVersionInner.properties = ClusterVersionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterVersionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterVersionInner;
+ });
+ }
}
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 4c72dfe084109..3ea3123bf1887 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
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.hdinsight.containers.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Result of check name availability.
*/
@Fluent
-public final class NameAvailabilityResultInner {
+public final class NameAvailabilityResultInner implements JsonSerializable {
/*
* Indicator of availability of the Microsoft.HDInsight resource name.
*/
- @JsonProperty(value = "nameAvailable")
private Boolean nameAvailable;
/*
* The reason of unavailability.
*/
- @JsonProperty(value = "reason")
private String reason;
/*
* The error message of unavailability.
*/
- @JsonProperty(value = "message")
private String message;
/**
@@ -103,4 +104,46 @@ public NameAvailabilityResultInner withMessage(String message) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable);
+ jsonWriter.writeStringField("reason", this.reason);
+ jsonWriter.writeStringField("message", this.message);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of NameAvailabilityResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of NameAvailabilityResultInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the NameAvailabilityResultInner.
+ */
+ public static NameAvailabilityResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ NameAvailabilityResultInner deserializedNameAvailabilityResultInner = new NameAvailabilityResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nameAvailable".equals(fieldName)) {
+ deserializedNameAvailabilityResultInner.nameAvailable = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedNameAvailabilityResultInner.reason = reader.getString();
+ } else if ("message".equals(fieldName)) {
+ deserializedNameAvailabilityResultInner.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedNameAvailabilityResultInner;
+ });
+ }
}
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 9ae10698caea8..d4b8c188dc5be 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
@@ -5,10 +5,14 @@
package com.azure.resourcemanager.hdinsight.containers.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ActionType;
import com.azure.resourcemanager.hdinsight.containers.models.OperationDisplay;
import com.azure.resourcemanager.hdinsight.containers.models.Origin;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* REST API Operation
@@ -16,38 +20,33 @@
* Details of a REST API operation, returned from the Resource Provider Operations API.
*/
@Fluent
-public final class OperationInner {
+public final class OperationInner implements JsonSerializable {
/*
* The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
* "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
- @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;
/*
* Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
* ARM/control-plane operations.
*/
- @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDataAction;
/*
* Localized display information for this particular operation.
*/
- @JsonProperty(value = "display")
private OperationDisplay display;
/*
* The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
* value is "user,system"
*/
- @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY)
private Origin origin;
/*
* Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
*/
- @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY)
private ActionType actionType;
/**
@@ -126,4 +125,48 @@ public void validate() {
display().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
}
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 3d539ccfe2704..e92e2e4a9d85e 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
@@ -5,18 +5,21 @@
package com.azure.resourcemanager.hdinsight.containers.fluent.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigResultProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
/**
* Cluster instance service config.
*/
@Fluent
-public final class ServiceConfigResultInner {
+public final class ServiceConfigResultInner implements JsonSerializable {
/*
* Cluster instance service config properties.
*/
- @JsonProperty(value = "properties")
private ServiceConfigResultProperties properties;
/**
@@ -55,4 +58,40 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ServiceConfigResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ServiceConfigResultInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ServiceConfigResultInner.
+ */
+ public static ServiceConfigResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ServiceConfigResultInner deserializedServiceConfigResultInner = new ServiceConfigResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedServiceConfigResultInner.properties = ServiceConfigResultProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedServiceConfigResultInner;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsClientImpl.java
index f8b2ca1bd8055..235301d12ad2f 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsClientImpl.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/AvailableClusterPoolVersionsClientImpl.java
@@ -56,8 +56,8 @@ public final class AvailableClusterPoolVersionsClientImpl implements AvailableCl
}
/**
- * The interface defining all the services for HDInsightContainersManagementClientAvailableClusterPoolVersions to
- * be used by the proxy service to perform REST calls.
+ * The interface defining all the services for HDInsightContainersManagementClientAvailableClusterPoolVersions to be
+ * used by the proxy service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "HDInsightContainersM")
@@ -208,9 +208,7 @@ 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.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -237,9 +235,7 @@ private Mono> listByLocationNextSinglePag
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
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 08f804bd43652..ddf9d02791e83 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
@@ -207,9 +207,7 @@ 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.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -236,9 +234,7 @@ private Mono> listByLocationNextSinglePageAsy
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
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
index 4c700857f0f29..3bd8ed35be902 100644
--- 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
@@ -243,9 +243,7 @@ public PagedIterable list(String resourceGroupName
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -271,9 +269,7 @@ private Mono> listNextSinglePageAsyn
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
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 0f5e4a13e125c..2b5c228c56103 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
@@ -14,6 +14,7 @@
import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterResourceProperties;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback;
import java.util.Collections;
import java.util.Map;
@@ -90,14 +91,16 @@ 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;
}
@@ -113,14 +116,16 @@ 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;
}
@@ -134,25 +139,40 @@ public Cluster apply(Context context) {
}
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);
+ return serviceManager.clusters()
+ .upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest);
}
public Cluster upgrade(ClusterUpgrade clusterUpgradeRequest, Context context) {
- return serviceManager.clusters().upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest,
- context);
+ return serviceManager.clusters()
+ .upgrade(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context);
+ }
+
+ public Cluster upgradeManualRollback(ClusterUpgradeRollback clusterRollbackUpgradeRequest) {
+ return serviceManager.clusters()
+ .upgradeManualRollback(resourceGroupName, clusterPoolName, clusterName, clusterRollbackUpgradeRequest);
+ }
+
+ public Cluster upgradeManualRollback(ClusterUpgradeRollback clusterRollbackUpgradeRequest, Context context) {
+ return serviceManager.clusters()
+ .upgradeManualRollback(resourceGroupName, clusterPoolName, clusterName, clusterRollbackUpgradeRequest,
+ context);
}
public Cluster resize(ClusterResizeData clusterResizeRequest) {
@@ -160,8 +180,8 @@ public Cluster resize(ClusterResizeData 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/ClusterJobsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterJobsClientImpl.java
index fb98f0c273380..be524105d1e8d 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
@@ -540,9 +540,7 @@ public PagedIterable list(String resourceGroupName, String clus
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -567,9 +565,7 @@ private Mono> listNextSinglePageAsync(String next
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesClientImpl.java
new file mode 100644
index 0000000000000..d5a3dd18a938e
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesClientImpl.java
@@ -0,0 +1,584 @@
+// Copyright (c) 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.BodyParam;
+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.Post;
+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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterLibrariesClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.Category;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryList;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation;
+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 ClusterLibrariesClient.
+ */
+public final class ClusterLibrariesClientImpl implements ClusterLibrariesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ClusterLibrariesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final HDInsightContainersManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ClusterLibrariesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ClusterLibrariesClientImpl(HDInsightContainersManagementClientImpl client) {
+ this.service
+ = RestProxy.create(ClusterLibrariesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for HDInsightContainersManagementClientClusterLibraries to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "HDInsightContainersM")
+ public interface ClusterLibrariesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/libraries")
+ @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,
+ @QueryParam("$category") Category category, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/manageLibraries")
+ @ExpectedResponses({ 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> manageLibraries(@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") ClusterLibraryManagementOperation operation,
+ @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);
+ }
+
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries 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, Category category) {
+ 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."));
+ }
+ if (category == null) {
+ return Mono.error(new IllegalArgumentException("Parameter category 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, category, 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 all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries 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, Category category, 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."));
+ }
+ if (category == null) {
+ return Mono.error(new IllegalArgumentException("Parameter category 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, category, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String clusterPoolName,
+ String clusterName, Category category) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, category),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String clusterPoolName,
+ String clusterName, Category category, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceGroupName, clusterPoolName, clusterName, category, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category) {
+ return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, category));
+ }
+
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName, clusterName, category, context));
+ }
+
+ /**
+ * Library management operations on 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 operation The library management 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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> manageLibrariesWithResponseAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterLibraryManagementOperation operation) {
+ 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."));
+ }
+ if (operation == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operation is required and cannot be null."));
+ } else {
+ operation.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.manageLibraries(this.client.getEndpoint(), this.client.getSubscriptionId(),
+ resourceGroupName, this.client.getApiVersion(), clusterPoolName, clusterName, operation, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> manageLibrariesWithResponseAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterLibraryManagementOperation operation, 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."));
+ }
+ if (operation == null) {
+ return Mono.error(new IllegalArgumentException("Parameter operation is required and cannot be null."));
+ } else {
+ operation.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.manageLibraries(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
+ this.client.getApiVersion(), clusterPoolName, clusterName, operation, accept, context);
+ }
+
+ /**
+ * Library management operations on 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 operation The library management 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginManageLibrariesAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterLibraryManagementOperation operation) {
+ Mono>> mono
+ = manageLibrariesWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, operation);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginManageLibrariesAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterLibraryManagementOperation operation, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = manageLibrariesWithResponseAsync(resourceGroupName, clusterPoolName, clusterName, operation, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Library management operations on 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 operation The library management 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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginManageLibraries(String resourceGroupName, String clusterPoolName,
+ String clusterName, ClusterLibraryManagementOperation operation) {
+ return this.beginManageLibrariesAsync(resourceGroupName, clusterPoolName, clusterName, operation)
+ .getSyncPoller();
+ }
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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 long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginManageLibraries(String resourceGroupName, String clusterPoolName,
+ String clusterName, ClusterLibraryManagementOperation operation, Context context) {
+ return this.beginManageLibrariesAsync(resourceGroupName, clusterPoolName, clusterName, operation, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Library management operations on 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 operation The library management 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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono manageLibrariesAsync(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation) {
+ return beginManageLibrariesAsync(resourceGroupName, clusterPoolName, clusterName, operation).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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 {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono manageLibrariesAsync(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation, Context context) {
+ return beginManageLibrariesAsync(resourceGroupName, clusterPoolName, clusterName, operation, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Library management operations on 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 operation The library management 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation) {
+ manageLibrariesAsync(resourceGroupName, clusterPoolName, clusterName, operation).block();
+ }
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation, Context context) {
+ manageLibrariesAsync(resourceGroupName, clusterPoolName, clusterName, operation, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 libraries in the cluster 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.
+ * @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 libraries in the cluster 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/ClusterLibrariesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesImpl.java
new file mode 100644
index 0000000000000..222a4af2ff692
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibrariesImpl.java
@@ -0,0 +1,61 @@
+// Copyright (c) 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.ClusterLibrariesClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.Category;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraries;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibrary;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryManagementOperation;
+
+public final class ClusterLibrariesImpl implements ClusterLibraries {
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterLibrariesImpl.class);
+
+ private final ClusterLibrariesClient innerClient;
+
+ private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager;
+
+ public ClusterLibrariesImpl(ClusterLibrariesClient innerClient,
+ com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName, category);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterLibraryImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category, Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceGroupName, clusterPoolName, clusterName, category, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterLibraryImpl(inner1, this.manager()));
+ }
+
+ public void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation) {
+ this.serviceClient().manageLibraries(resourceGroupName, clusterPoolName, clusterName, operation);
+ }
+
+ public void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation, Context context) {
+ this.serviceClient().manageLibraries(resourceGroupName, clusterPoolName, clusterName, operation, context);
+ }
+
+ private ClusterLibrariesClient 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/ClusterLibraryImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibraryImpl.java
new file mode 100644
index 0000000000000..3dd0e1b92b49f
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterLibraryImpl.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.ClusterLibraryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibrary;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterLibraryProperties;
+
+public final class ClusterLibraryImpl implements ClusterLibrary {
+ private ClusterLibraryInner innerObject;
+
+ private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager;
+
+ ClusterLibraryImpl(ClusterLibraryInner 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 ClusterLibraryProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ClusterLibraryInner 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
index 19df8bc9e9ce7..913f9216790fa 100644
--- 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
@@ -56,8 +56,8 @@ public final class ClusterPoolAvailableUpgradesClientImpl implements ClusterPool
}
/**
- * The interface defining all the services for HDInsightContainersManagementClientClusterPoolAvailableUpgrades to
- * be used by the proxy service to perform REST calls.
+ * The interface defining all the services for HDInsightContainersManagementClientClusterPoolAvailableUpgrades to be
+ * used by the proxy service to perform REST calls.
*/
@Host("{$host}")
@ServiceInterface(name = "HDInsightContainersM")
@@ -229,9 +229,7 @@ public PagedIterable list(String resourceGroup
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -257,9 +255,7 @@ private Mono> listNextSinglePage
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
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 4037b312c388e..cd69adf8c319a 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
@@ -85,14 +85,16 @@ 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;
}
@@ -109,14 +111,16 @@ 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;
}
@@ -129,14 +133,18 @@ public ClusterPool apply(Context context) {
}
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;
}
@@ -145,8 +153,8 @@ public ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest) {
}
public ClusterPool upgrade(ClusterPoolUpgrade clusterPoolUpgradeRequest, Context context) {
- return serviceManager.clusterPools().upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest,
- context);
+ return serviceManager.clusterPools()
+ .upgrade(resourceGroupName, clusterPoolName, clusterPoolUpgradeRequest, context);
}
public ClusterPoolImpl withRegion(Region location) {
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoriesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoriesClientImpl.java
new file mode 100644
index 0000000000000..d09bc5b3c91d2
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoriesClientImpl.java
@@ -0,0 +1,282 @@
+// Copyright (c) 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.ClusterPoolUpgradeHistoriesClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolUpgradeHistoryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ClusterPoolUpgradeHistoriesClient.
+ */
+public final class ClusterPoolUpgradeHistoriesClientImpl implements ClusterPoolUpgradeHistoriesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ClusterPoolUpgradeHistoriesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final HDInsightContainersManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ClusterPoolUpgradeHistoriesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ClusterPoolUpgradeHistoriesClientImpl(HDInsightContainersManagementClientImpl client) {
+ this.service = RestProxy.create(ClusterPoolUpgradeHistoriesService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for HDInsightContainersManagementClientClusterPoolUpgradeHistories to be
+ * used by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "HDInsightContainersM")
+ public interface ClusterPoolUpgradeHistoriesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/upgradeHistories")
+ @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);
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history 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()));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history 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));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history 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));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history 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));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String clusterPoolName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, clusterPoolName));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history 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.
+ * @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 upgrade history 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.
+ * @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 upgrade history 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/ClusterPoolUpgradeHistoriesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoriesImpl.java
new file mode 100644
index 0000000000000..340da3bbdfe33
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoriesImpl.java
@@ -0,0 +1,48 @@
+// Copyright (c) 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.ClusterPoolUpgradeHistoriesClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolUpgradeHistoryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistories;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistory;
+
+public final class ClusterPoolUpgradeHistoriesImpl implements ClusterPoolUpgradeHistories {
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolUpgradeHistoriesImpl.class);
+
+ private final ClusterPoolUpgradeHistoriesClient innerClient;
+
+ private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager;
+
+ public ClusterPoolUpgradeHistoriesImpl(ClusterPoolUpgradeHistoriesClient 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 ClusterPoolUpgradeHistoryImpl(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 ClusterPoolUpgradeHistoryImpl(inner1, this.manager()));
+ }
+
+ private ClusterPoolUpgradeHistoriesClient 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/ClusterPoolUpgradeHistoryImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoryImpl.java
new file mode 100644
index 0000000000000..f180c9f09d60f
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolUpgradeHistoryImpl.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.ClusterPoolUpgradeHistoryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistory;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgradeHistoryProperties;
+
+public final class ClusterPoolUpgradeHistoryImpl implements ClusterPoolUpgradeHistory {
+ private ClusterPoolUpgradeHistoryInner innerObject;
+
+ private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager;
+
+ ClusterPoolUpgradeHistoryImpl(ClusterPoolUpgradeHistoryInner 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 ClusterPoolUpgradeHistoryProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ClusterPoolUpgradeHistoryInner 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/ClusterPoolsClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsClientImpl.java
index a3a52bce6ef61..0c7a34d67ce05 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
@@ -1428,9 +1428,7 @@ public ClusterPoolInner upgrade(String resourceGroupName, String clusterPoolName
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -1458,9 +1456,7 @@ private Mono> listBySubscriptionNextSinglePageAs
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -1488,9 +1484,7 @@ private Mono> listBySubscriptionNextSinglePageAs
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -1518,9 +1512,7 @@ private Mono> listByResourceGroupNextSinglePageA
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
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 e093e25fc4792..6612ffcf9e1d9 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterPoolsImpl.java
@@ -12,8 +12,8 @@
import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPool;
-import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterPools;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterPoolUpgrade;
public final class ClusterPoolsImpl implements ClusterPools {
private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolsImpl.class);
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoriesClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoriesClientImpl.java
new file mode 100644
index 0000000000000..3dc355d227dfe
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoriesClientImpl.java
@@ -0,0 +1,295 @@
+// Copyright (c) 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.ClusterUpgradeHistoriesClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterUpgradeHistoryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ClusterUpgradeHistoriesClient.
+ */
+public final class ClusterUpgradeHistoriesClientImpl implements ClusterUpgradeHistoriesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ClusterUpgradeHistoriesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final HDInsightContainersManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ClusterUpgradeHistoriesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ClusterUpgradeHistoriesClientImpl(HDInsightContainersManagementClientImpl client) {
+ this.service = RestProxy.create(ClusterUpgradeHistoriesService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for HDInsightContainersManagementClientClusterUpgradeHistories to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "HDInsightContainersM")
+ public interface ClusterUpgradeHistoriesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/upgradeHistories")
+ @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);
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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()));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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));
+ }
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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.
+ * @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 upgrade history 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.
+ * @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 upgrade history 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/ClusterUpgradeHistoriesImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoriesImpl.java
new file mode 100644
index 0000000000000..d1b35fa8c61fb
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoriesImpl.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.ClusterUpgradeHistoriesClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterUpgradeHistoryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistories;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistory;
+
+public final class ClusterUpgradeHistoriesImpl implements ClusterUpgradeHistories {
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgradeHistoriesImpl.class);
+
+ private final ClusterUpgradeHistoriesClient innerClient;
+
+ private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager;
+
+ public ClusterUpgradeHistoriesImpl(ClusterUpgradeHistoriesClient 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 ClusterUpgradeHistoryImpl(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 ClusterUpgradeHistoryImpl(inner1, this.manager()));
+ }
+
+ private ClusterUpgradeHistoriesClient 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/ClusterUpgradeHistoryImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoryImpl.java
new file mode 100644
index 0000000000000..a6ad23a6aaa71
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClusterUpgradeHistoryImpl.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.ClusterUpgradeHistoryInner;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistory;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeHistoryProperties;
+
+public final class ClusterUpgradeHistoryImpl implements ClusterUpgradeHistory {
+ private ClusterUpgradeHistoryInner innerObject;
+
+ private final com.azure.resourcemanager.hdinsight.containers.HDInsightContainersManager serviceManager;
+
+ ClusterUpgradeHistoryImpl(ClusterUpgradeHistoryInner 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 ClusterUpgradeHistoryProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ClusterUpgradeHistoryInner 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/ClustersClientImpl.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ClustersClientImpl.java
index d7c4015425f0c..2f79d33a7c6f2 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
@@ -42,6 +42,7 @@
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.ClusterUpgradeRollback;
import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigListResult;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
@@ -99,6 +100,17 @@ Mono>> upgrade(@HostParam("$host") String endpoint,
@BodyParam("application/json") ClusterUpgrade clusterUpgradeRequest, @HeaderParam("Accept") String accept,
Context context);
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusterpools/{clusterPoolName}/clusters/{clusterName}/rollback")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> upgradeManualRollback(@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") ClusterUpgradeRollback clusterRollbackUpgradeRequest,
+ @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 })
@@ -607,6 +619,270 @@ public ClusterInner upgrade(String resourceGroupName, String clusterPoolName, St
return upgradeAsync(resourceGroupName, clusterPoolName, clusterName, clusterUpgradeRequest, context).block();
}
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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>> upgradeManualRollbackWithResponseAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (clusterRollbackUpgradeRequest == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter clusterRollbackUpgradeRequest is required and cannot be null."));
+ } else {
+ clusterRollbackUpgradeRequest.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.upgradeManualRollback(this.client.getEndpoint(), resourceGroupName,
+ this.client.getApiVersion(), this.client.getSubscriptionId(), clusterPoolName, clusterName,
+ clusterRollbackUpgradeRequest, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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>> upgradeManualRollbackWithResponseAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest,
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (clusterRollbackUpgradeRequest == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter clusterRollbackUpgradeRequest is required and cannot be null."));
+ } else {
+ clusterRollbackUpgradeRequest.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.upgradeManualRollback(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(),
+ this.client.getSubscriptionId(), clusterPoolName, clusterName, clusterRollbackUpgradeRequest, accept,
+ context);
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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> beginUpgradeManualRollbackAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest) {
+ Mono>> mono = upgradeManualRollbackWithResponseAsync(resourceGroupName,
+ clusterPoolName, clusterName, clusterRollbackUpgradeRequest);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ ClusterInner.class, ClusterInner.class, this.client.getContext());
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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> beginUpgradeManualRollbackAsync(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = upgradeManualRollbackWithResponseAsync(resourceGroupName,
+ clusterPoolName, clusterName, clusterRollbackUpgradeRequest, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ ClusterInner.class, ClusterInner.class, context);
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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> beginUpgradeManualRollback(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest) {
+ return this
+ .beginUpgradeManualRollbackAsync(resourceGroupName, clusterPoolName, clusterName,
+ clusterRollbackUpgradeRequest)
+ .getSyncPoller();
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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> beginUpgradeManualRollback(String resourceGroupName,
+ String clusterPoolName, String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest,
+ Context context) {
+ return this
+ .beginUpgradeManualRollbackAsync(resourceGroupName, clusterPoolName, clusterName,
+ clusterRollbackUpgradeRequest, context)
+ .getSyncPoller();
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollbackAsync(String resourceGroupName, String clusterPoolName,
+ String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest) {
+ return beginUpgradeManualRollbackAsync(resourceGroupName, clusterPoolName, clusterName,
+ clusterRollbackUpgradeRequest).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollbackAsync(String resourceGroupName, String clusterPoolName,
+ String clusterName, ClusterUpgradeRollback clusterRollbackUpgradeRequest, Context context) {
+ return beginUpgradeManualRollbackAsync(resourceGroupName, clusterPoolName, clusterName,
+ clusterRollbackUpgradeRequest, context).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollback(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterUpgradeRollback clusterRollbackUpgradeRequest) {
+ return upgradeManualRollbackAsync(resourceGroupName, clusterPoolName, clusterName,
+ clusterRollbackUpgradeRequest).block();
+ }
+
+ /**
+ * Manual rollback upgrade for 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 clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollback(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterUpgradeRollback clusterRollbackUpgradeRequest, Context context) {
+ return upgradeManualRollbackAsync(resourceGroupName, clusterPoolName, clusterName,
+ clusterRollbackUpgradeRequest, context).block();
+ }
+
/**
* Resize an existing Cluster.
*
@@ -2181,9 +2457,7 @@ public ClusterInstanceViewResultInner getInstanceView(String resourceGroupName,
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -2211,9 +2485,7 @@ private Mono> listByClusterPoolNameNextSinglePageAsy
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -2241,9 +2513,7 @@ private Mono> listByClusterPoolNameNextSinglePageAsy
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -2271,9 +2541,7 @@ private Mono> listServiceConfigsNextSing
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -2301,9 +2569,7 @@ private Mono> listServiceConfigsNextSing
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -2330,9 +2596,7 @@ private Mono> listInstanceViewsNex
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
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 4cd62c1d7e18f..bd28970854535 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,8 +16,9 @@
import com.azure.resourcemanager.hdinsight.containers.models.Cluster;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterInstanceViewResult;
import com.azure.resourcemanager.hdinsight.containers.models.ClusterResizeData;
-import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade;
import com.azure.resourcemanager.hdinsight.containers.models.Clusters;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgrade;
+import com.azure.resourcemanager.hdinsight.containers.models.ClusterUpgradeRollback;
import com.azure.resourcemanager.hdinsight.containers.models.ServiceConfigResult;
public final class ClustersImpl implements Clusters {
@@ -59,8 +60,31 @@ public Cluster upgrade(String resourceGroupName, String clusterPoolName, String
public Cluster upgrade(String resourceGroupName, String clusterPoolName, String clusterName,
ClusterUpgrade clusterUpgradeRequest, Context context) {
- ClusterInner inner = this.serviceClient().upgrade(resourceGroupName, clusterPoolName, clusterName,
- clusterUpgradeRequest, 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 upgradeManualRollback(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterUpgradeRollback clusterRollbackUpgradeRequest) {
+ ClusterInner inner = this.serviceClient()
+ .upgradeManualRollback(resourceGroupName, clusterPoolName, clusterName, clusterRollbackUpgradeRequest);
+ if (inner != null) {
+ return new ClusterImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Cluster upgradeManualRollback(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterUpgradeRollback clusterRollbackUpgradeRequest, Context context) {
+ ClusterInner inner = this.serviceClient()
+ .upgradeManualRollback(resourceGroupName, clusterPoolName, clusterName, clusterRollbackUpgradeRequest,
+ context);
if (inner != null) {
return new ClusterImpl(inner, this.manager());
} else {
@@ -81,8 +105,8 @@ public Cluster resize(String resourceGroupName, String clusterPoolName, String c
public Cluster resize(String resourceGroupName, String clusterPoolName, String clusterName,
ClusterResizeData clusterResizeRequest, Context context) {
- ClusterInner inner = this.serviceClient().resize(resourceGroupName, clusterPoolName, clusterName,
- clusterResizeRequest, context);
+ ClusterInner inner = this.serviceClient()
+ .resize(resourceGroupName, clusterPoolName, clusterName, clusterResizeRequest, context);
if (inner != null) {
return new ClusterImpl(inner, this.manager());
} else {
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 36c934c0ea257..d65726c533dc7 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
@@ -123,11 +123,13 @@ public HDInsightContainersManagementClientBuilder serializerAdapter(SerializerAd
public HDInsightContainersManagementClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
- HttpPipeline localPipeline = (pipeline != null) ? pipeline
+ 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
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
HDInsightContainersManagementClientImpl client = new HDInsightContainersManagementClientImpl(localPipeline,
localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
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 46e2cce5ca846..541d950cff66b 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
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.hdinsight.containers.implementation;
import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpResponse;
@@ -12,8 +13,8 @@
import com.azure.core.management.AzureEnvironment;
import com.azure.core.management.exception.ManagementError;
import com.azure.core.management.exception.ManagementException;
-import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
@@ -26,9 +27,12 @@
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.ClusterLibrariesClient;
import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolAvailableUpgradesClient;
import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolsClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterPoolUpgradeHistoriesClient;
import com.azure.resourcemanager.hdinsight.containers.fluent.ClustersClient;
+import com.azure.resourcemanager.hdinsight.containers.fluent.ClusterUpgradeHistoriesClient;
import com.azure.resourcemanager.hdinsight.containers.fluent.HDInsightContainersManagementClient;
import com.azure.resourcemanager.hdinsight.containers.fluent.LocationsClient;
import com.azure.resourcemanager.hdinsight.containers.fluent.OperationsClient;
@@ -158,6 +162,20 @@ public ClusterPoolAvailableUpgradesClient getClusterPoolAvailableUpgrades() {
return this.clusterPoolAvailableUpgrades;
}
+ /**
+ * The ClusterPoolUpgradeHistoriesClient object to access its operations.
+ */
+ private final ClusterPoolUpgradeHistoriesClient clusterPoolUpgradeHistories;
+
+ /**
+ * Gets the ClusterPoolUpgradeHistoriesClient object to access its operations.
+ *
+ * @return the ClusterPoolUpgradeHistoriesClient object.
+ */
+ public ClusterPoolUpgradeHistoriesClient getClusterPoolUpgradeHistories() {
+ return this.clusterPoolUpgradeHistories;
+ }
+
/**
* The ClustersClient object to access its operations.
*/
@@ -186,6 +204,20 @@ public ClusterAvailableUpgradesClient getClusterAvailableUpgrades() {
return this.clusterAvailableUpgrades;
}
+ /**
+ * The ClusterUpgradeHistoriesClient object to access its operations.
+ */
+ private final ClusterUpgradeHistoriesClient clusterUpgradeHistories;
+
+ /**
+ * Gets the ClusterUpgradeHistoriesClient object to access its operations.
+ *
+ * @return the ClusterUpgradeHistoriesClient object.
+ */
+ public ClusterUpgradeHistoriesClient getClusterUpgradeHistories() {
+ return this.clusterUpgradeHistories;
+ }
+
/**
* The ClusterJobsClient object to access its operations.
*/
@@ -256,6 +288,20 @@ public AvailableClusterVersionsClient getAvailableClusterVersions() {
return this.availableClusterVersions;
}
+ /**
+ * The ClusterLibrariesClient object to access its operations.
+ */
+ private final ClusterLibrariesClient clusterLibraries;
+
+ /**
+ * Gets the ClusterLibrariesClient object to access its operations.
+ *
+ * @return the ClusterLibrariesClient object.
+ */
+ public ClusterLibrariesClient getClusterLibraries() {
+ return this.clusterLibraries;
+ }
+
/**
* Initializes an instance of HDInsightContainersManagementClient client.
*
@@ -273,16 +319,19 @@ public AvailableClusterVersionsClient getAvailableClusterVersions() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-11-01-preview";
+ this.apiVersion = "2024-05-01-preview";
this.clusterPools = new ClusterPoolsClientImpl(this);
this.clusterPoolAvailableUpgrades = new ClusterPoolAvailableUpgradesClientImpl(this);
+ this.clusterPoolUpgradeHistories = new ClusterPoolUpgradeHistoriesClientImpl(this);
this.clusters = new ClustersClientImpl(this);
this.clusterAvailableUpgrades = new ClusterAvailableUpgradesClientImpl(this);
+ this.clusterUpgradeHistories = new ClusterUpgradeHistoriesClientImpl(this);
this.clusterJobs = new ClusterJobsClientImpl(this);
this.locations = new LocationsClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.availableClusterPoolVersions = new AvailableClusterPoolVersionsClientImpl(this);
this.availableClusterVersions = new AvailableClusterVersionsClientImpl(this);
+ this.clusterLibraries = new ClusterLibrariesClientImpl(this);
}
/**
@@ -345,8 +394,8 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
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;
}
@@ -387,7 +436,7 @@ public int getStatusCode() {
}
public String getHeaderValue(String s) {
- return httpHeaders.getValue(s);
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
}
public HttpHeaders getHeaders() {
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 2bbdae9a5cde1..affea8fbc362d 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
@@ -56,8 +56,8 @@ public final class OperationsClientImpl implements OperationsClient {
}
/**
- * 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")
@@ -183,9 +183,7 @@ 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.
+ * @param nextLink The URL to get the next list of items.
* @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.
@@ -211,9 +209,7 @@ private Mono> listNextSinglePageAsync(String nextL
/**
* Get the next page of items.
*
- * @param nextLink The URL to get the next list of items
- *
- * The nextLink parameter.
+ * @param nextLink The URL to get the next list of items.
* @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.
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java
index d82914d0b7f41..3ff5f0b188ad3 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/implementation/ResourceManagerUtils.java
@@ -41,7 +41,6 @@ static String getValueFromIdByName(String id, String name) {
}
}
return null;
-
}
static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
@@ -75,7 +74,6 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
}
return null;
-
}
static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
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 550eef95bf6cd..895757f71fa6b 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -83,7 +82,6 @@ public Action() {
* @param name a name to look for.
* @return the corresponding Action.
*/
- @JsonCreator
public static Action fromString(String name) {
return fromString(name, Action.class);
}
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 a580638e04500..d703f81723164 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -32,7 +31,6 @@ public ActionType() {
* @param name a name to look for.
* @return the corresponding ActionType.
*/
- @JsonCreator
public static ActionType fromString(String name) {
return fromString(name, ActionType.class);
}
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 cf1c29acbab2f..82d7311650e3d 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
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Properties of the cluster pool underlying AKS cluster.
*/
@Fluent
-public class AksClusterProfile {
+public class AksClusterProfile implements JsonSerializable {
/*
* ARM Resource ID of the AKS cluster
*/
- @JsonProperty(value = "aksClusterResourceId")
private String aksClusterResourceId;
/*
* Identity properties of the AKS cluster agentpool MSI
*/
- @JsonProperty(value = "aksClusterAgentPoolIdentityProfile")
private AksClusterProfileAksClusterAgentPoolIdentityProfile aksClusterAgentPoolIdentityProfile;
/*
* AKS control plane and default node pool version of this ClusterPool
*/
- @JsonProperty(value = "aksVersion", access = JsonProperty.Access.WRITE_ONLY)
private String aksVersion;
/**
@@ -86,6 +87,17 @@ public String aksVersion() {
return this.aksVersion;
}
+ /**
+ * Set the aksVersion property: AKS control plane and default node pool version of this ClusterPool.
+ *
+ * @param aksVersion the aksVersion value to set.
+ * @return the AksClusterProfile object itself.
+ */
+ AksClusterProfile withAksVersion(String aksVersion) {
+ this.aksVersion = aksVersion;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -96,4 +108,46 @@ public void validate() {
aksClusterAgentPoolIdentityProfile().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("aksClusterResourceId", this.aksClusterResourceId);
+ jsonWriter.writeJsonField("aksClusterAgentPoolIdentityProfile", this.aksClusterAgentPoolIdentityProfile);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AksClusterProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AksClusterProfile if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AksClusterProfile.
+ */
+ public static AksClusterProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AksClusterProfile deserializedAksClusterProfile = new AksClusterProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("aksClusterResourceId".equals(fieldName)) {
+ deserializedAksClusterProfile.aksClusterResourceId = reader.getString();
+ } else if ("aksClusterAgentPoolIdentityProfile".equals(fieldName)) {
+ deserializedAksClusterProfile.aksClusterAgentPoolIdentityProfile
+ = AksClusterProfileAksClusterAgentPoolIdentityProfile.fromJson(reader);
+ } else if ("aksVersion".equals(fieldName)) {
+ deserializedAksClusterProfile.aksVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAksClusterProfile;
+ });
+ }
}
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 bb9742fc107cc..43006dc41153a 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/AksClusterProfileAksClusterAgentPoolIdentityProfile.java
@@ -5,6 +5,10 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Identity properties of the AKS cluster agentpool MSI.
@@ -53,4 +57,50 @@ public AksClusterProfileAksClusterAgentPoolIdentityProfile withMsiObjectId(Strin
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("msiResourceId", msiResourceId());
+ jsonWriter.writeStringField("msiClientId", msiClientId());
+ jsonWriter.writeStringField("msiObjectId", msiObjectId());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AksClusterProfileAksClusterAgentPoolIdentityProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AksClusterProfileAksClusterAgentPoolIdentityProfile if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AksClusterProfileAksClusterAgentPoolIdentityProfile.
+ */
+ public static AksClusterProfileAksClusterAgentPoolIdentityProfile fromJson(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ AksClusterProfileAksClusterAgentPoolIdentityProfile deserializedAksClusterProfileAksClusterAgentPoolIdentityProfile
+ = new AksClusterProfileAksClusterAgentPoolIdentityProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("msiResourceId".equals(fieldName)) {
+ deserializedAksClusterProfileAksClusterAgentPoolIdentityProfile
+ .withMsiResourceId(reader.getString());
+ } else if ("msiClientId".equals(fieldName)) {
+ deserializedAksClusterProfileAksClusterAgentPoolIdentityProfile.withMsiClientId(reader.getString());
+ } else if ("msiObjectId".equals(fieldName)) {
+ deserializedAksClusterProfileAksClusterAgentPoolIdentityProfile.withMsiObjectId(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAksClusterProfileAksClusterAgentPoolIdentityProfile;
+ });
+ }
}
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 616c74406f217..5fbfb2f0c9fa2 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
@@ -5,24 +5,26 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Authorization profile with details of AAD user Ids and group Ids authorized for data plane access.
*/
@Fluent
-public final class AuthorizationProfile {
+public final class AuthorizationProfile implements JsonSerializable {
/*
* AAD user Ids authorized for data plane access.
*/
- @JsonProperty(value = "userIds")
private List userIds;
/*
* AAD group Ids authorized for data plane access.
*/
- @JsonProperty(value = "groupIds")
private List groupIds;
/**
@@ -78,4 +80,45 @@ public AuthorizationProfile withGroupIds(List groupIds) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("userIds", this.userIds, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeArrayField("groupIds", this.groupIds, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AuthorizationProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AuthorizationProfile if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the AuthorizationProfile.
+ */
+ public static AuthorizationProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AuthorizationProfile deserializedAuthorizationProfile = new AuthorizationProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("userIds".equals(fieldName)) {
+ List userIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedAuthorizationProfile.userIds = userIds;
+ } else if ("groupIds".equals(fieldName)) {
+ List groupIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedAuthorizationProfile.groupIds = groupIds;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAuthorizationProfile;
+ });
+ }
}
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 9298321ca2139..b0c9e707571e2 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
@@ -5,44 +5,43 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* This is the Autoscale profile for the cluster. This will allow customer to create cluster enabled with Autoscale.
*/
@Fluent
-public final class AutoscaleProfile {
+public final class AutoscaleProfile implements JsonSerializable {
/*
* This indicates whether auto scale is enabled on HDInsight on AKS cluster.
*/
- @JsonProperty(value = "enabled", required = true)
private boolean enabled;
/*
* 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.
+ * 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.
*/
- @JsonProperty(value = "gracefulDecommissionTimeout")
private Integer gracefulDecommissionTimeout;
/*
* User to specify which type of Autoscale to be implemented - Scheduled Based or Load Based.
*/
- @JsonProperty(value = "autoscaleType")
private AutoscaleType autoscaleType;
/*
* Profiles of schedule based Autoscale.
*/
- @JsonProperty(value = "scheduleBasedConfig")
private ScheduleBasedConfig scheduleBasedConfig;
/*
* Profiles of load based Autoscale.
*/
- @JsonProperty(value = "loadBasedConfig")
private LoadBasedConfig loadBasedConfig;
/**
@@ -74,8 +73,8 @@ 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.
*/
@@ -86,8 +85,8 @@ 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.
@@ -172,4 +171,53 @@ public void validate() {
loadBasedConfig().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ jsonWriter.writeNumberField("gracefulDecommissionTimeout", this.gracefulDecommissionTimeout);
+ jsonWriter.writeStringField("autoscaleType", this.autoscaleType == null ? null : this.autoscaleType.toString());
+ jsonWriter.writeJsonField("scheduleBasedConfig", this.scheduleBasedConfig);
+ jsonWriter.writeJsonField("loadBasedConfig", this.loadBasedConfig);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AutoscaleProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AutoscaleProfile if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AutoscaleProfile.
+ */
+ public static AutoscaleProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AutoscaleProfile deserializedAutoscaleProfile = new AutoscaleProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enabled".equals(fieldName)) {
+ deserializedAutoscaleProfile.enabled = reader.getBoolean();
+ } else if ("gracefulDecommissionTimeout".equals(fieldName)) {
+ deserializedAutoscaleProfile.gracefulDecommissionTimeout = reader.getNullable(JsonReader::getInt);
+ } else if ("autoscaleType".equals(fieldName)) {
+ deserializedAutoscaleProfile.autoscaleType = AutoscaleType.fromString(reader.getString());
+ } else if ("scheduleBasedConfig".equals(fieldName)) {
+ deserializedAutoscaleProfile.scheduleBasedConfig = ScheduleBasedConfig.fromJson(reader);
+ } else if ("loadBasedConfig".equals(fieldName)) {
+ deserializedAutoscaleProfile.loadBasedConfig = LoadBasedConfig.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAutoscaleProfile;
+ });
+ }
}
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 fd52e266d057b..17ccfa92d2f5c 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public AutoscaleType() {
* @param name a name to look for.
* @return the corresponding AutoscaleType.
*/
- @JsonCreator
public static AutoscaleType fromString(String name) {
return fromString(name, AutoscaleType.class);
}
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 23d9492e98adf..4019567839e18 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
@@ -5,18 +5,21 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Trino cluster catalog options.
*/
@Fluent
-public final class CatalogOptions {
+public final class CatalogOptions implements JsonSerializable {
/*
* hive catalog options.
*/
- @JsonProperty(value = "hive")
private List hive;
/**
@@ -55,4 +58,41 @@ public void validate() {
hive().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("hive", this.hive, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CatalogOptions from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CatalogOptions if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CatalogOptions.
+ */
+ public static CatalogOptions fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CatalogOptions deserializedCatalogOptions = new CatalogOptions();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("hive".equals(fieldName)) {
+ List hive = reader.readArray(reader1 -> HiveCatalogOption.fromJson(reader1));
+ deserializedCatalogOptions.hive = hive;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCatalogOptions;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Category.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Category.java
new file mode 100644
index 0000000000000..72f790d682d17
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/Category.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hdinsight.containers.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Defines values for Category.
+ */
+public final class Category extends ExpandableStringEnum {
+ /**
+ * Static value custom for Category.
+ */
+ public static final Category CUSTOM = fromString("custom");
+
+ /**
+ * Static value predefined for Category.
+ */
+ public static final Category PREDEFINED = fromString("predefined");
+
+ /**
+ * Creates a new instance of Category value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public Category() {
+ }
+
+ /**
+ * Creates or finds a Category from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding Category.
+ */
+ public static Category fromString(String name) {
+ return fromString(name, Category.class);
+ }
+
+ /**
+ * Gets known Category values.
+ *
+ * @return known Category values.
+ */
+ public static Collection values() {
+ return values(Category.class);
+ }
+}
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 2352b966c4efe..72046dcad0608 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
@@ -287,6 +287,29 @@ interface WithProperties {
*/
Cluster upgrade(ClusterUpgrade clusterUpgradeRequest, Context context);
+ /**
+ * Manual rollback upgrade for a cluster.
+ *
+ * @param clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollback(ClusterUpgradeRollback clusterRollbackUpgradeRequest);
+
+ /**
+ * Manual rollback upgrade for a cluster.
+ *
+ * @param clusterRollbackUpgradeRequest Manual rollback upgrade for 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 upgradeManualRollback(ClusterUpgradeRollback clusterRollbackUpgradeRequest, Context context);
+
/**
* Resize an existing Cluster.
*
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
index bd89f1b68d272..f29b07dc41bdc 100644
--- 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
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster access profile.
*/
@Fluent
-public final class ClusterAccessProfile {
+public final class ClusterAccessProfile implements JsonSerializable {
/*
* 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;
/**
@@ -53,8 +55,8 @@ public ClusterAccessProfile withEnableInternalIngress(boolean enableInternalIngr
}
/**
- * Get the privateLinkServiceId property: Private link service resource ID. Only when enableInternalIngress is
- * true, this property will be returned.
+ * Get the privateLinkServiceId property: Private link service resource ID. Only when enableInternalIngress is true,
+ * this property will be returned.
*
* @return the privateLinkServiceId value.
*/
@@ -69,4 +71,43 @@ public String privateLinkServiceId() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enableInternalIngress", this.enableInternalIngress);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAccessProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAccessProfile if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterAccessProfile.
+ */
+ public static ClusterAccessProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAccessProfile deserializedClusterAccessProfile = new ClusterAccessProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enableInternalIngress".equals(fieldName)) {
+ deserializedClusterAccessProfile.enableInternalIngress = reader.getBoolean();
+ } else if ("privateLinkServiceId".equals(fieldName)) {
+ deserializedClusterAccessProfile.privateLinkServiceId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAccessProfile;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..acb18d9ef7b6e
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchUpgradeHistoryProperties.java
@@ -0,0 +1,169 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster aks patch upgrade history properties.
+ */
+@Fluent
+public final class ClusterAksPatchUpgradeHistoryProperties extends ClusterUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeHistoryType upgradeType = ClusterUpgradeHistoryType.AKSPATCH_UPGRADE;
+
+ /*
+ * Version before update.
+ */
+ private String originalVersion;
+
+ /*
+ * Version going to update.
+ */
+ private String newVersion;
+
+ /**
+ * Creates an instance of ClusterAksPatchUpgradeHistoryProperties class.
+ */
+ public ClusterAksPatchUpgradeHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * Get the originalVersion property: Version before update.
+ *
+ * @return the originalVersion value.
+ */
+ public String originalVersion() {
+ return this.originalVersion;
+ }
+
+ /**
+ * Set the originalVersion property: Version before update.
+ *
+ * @param originalVersion the originalVersion value to set.
+ * @return the ClusterAksPatchUpgradeHistoryProperties object itself.
+ */
+ public ClusterAksPatchUpgradeHistoryProperties withOriginalVersion(String originalVersion) {
+ this.originalVersion = originalVersion;
+ return this;
+ }
+
+ /**
+ * Get the newVersion property: Version going to update.
+ *
+ * @return the newVersion value.
+ */
+ public String newVersion() {
+ return this.newVersion;
+ }
+
+ /**
+ * Set the newVersion property: Version going to update.
+ *
+ * @param newVersion the newVersion value to set.
+ * @return the ClusterAksPatchUpgradeHistoryProperties object itself.
+ */
+ public ClusterAksPatchUpgradeHistoryProperties withNewVersion(String newVersion) {
+ this.newVersion = newVersion;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAksPatchUpgradeHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAksPatchUpgradeHistoryProperties
+ withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("originalVersion", this.originalVersion);
+ jsonWriter.writeStringField("newVersion", this.newVersion);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAksPatchUpgradeHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAksPatchUpgradeHistoryProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterAksPatchUpgradeHistoryProperties.
+ */
+ public static ClusterAksPatchUpgradeHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAksPatchUpgradeHistoryProperties deserializedClusterAksPatchUpgradeHistoryProperties
+ = new ClusterAksPatchUpgradeHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterAksPatchUpgradeHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterAksPatchUpgradeHistoryProperties
+ .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterAksPatchUpgradeHistoryProperties.upgradeType
+ = ClusterUpgradeHistoryType.fromString(reader.getString());
+ } else if ("originalVersion".equals(fieldName)) {
+ deserializedClusterAksPatchUpgradeHistoryProperties.originalVersion = reader.getString();
+ } else if ("newVersion".equals(fieldName)) {
+ deserializedClusterAksPatchUpgradeHistoryProperties.newVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAksPatchUpgradeHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java
index eb0236cb1be52..6683708201c48 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAksPatchVersionUpgradeProperties.java
@@ -5,22 +5,37 @@
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;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeType upgradeType = ClusterUpgradeType.AKSPATCH_UPGRADE;
+
/**
* Creates an instance of ClusterAksPatchVersionUpgradeProperties class.
*/
public ClusterAksPatchVersionUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Validates the instance.
*
@@ -30,4 +45,42 @@ public ClusterAksPatchVersionUpgradeProperties() {
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAksPatchVersionUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAksPatchVersionUpgradeProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterAksPatchVersionUpgradeProperties.
+ */
+ public static ClusterAksPatchVersionUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAksPatchVersionUpgradeProperties deserializedClusterAksPatchVersionUpgradeProperties
+ = new ClusterAksPatchVersionUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterAksPatchVersionUpgradeProperties.upgradeType
+ = ClusterUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAksPatchVersionUpgradeProperties;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java
new file mode 100644
index 0000000000000..e813203320208
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableInPlaceUpgradeProperties.java
@@ -0,0 +1,429 @@
+// Copyright (c) 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.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * Cluster available in-place upgrade.
+ */
+@Fluent
+public class ClusterAvailableInPlaceUpgradeProperties extends ClusterAvailableUpgradeProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterAvailableUpgradeType upgradeType
+ = ClusterAvailableUpgradeType.fromString("ClusterAvailableInPlaceUpgradeProperties");
+
+ /*
+ * Hotfix version upgrade description.
+ */
+ private String description;
+
+ /*
+ * Source OSS version of current cluster component.
+ */
+ private String sourceOssVersion;
+
+ /*
+ * Source cluster version of current cluster component.
+ */
+ private String sourceClusterVersion;
+
+ /*
+ * Source build number of current cluster component.
+ */
+ private String sourceBuildNumber;
+
+ /*
+ * Target OSS version of component to be upgraded.
+ */
+ private String targetOssVersion;
+
+ /*
+ * Target cluster version of component to be upgraded.
+ */
+ private String targetClusterVersion;
+
+ /*
+ * Target build number of component to be upgraded.
+ */
+ private String targetBuildNumber;
+
+ /*
+ * Name of component to be upgraded.
+ */
+ private String componentName;
+
+ /*
+ * Severity of this upgrade.
+ */
+ private Severity severity;
+
+ /*
+ * Extended properties of current available upgrade version
+ */
+ private String extendedProperties;
+
+ /*
+ * Created time of current available upgrade version
+ */
+ private OffsetDateTime createdTime;
+
+ /**
+ * Creates an instance of ClusterAvailableInPlaceUpgradeProperties class.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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 ClusterAvailableInPlaceUpgradeProperties object itself.
+ */
+ public ClusterAvailableInPlaceUpgradeProperties 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();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("sourceOssVersion", this.sourceOssVersion);
+ jsonWriter.writeStringField("sourceClusterVersion", this.sourceClusterVersion);
+ jsonWriter.writeStringField("sourceBuildNumber", this.sourceBuildNumber);
+ jsonWriter.writeStringField("targetOssVersion", this.targetOssVersion);
+ jsonWriter.writeStringField("targetClusterVersion", this.targetClusterVersion);
+ jsonWriter.writeStringField("targetBuildNumber", this.targetBuildNumber);
+ jsonWriter.writeStringField("componentName", this.componentName);
+ jsonWriter.writeStringField("severity", this.severity == null ? null : this.severity.toString());
+ jsonWriter.writeStringField("extendedProperties", this.extendedProperties);
+ jsonWriter.writeStringField("createdTime",
+ this.createdTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.createdTime));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAvailableInPlaceUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAvailableInPlaceUpgradeProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterAvailableInPlaceUpgradeProperties.
+ */
+ public static ClusterAvailableInPlaceUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("upgradeType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("HotfixUpgrade".equals(discriminatorValue)) {
+ return ClusterAvailableUpgradeHotfixUpgradeProperties.fromJson(readerToUse.reset());
+ } else if ("PatchVersionUpgrade".equals(discriminatorValue)) {
+ return ClusterAvailableUpgradePatchVersionUpgradeProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterAvailableInPlaceUpgradeProperties fromJsonKnownDiscriminator(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAvailableInPlaceUpgradeProperties deserializedClusterAvailableInPlaceUpgradeProperties
+ = new ClusterAvailableInPlaceUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.upgradeType
+ = ClusterAvailableUpgradeType.fromString(reader.getString());
+ } else if ("description".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.description = reader.getString();
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.sourceOssVersion = reader.getString();
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.sourceClusterVersion = reader.getString();
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.sourceBuildNumber = reader.getString();
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.targetOssVersion = reader.getString();
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.targetClusterVersion = reader.getString();
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.targetBuildNumber = reader.getString();
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.componentName = reader.getString();
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.severity
+ = Severity.fromString(reader.getString());
+ } else if ("extendedProperties".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.extendedProperties = reader.getString();
+ } else if ("createdTime".equals(fieldName)) {
+ deserializedClusterAvailableInPlaceUpgradeProperties.createdTime = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAvailableInPlaceUpgradeProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java
index 0357db6013cf7..56c25d74df499 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeAksPatchUpgradeProperties.java
@@ -5,33 +5,34 @@
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 com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterAvailableUpgradeType upgradeType = ClusterAvailableUpgradeType.AKSPATCH_UPGRADE;
+
/*
* 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;
/**
@@ -40,6 +41,16 @@ public final class ClusterAvailableUpgradeAksPatchUpgradeProperties extends Clus
public ClusterAvailableUpgradeAksPatchUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Get the currentVersion property: Current node pool version.
*
@@ -112,4 +123,53 @@ public ClusterAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(String
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("currentVersion", this.currentVersion);
+ jsonWriter.writeStringField("currentVersionStatus",
+ this.currentVersionStatus == null ? null : this.currentVersionStatus.toString());
+ jsonWriter.writeStringField("latestVersion", this.latestVersion);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAvailableUpgradeAksPatchUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAvailableUpgradeAksPatchUpgradeProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterAvailableUpgradeAksPatchUpgradeProperties.
+ */
+ public static ClusterAvailableUpgradeAksPatchUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAvailableUpgradeAksPatchUpgradeProperties deserializedClusterAvailableUpgradeAksPatchUpgradeProperties
+ = new ClusterAvailableUpgradeAksPatchUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeAksPatchUpgradeProperties.upgradeType
+ = ClusterAvailableUpgradeType.fromString(reader.getString());
+ } else if ("currentVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeAksPatchUpgradeProperties.currentVersion = reader.getString();
+ } else if ("currentVersionStatus".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeAksPatchUpgradeProperties.currentVersionStatus
+ = CurrentClusterAksVersionStatus.fromString(reader.getString());
+ } else if ("latestVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeAksPatchUpgradeProperties.latestVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAvailableUpgradeAksPatchUpgradeProperties;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java
index 2e88b74167969..4dc1edca4de34 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradeHotfixUpgradeProperties.java
@@ -5,83 +5,23 @@
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 com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
/**
* 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 {
+public final class ClusterAvailableUpgradeHotfixUpgradeProperties extends ClusterAvailableInPlaceUpgradeProperties {
/*
- * Hotfix version upgrade description.
+ * Type of upgrade.
*/
- @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;
+ private ClusterAvailableUpgradeType upgradeType = ClusterAvailableUpgradeType.HOTFIX_UPGRADE;
/**
* Creates an instance of ClusterAvailableUpgradeHotfixUpgradeProperties class.
@@ -90,222 +30,111 @@ public ClusterAvailableUpgradeHotfixUpgradeProperties() {
}
/**
- * Get the description property: Hotfix version upgrade description.
+ * Get the upgradeType property: Type of upgrade.
*
- * @return the description value.
+ * @return the upgradeType value.
*/
- public String description() {
- return this.description;
+ @Override
+ public ClusterAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
}
/**
- * Set the description property: Hotfix version upgrade description.
- *
- * @param description the description value to set.
- * @return the ClusterAvailableUpgradeHotfixUpgradeProperties object itself.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withDescription(String description) {
- this.description = description;
+ super.withDescription(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceOssVersion(String sourceOssVersion) {
- this.sourceOssVersion = sourceOssVersion;
+ super.withSourceOssVersion(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceClusterVersion(String sourceClusterVersion) {
- this.sourceClusterVersion = sourceClusterVersion;
+ super.withSourceClusterVersion(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withSourceBuildNumber(String sourceBuildNumber) {
- this.sourceBuildNumber = sourceBuildNumber;
+ super.withSourceBuildNumber(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetOssVersion(String targetOssVersion) {
- this.targetOssVersion = targetOssVersion;
+ super.withTargetOssVersion(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetClusterVersion(String targetClusterVersion) {
- this.targetClusterVersion = targetClusterVersion;
+ super.withTargetClusterVersion(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withTargetBuildNumber(String targetBuildNumber) {
- this.targetBuildNumber = targetBuildNumber;
+ super.withTargetBuildNumber(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withComponentName(String componentName) {
- this.componentName = componentName;
+ super.withComponentName(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withSeverity(Severity severity) {
- this.severity = severity;
+ super.withSeverity(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withExtendedProperties(String extendedProperties) {
- this.extendedProperties = extendedProperties;
+ super.withExtendedProperties(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterAvailableUpgradeHotfixUpgradeProperties withCreatedTime(OffsetDateTime createdTime) {
- this.createdTime = createdTime;
+ super.withCreatedTime(createdTime);
return this;
}
@@ -318,4 +147,83 @@ public ClusterAvailableUpgradeHotfixUpgradeProperties withCreatedTime(OffsetDate
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", description());
+ jsonWriter.writeStringField("sourceOssVersion", sourceOssVersion());
+ jsonWriter.writeStringField("sourceClusterVersion", sourceClusterVersion());
+ jsonWriter.writeStringField("sourceBuildNumber", sourceBuildNumber());
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("severity", severity() == null ? null : severity().toString());
+ jsonWriter.writeStringField("extendedProperties", extendedProperties());
+ jsonWriter.writeStringField("createdTime",
+ createdTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(createdTime()));
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAvailableUpgradeHotfixUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAvailableUpgradeHotfixUpgradeProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterAvailableUpgradeHotfixUpgradeProperties.
+ */
+ public static ClusterAvailableUpgradeHotfixUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAvailableUpgradeHotfixUpgradeProperties deserializedClusterAvailableUpgradeHotfixUpgradeProperties
+ = new ClusterAvailableUpgradeHotfixUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("description".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties.withDescription(reader.getString());
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties.withSourceOssVersion(reader.getString());
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties
+ .withSourceClusterVersion(reader.getString());
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties
+ .withSourceBuildNumber(reader.getString());
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties.withTargetOssVersion(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties
+ .withTargetClusterVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties
+ .withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties.withComponentName(reader.getString());
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties
+ .withSeverity(Severity.fromString(reader.getString()));
+ } else if ("extendedProperties".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties
+ .withExtendedProperties(reader.getString());
+ } else if ("createdTime".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties.withCreatedTime(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeHotfixUpgradeProperties.upgradeType
+ = ClusterAvailableUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAvailableUpgradeHotfixUpgradeProperties;
+ });
+ }
}
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
index 08d4f84b48da0..01afc8fa9e1fb 100644
--- 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
@@ -6,25 +6,27 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterAvailableUpgradeInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* Collection of cluster available upgrade.
*/
@Fluent
-public final class ClusterAvailableUpgradeList {
+public final class ClusterAvailableUpgradeList implements JsonSerializable {
/*
* 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;
/**
@@ -80,12 +82,55 @@ public ClusterAvailableUpgradeList withNextLink(String nextLink) {
*/
public void validate() {
if (value() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property value in model ClusterAvailableUpgradeList"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property value in model ClusterAvailableUpgradeList"));
} else {
value().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterAvailableUpgradeList.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAvailableUpgradeList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAvailableUpgradeList if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterAvailableUpgradeList.
+ */
+ public static ClusterAvailableUpgradeList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAvailableUpgradeList deserializedClusterAvailableUpgradeList = new ClusterAvailableUpgradeList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ClusterAvailableUpgradeInner.fromJson(reader1));
+ deserializedClusterAvailableUpgradeList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeList.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAvailableUpgradeList;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java
new file mode 100644
index 0000000000000..5e6a94b9e2a6b
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterAvailableUpgradePatchVersionUpgradeProperties.java
@@ -0,0 +1,235 @@
+// Copyright (c) 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.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * Cluster available patch version upgrade.
+ */
+@Fluent
+public final class ClusterAvailableUpgradePatchVersionUpgradeProperties
+ extends ClusterAvailableInPlaceUpgradeProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterAvailableUpgradeType upgradeType = ClusterAvailableUpgradeType.PATCH_VERSION_UPGRADE;
+
+ /**
+ * Creates an instance of ClusterAvailableUpgradePatchVersionUpgradeProperties class.
+ */
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withDescription(String description) {
+ super.withDescription(description);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withSourceOssVersion(String sourceOssVersion) {
+ super.withSourceOssVersion(sourceOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withSourceClusterVersion(String sourceClusterVersion) {
+ super.withSourceClusterVersion(sourceClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withSourceBuildNumber(String sourceBuildNumber) {
+ super.withSourceBuildNumber(sourceBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withTargetOssVersion(String targetOssVersion) {
+ super.withTargetOssVersion(targetOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withTargetClusterVersion(String targetClusterVersion) {
+ super.withTargetClusterVersion(targetClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withTargetBuildNumber(String targetBuildNumber) {
+ super.withTargetBuildNumber(targetBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withComponentName(String componentName) {
+ super.withComponentName(componentName);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withSeverity(Severity severity) {
+ super.withSeverity(severity);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withExtendedProperties(String extendedProperties) {
+ super.withExtendedProperties(extendedProperties);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterAvailableUpgradePatchVersionUpgradeProperties withCreatedTime(OffsetDateTime createdTime) {
+ super.withCreatedTime(createdTime);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("description", description());
+ jsonWriter.writeStringField("sourceOssVersion", sourceOssVersion());
+ jsonWriter.writeStringField("sourceClusterVersion", sourceClusterVersion());
+ jsonWriter.writeStringField("sourceBuildNumber", sourceBuildNumber());
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("severity", severity() == null ? null : severity().toString());
+ jsonWriter.writeStringField("extendedProperties", extendedProperties());
+ jsonWriter.writeStringField("createdTime",
+ createdTime() == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(createdTime()));
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAvailableUpgradePatchVersionUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAvailableUpgradePatchVersionUpgradeProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterAvailableUpgradePatchVersionUpgradeProperties.
+ */
+ public static ClusterAvailableUpgradePatchVersionUpgradeProperties fromJson(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAvailableUpgradePatchVersionUpgradeProperties deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ = new ClusterAvailableUpgradePatchVersionUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("description".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withDescription(reader.getString());
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withSourceOssVersion(reader.getString());
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withSourceClusterVersion(reader.getString());
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withSourceBuildNumber(reader.getString());
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withTargetOssVersion(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withTargetClusterVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withComponentName(reader.getString());
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withSeverity(Severity.fromString(reader.getString()));
+ } else if ("extendedProperties".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties
+ .withExtendedProperties(reader.getString());
+ } else if ("createdTime".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties.withCreatedTime(reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterAvailableUpgradePatchVersionUpgradeProperties.upgradeType
+ = ClusterAvailableUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAvailableUpgradePatchVersionUpgradeProperties;
+ });
+ }
+}
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
index d126e7b8e73e6..4b0031dcb5044 100644
--- 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
@@ -5,30 +5,38 @@
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;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+public class ClusterAvailableUpgradeProperties implements JsonSerializable {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterAvailableUpgradeType upgradeType
+ = ClusterAvailableUpgradeType.fromString("ClusterAvailableUpgradeProperties");
+
/**
* Creates an instance of ClusterAvailableUpgradeProperties class.
*/
public ClusterAvailableUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ public ClusterAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Validates the instance.
*
@@ -36,4 +44,73 @@ public ClusterAvailableUpgradeProperties() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterAvailableUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterAvailableUpgradeProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterAvailableUpgradeProperties.
+ */
+ public static ClusterAvailableUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("upgradeType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("AKSPatchUpgrade".equals(discriminatorValue)) {
+ return ClusterAvailableUpgradeAksPatchUpgradeProperties.fromJson(readerToUse.reset());
+ } else if ("ClusterAvailableInPlaceUpgradeProperties".equals(discriminatorValue)) {
+ return ClusterAvailableInPlaceUpgradeProperties.fromJsonKnownDiscriminator(readerToUse.reset());
+ } else if ("HotfixUpgrade".equals(discriminatorValue)) {
+ return ClusterAvailableUpgradeHotfixUpgradeProperties.fromJson(readerToUse.reset());
+ } else if ("PatchVersionUpgrade".equals(discriminatorValue)) {
+ return ClusterAvailableUpgradePatchVersionUpgradeProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterAvailableUpgradeProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterAvailableUpgradeProperties deserializedClusterAvailableUpgradeProperties
+ = new ClusterAvailableUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterAvailableUpgradeProperties.upgradeType
+ = ClusterAvailableUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterAvailableUpgradeProperties;
+ });
+ }
}
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
index cbaa69f834482..d60deaf81ae70 100644
--- 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -22,6 +21,11 @@ public final class ClusterAvailableUpgradeType extends ExpandableStringEnum {
/*
* The name property.
*/
- @JsonProperty(value = "name")
private String name;
/*
* The version property.
*/
- @JsonProperty(value = "version")
private String version;
/**
@@ -77,4 +79,43 @@ public ClusterComponentsItem withVersion(String version) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeStringField("version", this.version);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterComponentsItem from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterComponentsItem if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterComponentsItem.
+ */
+ public static ClusterComponentsItem fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterComponentsItem deserializedClusterComponentsItem = new ClusterComponentsItem();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedClusterComponentsItem.name = reader.getString();
+ } else if ("version".equals(fieldName)) {
+ deserializedClusterComponentsItem.version = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterComponentsItem;
+ });
+ }
}
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 d0d6004a72700..bd2e69c00bc17 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
@@ -6,46 +6,43 @@
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.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.Map;
/**
* Cluster configuration files.
*/
@Fluent
-public final class ClusterConfigFile {
+public final class ClusterConfigFile implements JsonSerializable {
/*
* Configuration file name.
*/
- @JsonProperty(value = "fileName", required = true)
private String fileName;
/*
* Free form content of the entire configuration file.
*/
- @JsonProperty(value = "content")
private String content;
/*
* 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.
*/
- @JsonProperty(value = "encoding")
private ContentEncoding encoding;
/*
* Path of the config file if content is specified.
*/
- @JsonProperty(value = "path")
private String path;
/*
* List of key value pairs
* where key represents a valid service configuration name and value represents the value of the config.
*/
- @JsonProperty(value = "values")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map values;
/**
@@ -165,10 +162,60 @@ public ClusterConfigFile withValues(Map values) {
*/
public void validate() {
if (fileName() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property fileName in model ClusterConfigFile"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property fileName in model ClusterConfigFile"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterConfigFile.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("fileName", this.fileName);
+ jsonWriter.writeStringField("content", this.content);
+ jsonWriter.writeStringField("encoding", this.encoding == null ? null : this.encoding.toString());
+ jsonWriter.writeStringField("path", this.path);
+ jsonWriter.writeMapField("values", this.values, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterConfigFile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterConfigFile if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterConfigFile.
+ */
+ public static ClusterConfigFile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterConfigFile deserializedClusterConfigFile = new ClusterConfigFile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("fileName".equals(fieldName)) {
+ deserializedClusterConfigFile.fileName = reader.getString();
+ } else if ("content".equals(fieldName)) {
+ deserializedClusterConfigFile.content = reader.getString();
+ } else if ("encoding".equals(fieldName)) {
+ deserializedClusterConfigFile.encoding = ContentEncoding.fromString(reader.getString());
+ } else if ("path".equals(fieldName)) {
+ deserializedClusterConfigFile.path = reader.getString();
+ } else if ("values".equals(fieldName)) {
+ Map values = reader.readMap(reader1 -> reader1.getString());
+ deserializedClusterConfigFile.values = values;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterConfigFile;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..bedf2e9f0fff2
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeHistoryProperties.java
@@ -0,0 +1,210 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster hotfix upgrade history properties.
+ */
+@Fluent
+public final class ClusterHotfixUpgradeHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeHistoryType upgradeType = ClusterUpgradeHistoryType.HOTFIX_UPGRADE;
+
+ /**
+ * Creates an instance of ClusterHotfixUpgradeHistoryProperties class.
+ */
+ public ClusterHotfixUpgradeHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withSourceClusterVersion(String sourceClusterVersion) {
+ super.withSourceClusterVersion(sourceClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withSourceOssVersion(String sourceOssVersion) {
+ super.withSourceOssVersion(sourceOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withSourceBuildNumber(String sourceBuildNumber) {
+ super.withSourceBuildNumber(sourceBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withTargetClusterVersion(String targetClusterVersion) {
+ super.withTargetClusterVersion(targetClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withTargetOssVersion(String targetOssVersion) {
+ super.withTargetOssVersion(targetOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withTargetBuildNumber(String targetBuildNumber) {
+ super.withTargetBuildNumber(targetBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withComponentName(String componentName) {
+ super.withComponentName(componentName);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withSeverity(ClusterUpgradeHistorySeverityType severity) {
+ super.withSeverity(severity);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeHistoryProperties
+ withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("sourceClusterVersion", sourceClusterVersion());
+ jsonWriter.writeStringField("sourceOssVersion", sourceOssVersion());
+ jsonWriter.writeStringField("sourceBuildNumber", sourceBuildNumber());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("severity", severity() == null ? null : severity().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterHotfixUpgradeHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterHotfixUpgradeHistoryProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterHotfixUpgradeHistoryProperties.
+ */
+ public static ClusterHotfixUpgradeHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterHotfixUpgradeHistoryProperties deserializedClusterHotfixUpgradeHistoryProperties
+ = new ClusterHotfixUpgradeHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties
+ .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withSourceClusterVersion(reader.getString());
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withSourceOssVersion(reader.getString());
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withSourceBuildNumber(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withTargetClusterVersion(reader.getString());
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withTargetOssVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.withComponentName(reader.getString());
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties
+ .withSeverity(ClusterUpgradeHistorySeverityType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeHistoryProperties.upgradeType
+ = ClusterUpgradeHistoryType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterHotfixUpgradeHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java
index 6dcf376e63ffb..bf40ad5b66f13 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeProperties.java
@@ -5,40 +5,20 @@
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 com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+public final class ClusterHotfixUpgradeProperties extends ClusterInPlaceUpgradeProperties {
/*
- * Target OSS version of component to be upgraded.
+ * Type of upgrade.
*/
- @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;
+ private ClusterUpgradeType upgradeType = ClusterUpgradeType.HOTFIX_UPGRADE;
/**
* Creates an instance of ClusterHotfixUpgradeProperties class.
@@ -47,92 +27,108 @@ public ClusterHotfixUpgradeProperties() {
}
/**
- * Get the targetOssVersion property: Target OSS version of component to be upgraded.
+ * Get the upgradeType property: Type of upgrade.
*
- * @return the targetOssVersion value.
+ * @return the upgradeType value.
*/
- public String targetOssVersion() {
- return this.targetOssVersion;
+ @Override
+ public ClusterUpgradeType upgradeType() {
+ return this.upgradeType;
}
/**
- * Set the targetOssVersion property: Target OSS version of component to be upgraded.
- *
- * @param targetOssVersion the targetOssVersion value to set.
- * @return the ClusterHotfixUpgradeProperties object itself.
+ * {@inheritDoc}
*/
+ @Override
public ClusterHotfixUpgradeProperties withTargetOssVersion(String targetOssVersion) {
- this.targetOssVersion = targetOssVersion;
+ super.withTargetOssVersion(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.
+ * {@inheritDoc}
*/
+ @Override
public ClusterHotfixUpgradeProperties withTargetClusterVersion(String targetClusterVersion) {
- this.targetClusterVersion = targetClusterVersion;
+ super.withTargetClusterVersion(targetClusterVersion);
return this;
}
/**
- * Get the targetBuildNumber property: Target build number of component to be upgraded.
- *
- * @return the targetBuildNumber value.
+ * {@inheritDoc}
*/
- public String targetBuildNumber() {
- return this.targetBuildNumber;
+ @Override
+ public ClusterHotfixUpgradeProperties withTargetBuildNumber(String targetBuildNumber) {
+ super.withTargetBuildNumber(targetBuildNumber);
+ return this;
}
/**
- * Set the targetBuildNumber property: Target build number of component to be upgraded.
- *
- * @param targetBuildNumber the targetBuildNumber value to set.
- * @return the ClusterHotfixUpgradeProperties object itself.
+ * {@inheritDoc}
*/
- public ClusterHotfixUpgradeProperties withTargetBuildNumber(String targetBuildNumber) {
- this.targetBuildNumber = targetBuildNumber;
+ @Override
+ public ClusterHotfixUpgradeProperties withComponentName(String componentName) {
+ super.withComponentName(componentName);
return this;
}
/**
- * Get the componentName property: Name of component to be upgraded.
+ * Validates the instance.
*
- * @return the componentName value.
+ * @throws IllegalArgumentException thrown if the instance is not valid.
*/
- public String componentName() {
- return this.componentName;
+ @Override
+ public void validate() {
+ super.validate();
}
/**
- * Set the componentName property: Name of component to be upgraded.
- *
- * @param componentName the componentName value to set.
- * @return the ClusterHotfixUpgradeProperties object itself.
+ * {@inheritDoc}
*/
- public ClusterHotfixUpgradeProperties withComponentName(String componentName) {
- this.componentName = componentName;
- return this;
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
}
/**
- * Validates the instance.
+ * Reads an instance of ClusterHotfixUpgradeProperties from the JsonReader.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterHotfixUpgradeProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterHotfixUpgradeProperties.
*/
- @Override
- public void validate() {
- super.validate();
+ public static ClusterHotfixUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterHotfixUpgradeProperties deserializedClusterHotfixUpgradeProperties
+ = new ClusterHotfixUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeProperties.withTargetOssVersion(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeProperties.withTargetClusterVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeProperties.withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeProperties.withComponentName(reader.getString());
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeProperties.upgradeType
+ = ClusterUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterHotfixUpgradeProperties;
+ });
}
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java
new file mode 100644
index 0000000000000..4fb5702805e7a
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterHotfixUpgradeRollbackHistoryProperties.java
@@ -0,0 +1,212 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster hotfix upgrade rollback history properties.
+ */
+@Fluent
+public final class ClusterHotfixUpgradeRollbackHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeHistoryType upgradeType = ClusterUpgradeHistoryType.HOTFIX_UPGRADE_ROLLBACK;
+
+ /**
+ * Creates an instance of ClusterHotfixUpgradeRollbackHistoryProperties class.
+ */
+ public ClusterHotfixUpgradeRollbackHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withSourceClusterVersion(String sourceClusterVersion) {
+ super.withSourceClusterVersion(sourceClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withSourceOssVersion(String sourceOssVersion) {
+ super.withSourceOssVersion(sourceOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withSourceBuildNumber(String sourceBuildNumber) {
+ super.withSourceBuildNumber(sourceBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withTargetClusterVersion(String targetClusterVersion) {
+ super.withTargetClusterVersion(targetClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withTargetOssVersion(String targetOssVersion) {
+ super.withTargetOssVersion(targetOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withTargetBuildNumber(String targetBuildNumber) {
+ super.withTargetBuildNumber(targetBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withComponentName(String componentName) {
+ super.withComponentName(componentName);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withSeverity(ClusterUpgradeHistorySeverityType severity) {
+ super.withSeverity(severity);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterHotfixUpgradeRollbackHistoryProperties
+ withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("sourceClusterVersion", sourceClusterVersion());
+ jsonWriter.writeStringField("sourceOssVersion", sourceOssVersion());
+ jsonWriter.writeStringField("sourceBuildNumber", sourceBuildNumber());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("severity", severity() == null ? null : severity().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterHotfixUpgradeRollbackHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterHotfixUpgradeRollbackHistoryProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterHotfixUpgradeRollbackHistoryProperties.
+ */
+ public static ClusterHotfixUpgradeRollbackHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterHotfixUpgradeRollbackHistoryProperties deserializedClusterHotfixUpgradeRollbackHistoryProperties
+ = new ClusterHotfixUpgradeRollbackHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties
+ .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties
+ .withSourceClusterVersion(reader.getString());
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties.withSourceOssVersion(reader.getString());
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties.withSourceBuildNumber(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties
+ .withTargetClusterVersion(reader.getString());
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties.withTargetOssVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties.withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties.withComponentName(reader.getString());
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties
+ .withSeverity(ClusterUpgradeHistorySeverityType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterHotfixUpgradeRollbackHistoryProperties.upgradeType
+ = ClusterUpgradeHistoryType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterHotfixUpgradeRollbackHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..84b8a8e65c985
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeHistoryProperties.java
@@ -0,0 +1,370 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster in-place upgrade history properties.
+ */
+@Fluent
+public class ClusterInPlaceUpgradeHistoryProperties extends ClusterUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeHistoryType upgradeType
+ = ClusterUpgradeHistoryType.fromString("ClusterInPlaceUpgradeHistoryProperties");
+
+ /*
+ * Version with three part.
+ */
+ private String sourceClusterVersion;
+
+ /*
+ * Version with three part.
+ */
+ private String sourceOssVersion;
+
+ /*
+ * Source build number.
+ */
+ private String sourceBuildNumber;
+
+ /*
+ * Version with three part.
+ */
+ private String targetClusterVersion;
+
+ /*
+ * Version with three part.
+ */
+ private String targetOssVersion;
+
+ /*
+ * Target build number.
+ */
+ private String targetBuildNumber;
+
+ /*
+ * Component name to upgrade.
+ */
+ private String componentName;
+
+ /*
+ * Severity of this upgrade.
+ */
+ private ClusterUpgradeHistorySeverityType severity;
+
+ /**
+ * Creates an instance of ClusterInPlaceUpgradeHistoryProperties class.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * Get the sourceClusterVersion property: Version with three part.
+ *
+ * @return the sourceClusterVersion value.
+ */
+ public String sourceClusterVersion() {
+ return this.sourceClusterVersion;
+ }
+
+ /**
+ * Set the sourceClusterVersion property: Version with three part.
+ *
+ * @param sourceClusterVersion the sourceClusterVersion value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withSourceClusterVersion(String sourceClusterVersion) {
+ this.sourceClusterVersion = sourceClusterVersion;
+ return this;
+ }
+
+ /**
+ * Get the sourceOssVersion property: Version with three part.
+ *
+ * @return the sourceOssVersion value.
+ */
+ public String sourceOssVersion() {
+ return this.sourceOssVersion;
+ }
+
+ /**
+ * Set the sourceOssVersion property: Version with three part.
+ *
+ * @param sourceOssVersion the sourceOssVersion value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withSourceOssVersion(String sourceOssVersion) {
+ this.sourceOssVersion = sourceOssVersion;
+ return this;
+ }
+
+ /**
+ * Get the sourceBuildNumber property: Source build number.
+ *
+ * @return the sourceBuildNumber value.
+ */
+ public String sourceBuildNumber() {
+ return this.sourceBuildNumber;
+ }
+
+ /**
+ * Set the sourceBuildNumber property: Source build number.
+ *
+ * @param sourceBuildNumber the sourceBuildNumber value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withSourceBuildNumber(String sourceBuildNumber) {
+ this.sourceBuildNumber = sourceBuildNumber;
+ return this;
+ }
+
+ /**
+ * Get the targetClusterVersion property: Version with three part.
+ *
+ * @return the targetClusterVersion value.
+ */
+ public String targetClusterVersion() {
+ return this.targetClusterVersion;
+ }
+
+ /**
+ * Set the targetClusterVersion property: Version with three part.
+ *
+ * @param targetClusterVersion the targetClusterVersion value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withTargetClusterVersion(String targetClusterVersion) {
+ this.targetClusterVersion = targetClusterVersion;
+ return this;
+ }
+
+ /**
+ * Get the targetOssVersion property: Version with three part.
+ *
+ * @return the targetOssVersion value.
+ */
+ public String targetOssVersion() {
+ return this.targetOssVersion;
+ }
+
+ /**
+ * Set the targetOssVersion property: Version with three part.
+ *
+ * @param targetOssVersion the targetOssVersion value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withTargetOssVersion(String targetOssVersion) {
+ this.targetOssVersion = targetOssVersion;
+ return this;
+ }
+
+ /**
+ * Get the targetBuildNumber property: Target build number.
+ *
+ * @return the targetBuildNumber value.
+ */
+ public String targetBuildNumber() {
+ return this.targetBuildNumber;
+ }
+
+ /**
+ * Set the targetBuildNumber property: Target build number.
+ *
+ * @param targetBuildNumber the targetBuildNumber value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withTargetBuildNumber(String targetBuildNumber) {
+ this.targetBuildNumber = targetBuildNumber;
+ return this;
+ }
+
+ /**
+ * Get the componentName property: Component name to upgrade.
+ *
+ * @return the componentName value.
+ */
+ public String componentName() {
+ return this.componentName;
+ }
+
+ /**
+ * Set the componentName property: Component name to upgrade.
+ *
+ * @param componentName the componentName value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withComponentName(String componentName) {
+ this.componentName = componentName;
+ return this;
+ }
+
+ /**
+ * Get the severity property: Severity of this upgrade.
+ *
+ * @return the severity value.
+ */
+ public ClusterUpgradeHistorySeverityType severity() {
+ return this.severity;
+ }
+
+ /**
+ * Set the severity property: Severity of this upgrade.
+ *
+ * @param severity the severity value to set.
+ * @return the ClusterInPlaceUpgradeHistoryProperties object itself.
+ */
+ public ClusterInPlaceUpgradeHistoryProperties withSeverity(ClusterUpgradeHistorySeverityType severity) {
+ this.severity = severity;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterInPlaceUpgradeHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterInPlaceUpgradeHistoryProperties
+ withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("sourceClusterVersion", this.sourceClusterVersion);
+ jsonWriter.writeStringField("sourceOssVersion", this.sourceOssVersion);
+ jsonWriter.writeStringField("sourceBuildNumber", this.sourceBuildNumber);
+ jsonWriter.writeStringField("targetClusterVersion", this.targetClusterVersion);
+ jsonWriter.writeStringField("targetOssVersion", this.targetOssVersion);
+ jsonWriter.writeStringField("targetBuildNumber", this.targetBuildNumber);
+ jsonWriter.writeStringField("componentName", this.componentName);
+ jsonWriter.writeStringField("severity", this.severity == null ? null : this.severity.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInPlaceUpgradeHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInPlaceUpgradeHistoryProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterInPlaceUpgradeHistoryProperties.
+ */
+ public static ClusterInPlaceUpgradeHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("upgradeType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("HotfixUpgrade".equals(discriminatorValue)) {
+ return ClusterHotfixUpgradeHistoryProperties.fromJson(readerToUse.reset());
+ } else if ("HotfixUpgradeRollback".equals(discriminatorValue)) {
+ return ClusterHotfixUpgradeRollbackHistoryProperties.fromJson(readerToUse.reset());
+ } else if ("PatchVersionUpgrade".equals(discriminatorValue)) {
+ return ClusterPatchVersionUpgradeHistoryProperties.fromJson(readerToUse.reset());
+ } else if ("PatchVersionUpgradeRollback".equals(discriminatorValue)) {
+ return ClusterPatchVersionUpgradeRollbackHistoryProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterInPlaceUpgradeHistoryProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInPlaceUpgradeHistoryProperties deserializedClusterInPlaceUpgradeHistoryProperties
+ = new ClusterInPlaceUpgradeHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties
+ .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.upgradeType
+ = ClusterUpgradeHistoryType.fromString(reader.getString());
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.sourceClusterVersion = reader.getString();
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.sourceOssVersion = reader.getString();
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.sourceBuildNumber = reader.getString();
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.targetClusterVersion = reader.getString();
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.targetOssVersion = reader.getString();
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.targetBuildNumber = reader.getString();
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.componentName = reader.getString();
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeHistoryProperties.severity
+ = ClusterUpgradeHistorySeverityType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInPlaceUpgradeHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java
new file mode 100644
index 0000000000000..b6bcd707bae2e
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInPlaceUpgradeProperties.java
@@ -0,0 +1,225 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Properties of in-place upgrading cluster.
+ */
+@Fluent
+public class ClusterInPlaceUpgradeProperties extends ClusterUpgradeProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeType upgradeType = ClusterUpgradeType.fromString("ClusterInPlaceUpgradeProperties");
+
+ /*
+ * Target OSS version of component to be upgraded.
+ */
+ private String targetOssVersion;
+
+ /*
+ * Target cluster version of component to be upgraded.
+ */
+ private String targetClusterVersion;
+
+ /*
+ * Target build number of component to be upgraded.
+ */
+ private String targetBuildNumber;
+
+ /*
+ * Name of component to be upgraded.
+ */
+ private String componentName;
+
+ /**
+ * Creates an instance of ClusterInPlaceUpgradeProperties class.
+ */
+ public ClusterInPlaceUpgradeProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * 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 ClusterInPlaceUpgradeProperties object itself.
+ */
+ public ClusterInPlaceUpgradeProperties 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 ClusterInPlaceUpgradeProperties object itself.
+ */
+ public ClusterInPlaceUpgradeProperties 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 ClusterInPlaceUpgradeProperties object itself.
+ */
+ public ClusterInPlaceUpgradeProperties 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 ClusterInPlaceUpgradeProperties object itself.
+ */
+ public ClusterInPlaceUpgradeProperties 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();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("targetOssVersion", this.targetOssVersion);
+ jsonWriter.writeStringField("targetClusterVersion", this.targetClusterVersion);
+ jsonWriter.writeStringField("targetBuildNumber", this.targetBuildNumber);
+ jsonWriter.writeStringField("componentName", this.componentName);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInPlaceUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInPlaceUpgradeProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterInPlaceUpgradeProperties.
+ */
+ public static ClusterInPlaceUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("upgradeType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("HotfixUpgrade".equals(discriminatorValue)) {
+ return ClusterHotfixUpgradeProperties.fromJson(readerToUse.reset());
+ } else if ("PatchVersionUpgrade".equals(discriminatorValue)) {
+ return ClusterPatchVersionUpgradeProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterInPlaceUpgradeProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInPlaceUpgradeProperties deserializedClusterInPlaceUpgradeProperties
+ = new ClusterInPlaceUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeProperties.upgradeType
+ = ClusterUpgradeType.fromString(reader.getString());
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeProperties.targetOssVersion = reader.getString();
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeProperties.targetClusterVersion = reader.getString();
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeProperties.targetBuildNumber = reader.getString();
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterInPlaceUpgradeProperties.componentName = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInPlaceUpgradeProperties;
+ });
+ }
+}
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 1186c891edbd7..d26021084905e 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
@@ -6,24 +6,26 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Cluster Instance View Properties.
*/
@Fluent
-public class ClusterInstanceViewProperties {
+public class ClusterInstanceViewProperties implements JsonSerializable {
/*
* Status of the instance view.
*/
- @JsonProperty(value = "status", required = true)
private ClusterInstanceViewPropertiesStatus status;
/*
* 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;
/**
@@ -53,8 +55,8 @@ 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.
*/
@@ -63,8 +65,8 @@ 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.
@@ -81,18 +83,64 @@ public ClusterInstanceViewProperties withServiceStatuses(List ser
*/
public void validate() {
if (status() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property status in model ClusterInstanceViewProperties"));
+ throw LOGGER.atError()
+ .log(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.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property serviceStatuses in model ClusterInstanceViewProperties"));
} else {
serviceStatuses().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterInstanceViewProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("status", this.status);
+ jsonWriter.writeArrayField("serviceStatuses", this.serviceStatuses,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInstanceViewProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInstanceViewProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterInstanceViewProperties.
+ */
+ public static ClusterInstanceViewProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInstanceViewProperties deserializedClusterInstanceViewProperties
+ = new ClusterInstanceViewProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedClusterInstanceViewProperties.status
+ = ClusterInstanceViewPropertiesStatus.fromJson(reader);
+ } else if ("serviceStatuses".equals(fieldName)) {
+ List serviceStatuses = reader.readArray(reader1 -> ServiceStatus.fromJson(reader1));
+ deserializedClusterInstanceViewProperties.serviceStatuses = serviceStatuses;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInstanceViewProperties;
+ });
+ }
}
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 d428f22dde121..14a8134d533be 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewPropertiesStatus.java
@@ -5,6 +5,10 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Status of the instance view.
@@ -53,4 +57,48 @@ public ClusterInstanceViewPropertiesStatus withMessage(String message) {
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("ready", ready());
+ jsonWriter.writeStringField("reason", reason());
+ jsonWriter.writeStringField("message", message());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInstanceViewPropertiesStatus from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInstanceViewPropertiesStatus if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterInstanceViewPropertiesStatus.
+ */
+ public static ClusterInstanceViewPropertiesStatus fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInstanceViewPropertiesStatus deserializedClusterInstanceViewPropertiesStatus
+ = new ClusterInstanceViewPropertiesStatus();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("ready".equals(fieldName)) {
+ deserializedClusterInstanceViewPropertiesStatus.withReady(reader.getString());
+ } else if ("reason".equals(fieldName)) {
+ deserializedClusterInstanceViewPropertiesStatus.withReason(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedClusterInstanceViewPropertiesStatus.withMessage(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInstanceViewPropertiesStatus;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java
index 58bb5a3e2feca..d7961fddea6ea 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterInstanceViewResultProperties.java
@@ -5,6 +5,10 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
@@ -45,4 +49,48 @@ public ClusterInstanceViewResultProperties withServiceStatuses(List writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInstanceViewResultProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInstanceViewResultProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterInstanceViewResultProperties.
+ */
+ public static ClusterInstanceViewResultProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInstanceViewResultProperties deserializedClusterInstanceViewResultProperties
+ = new ClusterInstanceViewResultProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("status".equals(fieldName)) {
+ deserializedClusterInstanceViewResultProperties
+ .withStatus(ClusterInstanceViewPropertiesStatus.fromJson(reader));
+ } else if ("serviceStatuses".equals(fieldName)) {
+ List serviceStatuses = reader.readArray(reader1 -> ServiceStatus.fromJson(reader1));
+ deserializedClusterInstanceViewResultProperties.withServiceStatuses(serviceStatuses);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInstanceViewResultProperties;
+ });
+ }
}
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 84b84efd45a58..11357d15fd7c6 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
@@ -6,29 +6,30 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Status of the instance view.
*/
@Fluent
-public class ClusterInstanceViewStatus {
+public class ClusterInstanceViewStatus implements JsonSerializable {
/*
* The cluster ready status
*/
- @JsonProperty(value = "ready", required = true)
private String ready;
/*
* The status reason.
*/
- @JsonProperty(value = "reason")
private String reason;
/*
* The additional message.
*/
- @JsonProperty(value = "message")
private String message;
/**
@@ -104,10 +105,54 @@ public ClusterInstanceViewStatus withMessage(String message) {
*/
public void validate() {
if (ready() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property ready in model ClusterInstanceViewStatus"));
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property ready in model ClusterInstanceViewStatus"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterInstanceViewStatus.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("ready", this.ready);
+ jsonWriter.writeStringField("reason", this.reason);
+ jsonWriter.writeStringField("message", this.message);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInstanceViewStatus from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInstanceViewStatus if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterInstanceViewStatus.
+ */
+ public static ClusterInstanceViewStatus fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInstanceViewStatus deserializedClusterInstanceViewStatus = new ClusterInstanceViewStatus();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("ready".equals(fieldName)) {
+ deserializedClusterInstanceViewStatus.ready = reader.getString();
+ } else if ("reason".equals(fieldName)) {
+ deserializedClusterInstanceViewStatus.reason = reader.getString();
+ } else if ("message".equals(fieldName)) {
+ deserializedClusterInstanceViewStatus.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInstanceViewStatus;
+ });
+ }
}
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 02f0bd9d0a29e..af7bb24663686 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
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInstanceViewResultInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* The instance view of a HDInsight Cluster.
*/
@Fluent
-public final class ClusterInstanceViewsResult {
+public final class ClusterInstanceViewsResult implements JsonSerializable {
/*
* Cluster instance view array.
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link (url) to the next page of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -71,4 +73,44 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterInstanceViewsResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterInstanceViewsResult if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterInstanceViewsResult.
+ */
+ public static ClusterInstanceViewsResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterInstanceViewsResult deserializedClusterInstanceViewsResult = new ClusterInstanceViewsResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ClusterInstanceViewResultInner.fromJson(reader1));
+ deserializedClusterInstanceViewsResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterInstanceViewsResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterInstanceViewsResult;
+ });
+ }
}
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 92e54a186eb69..b67d80a74c2ef 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
@@ -6,25 +6,27 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterJobInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* Collection of cluster job.
*/
@Fluent
-public final class ClusterJobList {
+public final class ClusterJobList implements JsonSerializable {
/*
* Collection of cluster job.
*/
- @JsonProperty(value = "value", required = true)
private List value;
/*
* The Url of next result page.
*/
- @JsonProperty(value = "nextLink")
private String nextLink;
/**
@@ -80,12 +82,53 @@ public ClusterJobList withNextLink(String nextLink) {
*/
public void validate() {
if (value() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property value in model ClusterJobList"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model ClusterJobList"));
} else {
value().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterJobList.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterJobList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterJobList if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterJobList.
+ */
+ public static ClusterJobList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterJobList deserializedClusterJobList = new ClusterJobList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ClusterJobInner.fromJson(reader1));
+ deserializedClusterJobList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterJobList.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterJobList;
+ });
+ }
}
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 b61a2f37a0227..b3bc1c50e0ffc 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
@@ -5,28 +5,37 @@
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;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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) })
@Immutable
-public class ClusterJobProperties {
+public class ClusterJobProperties implements JsonSerializable {
+ /*
+ * Type of cluster job.
+ */
+ private JobType jobType = JobType.fromString("ClusterJobProperties");
+
/**
* Creates an instance of ClusterJobProperties class.
*/
public ClusterJobProperties() {
}
+ /**
+ * Get the jobType property: Type of cluster job.
+ *
+ * @return the jobType value.
+ */
+ public JobType jobType() {
+ return this.jobType;
+ }
+
/**
* Validates the instance.
*
@@ -34,4 +43,65 @@ public ClusterJobProperties() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("jobType", this.jobType == null ? null : this.jobType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterJobProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterJobProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterJobProperties.
+ */
+ public static ClusterJobProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("jobType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("FlinkJob".equals(discriminatorValue)) {
+ return FlinkJobProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterJobProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterJobProperties deserializedClusterJobProperties = new ClusterJobProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("jobType".equals(fieldName)) {
+ deserializedClusterJobProperties.jobType = JobType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterJobProperties;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraries.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraries.java
new file mode 100644
index 0000000000000..3fc4251f73723
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraries.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.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of ClusterLibraries.
+ */
+public interface ClusterLibraries {
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category);
+
+ /**
+ * Get all libraries 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 category The system query option to filter libraries returned in the response. Allowed value is 'custom'
+ * or 'predefined'.
+ * @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 all libraries of HDInsight on AKS cluster as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName,
+ Category category, Context context);
+
+ /**
+ * Library management operations on 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 operation The library management 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.
+ */
+ void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation);
+
+ /**
+ * Library management operations on 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 operation The library management operation.
+ * @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.
+ */
+ void manageLibraries(String resourceGroupName, String clusterPoolName, String clusterName,
+ ClusterLibraryManagementOperation operation, Context context);
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibrary.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibrary.java
new file mode 100644
index 0000000000000..683849bc3ddce
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibrary.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.ClusterLibraryInner;
+
+/**
+ * An immutable client-side representation of ClusterLibrary.
+ */
+public interface ClusterLibrary {
+ /**
+ * 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 a library in the cluster.
+ *
+ * @return the properties value.
+ */
+ ClusterLibraryProperties 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.ClusterLibraryInner object.
+ *
+ * @return the inner object.
+ */
+ ClusterLibraryInner innerModel();
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryList.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryList.java
new file mode 100644
index 0000000000000..0c8085a26a7e1
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryList.java
@@ -0,0 +1,123 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Collection of libraries in the cluster.
+ */
+@Fluent
+public final class ClusterLibraryList implements JsonSerializable {
+ /*
+ * Collection of libraries in the cluster.
+ */
+ private List value;
+
+ /*
+ * The url of next result page.
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of ClusterLibraryList class.
+ */
+ public ClusterLibraryList() {
+ }
+
+ /**
+ * Get the value property: Collection of libraries in the cluster.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Collection of libraries in the cluster.
+ *
+ * @param value the value value to set.
+ * @return the ClusterLibraryList object itself.
+ */
+ public ClusterLibraryList 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model ClusterLibraryList"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterLibraryList.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterLibraryList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterLibraryList if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterLibraryList.
+ */
+ public static ClusterLibraryList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterLibraryList deserializedClusterLibraryList = new ClusterLibraryList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ClusterLibraryInner.fromJson(reader1));
+ deserializedClusterLibraryList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterLibraryList.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterLibraryList;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java
new file mode 100644
index 0000000000000..d79c08eeebb0f
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperation.java
@@ -0,0 +1,174 @@
+// Copyright (c) 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.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Library management operation.
+ */
+@Fluent
+public final class ClusterLibraryManagementOperation extends ProxyResource {
+ /*
+ * Properties of a library management operation.
+ */
+ private ClusterLibraryManagementOperationProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /**
+ * Creates an instance of ClusterLibraryManagementOperation class.
+ */
+ public ClusterLibraryManagementOperation() {
+ }
+
+ /**
+ * Get the properties property: Properties of a library management operation.
+ *
+ * @return the properties value.
+ */
+ public ClusterLibraryManagementOperationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of a library management operation.
+ *
+ * @param properties the properties value to set.
+ * @return the ClusterLibraryManagementOperation object itself.
+ */
+ public ClusterLibraryManagementOperation withProperties(ClusterLibraryManagementOperationProperties 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;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property properties in model ClusterLibraryManagementOperation"));
+ } else {
+ properties().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterLibraryManagementOperation.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterLibraryManagementOperation from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterLibraryManagementOperation if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterLibraryManagementOperation.
+ */
+ public static ClusterLibraryManagementOperation fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterLibraryManagementOperation deserializedClusterLibraryManagementOperation
+ = new ClusterLibraryManagementOperation();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterLibraryManagementOperation.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterLibraryManagementOperation.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterLibraryManagementOperation.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterLibraryManagementOperation.properties
+ = ClusterLibraryManagementOperationProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterLibraryManagementOperation.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterLibraryManagementOperation;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperationProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperationProperties.java
new file mode 100644
index 0000000000000..c7cba709db00c
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryManagementOperationProperties.java
@@ -0,0 +1,144 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterLibraryInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Properties of a library management operation.
+ */
+@Fluent
+public final class ClusterLibraryManagementOperationProperties
+ implements JsonSerializable {
+ /*
+ * The library management action.
+ */
+ private LibraryManagementAction action;
+
+ /*
+ * The libraries to be installed/updated/uninstalled.
+ */
+ private List libraries;
+
+ /**
+ * Creates an instance of ClusterLibraryManagementOperationProperties class.
+ */
+ public ClusterLibraryManagementOperationProperties() {
+ }
+
+ /**
+ * Get the action property: The library management action.
+ *
+ * @return the action value.
+ */
+ public LibraryManagementAction action() {
+ return this.action;
+ }
+
+ /**
+ * Set the action property: The library management action.
+ *
+ * @param action the action value to set.
+ * @return the ClusterLibraryManagementOperationProperties object itself.
+ */
+ public ClusterLibraryManagementOperationProperties withAction(LibraryManagementAction action) {
+ this.action = action;
+ return this;
+ }
+
+ /**
+ * Get the libraries property: The libraries to be installed/updated/uninstalled.
+ *
+ * @return the libraries value.
+ */
+ public List libraries() {
+ return this.libraries;
+ }
+
+ /**
+ * Set the libraries property: The libraries to be installed/updated/uninstalled.
+ *
+ * @param libraries the libraries value to set.
+ * @return the ClusterLibraryManagementOperationProperties object itself.
+ */
+ public ClusterLibraryManagementOperationProperties withLibraries(List libraries) {
+ this.libraries = libraries;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (action() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property action in model ClusterLibraryManagementOperationProperties"));
+ }
+ if (libraries() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property libraries in model ClusterLibraryManagementOperationProperties"));
+ } else {
+ libraries().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterLibraryManagementOperationProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString());
+ jsonWriter.writeArrayField("libraries", this.libraries, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterLibraryManagementOperationProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterLibraryManagementOperationProperties if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterLibraryManagementOperationProperties.
+ */
+ public static ClusterLibraryManagementOperationProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterLibraryManagementOperationProperties deserializedClusterLibraryManagementOperationProperties
+ = new ClusterLibraryManagementOperationProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("action".equals(fieldName)) {
+ deserializedClusterLibraryManagementOperationProperties.action
+ = LibraryManagementAction.fromString(reader.getString());
+ } else if ("libraries".equals(fieldName)) {
+ List libraries
+ = reader.readArray(reader1 -> ClusterLibraryInner.fromJson(reader1));
+ deserializedClusterLibraryManagementOperationProperties.libraries = libraries;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterLibraryManagementOperationProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryProperties.java
new file mode 100644
index 0000000000000..d3d35a5b77262
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterLibraryProperties.java
@@ -0,0 +1,221 @@
+// Copyright (c) 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.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+
+/**
+ * Properties of a library in the cluster.
+ */
+@Fluent
+public class ClusterLibraryProperties implements JsonSerializable {
+ /*
+ * Type of the library.
+ */
+ private Type type = Type.fromString("ClusterLibraryProperties");
+
+ /*
+ * Remark of the latest library management operation.
+ */
+ private String remarks;
+
+ /*
+ * Timestamp of the latest library management operation.
+ */
+ private OffsetDateTime timestamp;
+
+ /*
+ * Status of the library.
+ */
+ private Status status;
+
+ /*
+ * Error message of the library operation when a failure occurs.
+ */
+ private String message;
+
+ /**
+ * Creates an instance of ClusterLibraryProperties class.
+ */
+ public ClusterLibraryProperties() {
+ }
+
+ /**
+ * Get the type property: Type of the library.
+ *
+ * @return the type value.
+ */
+ public Type type() {
+ return this.type;
+ }
+
+ /**
+ * Get the remarks property: Remark of the latest library management operation.
+ *
+ * @return the remarks value.
+ */
+ public String remarks() {
+ return this.remarks;
+ }
+
+ /**
+ * Set the remarks property: Remark of the latest library management operation.
+ *
+ * @param remarks the remarks value to set.
+ * @return the ClusterLibraryProperties object itself.
+ */
+ public ClusterLibraryProperties withRemarks(String remarks) {
+ this.remarks = remarks;
+ return this;
+ }
+
+ /**
+ * Get the timestamp property: Timestamp of the latest library management operation.
+ *
+ * @return the timestamp value.
+ */
+ public OffsetDateTime timestamp() {
+ return this.timestamp;
+ }
+
+ /**
+ * Set the timestamp property: Timestamp of the latest library management operation.
+ *
+ * @param timestamp the timestamp value to set.
+ * @return the ClusterLibraryProperties object itself.
+ */
+ ClusterLibraryProperties withTimestamp(OffsetDateTime timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the library.
+ *
+ * @return the status value.
+ */
+ public Status status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the library.
+ *
+ * @param status the status value to set.
+ * @return the ClusterLibraryProperties object itself.
+ */
+ ClusterLibraryProperties withStatus(Status status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the message property: Error message of the library operation when a failure occurs.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Error message of the library operation when a failure occurs.
+ *
+ * @param message the message value to set.
+ * @return the ClusterLibraryProperties object itself.
+ */
+ ClusterLibraryProperties withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString());
+ jsonWriter.writeStringField("remarks", this.remarks);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterLibraryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterLibraryProperties if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterLibraryProperties.
+ */
+ public static ClusterLibraryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("type".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("pypi".equals(discriminatorValue)) {
+ return PyPiLibraryProperties.fromJson(readerToUse.reset());
+ } else if ("maven".equals(discriminatorValue)) {
+ return MavenLibraryProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterLibraryProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterLibraryProperties deserializedClusterLibraryProperties = new ClusterLibraryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("type".equals(fieldName)) {
+ deserializedClusterLibraryProperties.type = Type.fromString(reader.getString());
+ } else if ("remarks".equals(fieldName)) {
+ deserializedClusterLibraryProperties.remarks = reader.getString();
+ } else if ("timestamp".equals(fieldName)) {
+ deserializedClusterLibraryProperties.timestamp = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("status".equals(fieldName)) {
+ deserializedClusterLibraryProperties.status = Status.fromString(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedClusterLibraryProperties.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterLibraryProperties;
+ });
+ }
+}
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 39115fdaa01aa..6f818ee502fae 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
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* The list cluster operation response.
*/
@Fluent
-public final class ClusterListResult {
+public final class ClusterListResult implements JsonSerializable {
/*
* The list of clusters.
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link (url) to the next page of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -71,4 +73,43 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterListResult if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterListResult.
+ */
+ public static ClusterListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterListResult deserializedClusterListResult = new ClusterListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ClusterInner.fromJson(reader1));
+ deserializedClusterListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterListResult;
+ });
+ }
}
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 ca445dab915c3..184da15810fd5 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
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Collection of logs to be enabled or disabled for log analytics.
*/
@Fluent
-public final class ClusterLogAnalyticsApplicationLogs {
+public final class ClusterLogAnalyticsApplicationLogs implements JsonSerializable {
/*
* True if stdout is enabled, otherwise false.
*/
- @JsonProperty(value = "stdOutEnabled")
private Boolean stdOutEnabled;
/*
* True if stderror is enabled, otherwise false.
*/
- @JsonProperty(value = "stdErrorEnabled")
private Boolean stdErrorEnabled;
/**
@@ -77,4 +79,46 @@ public ClusterLogAnalyticsApplicationLogs withStdErrorEnabled(Boolean stdErrorEn
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("stdOutEnabled", this.stdOutEnabled);
+ jsonWriter.writeBooleanField("stdErrorEnabled", this.stdErrorEnabled);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterLogAnalyticsApplicationLogs from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterLogAnalyticsApplicationLogs if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterLogAnalyticsApplicationLogs.
+ */
+ public static ClusterLogAnalyticsApplicationLogs fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterLogAnalyticsApplicationLogs deserializedClusterLogAnalyticsApplicationLogs
+ = new ClusterLogAnalyticsApplicationLogs();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("stdOutEnabled".equals(fieldName)) {
+ deserializedClusterLogAnalyticsApplicationLogs.stdOutEnabled
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("stdErrorEnabled".equals(fieldName)) {
+ deserializedClusterLogAnalyticsApplicationLogs.stdErrorEnabled
+ = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterLogAnalyticsApplicationLogs;
+ });
+ }
}
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 5f5bf60f32fef..e413148da880c 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
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster log analytics profile to enable or disable OMS agent for cluster.
*/
@Fluent
-public final class ClusterLogAnalyticsProfile {
+public final class ClusterLogAnalyticsProfile implements JsonSerializable {
/*
* True if log analytics is enabled for the cluster, otherwise false.
*/
- @JsonProperty(value = "enabled", required = true)
private boolean enabled;
/*
* Collection of logs to be enabled or disabled for log analytics.
*/
- @JsonProperty(value = "applicationLogs")
private ClusterLogAnalyticsApplicationLogs applicationLogs;
/*
* True if metrics are enabled, otherwise false.
*/
- @JsonProperty(value = "metricsEnabled")
private Boolean metricsEnabled;
/**
@@ -106,4 +107,48 @@ public void validate() {
applicationLogs().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ jsonWriter.writeJsonField("applicationLogs", this.applicationLogs);
+ jsonWriter.writeBooleanField("metricsEnabled", this.metricsEnabled);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterLogAnalyticsProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterLogAnalyticsProfile if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterLogAnalyticsProfile.
+ */
+ public static ClusterLogAnalyticsProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterLogAnalyticsProfile deserializedClusterLogAnalyticsProfile = new ClusterLogAnalyticsProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enabled".equals(fieldName)) {
+ deserializedClusterLogAnalyticsProfile.enabled = reader.getBoolean();
+ } else if ("applicationLogs".equals(fieldName)) {
+ deserializedClusterLogAnalyticsProfile.applicationLogs
+ = ClusterLogAnalyticsApplicationLogs.fromJson(reader);
+ } else if ("metricsEnabled".equals(fieldName)) {
+ deserializedClusterLogAnalyticsProfile.metricsEnabled = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterLogAnalyticsProfile;
+ });
+ }
}
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 f72ab3f884ef8..a031e0275bd99 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,26 +5,26 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonInclude;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.Map;
/**
* The patch for a cluster.
*/
@Fluent
-public final class ClusterPatch {
+public final class ClusterPatch implements JsonSerializable {
/*
* Define cluster patch specific properties.
*/
- @JsonProperty(value = "properties")
private ClusterPatchProperties properties;
/*
* Resource tags.
*/
- @JsonProperty(value = "tags")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/**
@@ -83,4 +83,44 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPatch from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPatch if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPatch.
+ */
+ public static ClusterPatch fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPatch deserializedClusterPatch = new ClusterPatch();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedClusterPatch.properties = ClusterPatchProperties.fromJson(reader);
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedClusterPatch.tags = tags;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPatch;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchProperties.java
index 686f17110f3dc..1580460970ee9 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchProperties.java
@@ -5,17 +5,20 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster resource patch data.
*/
@Fluent
-public final class ClusterPatchProperties {
+public final class ClusterPatchProperties implements JsonSerializable {
/*
* Cluster resource patch properties.
*/
- @JsonProperty(value = "clusterProfile")
private UpdatableClusterProfile clusterProfile;
/**
@@ -54,4 +57,40 @@ public void validate() {
clusterProfile().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("clusterProfile", this.clusterProfile);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPatchProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPatchProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPatchProperties.
+ */
+ public static ClusterPatchProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPatchProperties deserializedClusterPatchProperties = new ClusterPatchProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("clusterProfile".equals(fieldName)) {
+ deserializedClusterPatchProperties.clusterProfile = UpdatableClusterProfile.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPatchProperties;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..ef765c8e9cf9b
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeHistoryProperties.java
@@ -0,0 +1,212 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster patch version upgrade history properties.
+ */
+@Fluent
+public final class ClusterPatchVersionUpgradeHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeHistoryType upgradeType = ClusterUpgradeHistoryType.PATCH_VERSION_UPGRADE;
+
+ /**
+ * Creates an instance of ClusterPatchVersionUpgradeHistoryProperties class.
+ */
+ public ClusterPatchVersionUpgradeHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withSourceClusterVersion(String sourceClusterVersion) {
+ super.withSourceClusterVersion(sourceClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withSourceOssVersion(String sourceOssVersion) {
+ super.withSourceOssVersion(sourceOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withSourceBuildNumber(String sourceBuildNumber) {
+ super.withSourceBuildNumber(sourceBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withTargetClusterVersion(String targetClusterVersion) {
+ super.withTargetClusterVersion(targetClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withTargetOssVersion(String targetOssVersion) {
+ super.withTargetOssVersion(targetOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withTargetBuildNumber(String targetBuildNumber) {
+ super.withTargetBuildNumber(targetBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withComponentName(String componentName) {
+ super.withComponentName(componentName);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withSeverity(ClusterUpgradeHistorySeverityType severity) {
+ super.withSeverity(severity);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeHistoryProperties
+ withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("sourceClusterVersion", sourceClusterVersion());
+ jsonWriter.writeStringField("sourceOssVersion", sourceOssVersion());
+ jsonWriter.writeStringField("sourceBuildNumber", sourceBuildNumber());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("severity", severity() == null ? null : severity().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPatchVersionUpgradeHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPatchVersionUpgradeHistoryProperties if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPatchVersionUpgradeHistoryProperties.
+ */
+ public static ClusterPatchVersionUpgradeHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPatchVersionUpgradeHistoryProperties deserializedClusterPatchVersionUpgradeHistoryProperties
+ = new ClusterPatchVersionUpgradeHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties
+ .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties
+ .withSourceClusterVersion(reader.getString());
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties.withSourceOssVersion(reader.getString());
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties.withSourceBuildNumber(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties
+ .withTargetClusterVersion(reader.getString());
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties.withTargetOssVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties.withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties.withComponentName(reader.getString());
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties
+ .withSeverity(ClusterUpgradeHistorySeverityType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeHistoryProperties.upgradeType
+ = ClusterUpgradeHistoryType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPatchVersionUpgradeHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java
new file mode 100644
index 0000000000000..dab36780a3859
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeProperties.java
@@ -0,0 +1,134 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Properties of upgrading cluster's patch version.
+ */
+@Fluent
+public final class ClusterPatchVersionUpgradeProperties extends ClusterInPlaceUpgradeProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeType upgradeType = ClusterUpgradeType.PATCH_VERSION_UPGRADE;
+
+ /**
+ * Creates an instance of ClusterPatchVersionUpgradeProperties class.
+ */
+ public ClusterPatchVersionUpgradeProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeProperties withTargetOssVersion(String targetOssVersion) {
+ super.withTargetOssVersion(targetOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeProperties withTargetClusterVersion(String targetClusterVersion) {
+ super.withTargetClusterVersion(targetClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeProperties withTargetBuildNumber(String targetBuildNumber) {
+ super.withTargetBuildNumber(targetBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeProperties withComponentName(String componentName) {
+ super.withComponentName(componentName);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPatchVersionUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPatchVersionUpgradeProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPatchVersionUpgradeProperties.
+ */
+ public static ClusterPatchVersionUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPatchVersionUpgradeProperties deserializedClusterPatchVersionUpgradeProperties
+ = new ClusterPatchVersionUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeProperties.withTargetOssVersion(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeProperties.withTargetClusterVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeProperties.withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeProperties.withComponentName(reader.getString());
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeProperties.upgradeType
+ = ClusterUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPatchVersionUpgradeProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java
new file mode 100644
index 0000000000000..509c46d047d77
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPatchVersionUpgradeRollbackHistoryProperties.java
@@ -0,0 +1,219 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster patch version upgrade rollback history properties.
+ */
+@Fluent
+public final class ClusterPatchVersionUpgradeRollbackHistoryProperties extends ClusterInPlaceUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterUpgradeHistoryType upgradeType = ClusterUpgradeHistoryType.PATCH_VERSION_UPGRADE_ROLLBACK;
+
+ /**
+ * Creates an instance of ClusterPatchVersionUpgradeRollbackHistoryProperties class.
+ */
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withSourceClusterVersion(String sourceClusterVersion) {
+ super.withSourceClusterVersion(sourceClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withSourceOssVersion(String sourceOssVersion) {
+ super.withSourceOssVersion(sourceOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withSourceBuildNumber(String sourceBuildNumber) {
+ super.withSourceBuildNumber(sourceBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withTargetClusterVersion(String targetClusterVersion) {
+ super.withTargetClusterVersion(targetClusterVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withTargetOssVersion(String targetOssVersion) {
+ super.withTargetOssVersion(targetOssVersion);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withTargetBuildNumber(String targetBuildNumber) {
+ super.withTargetBuildNumber(targetBuildNumber);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withComponentName(String componentName) {
+ super.withComponentName(componentName);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties
+ withSeverity(ClusterUpgradeHistorySeverityType severity) {
+ super.withSeverity(severity);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPatchVersionUpgradeRollbackHistoryProperties
+ withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("sourceClusterVersion", sourceClusterVersion());
+ jsonWriter.writeStringField("sourceOssVersion", sourceOssVersion());
+ jsonWriter.writeStringField("sourceBuildNumber", sourceBuildNumber());
+ jsonWriter.writeStringField("targetClusterVersion", targetClusterVersion());
+ jsonWriter.writeStringField("targetOssVersion", targetOssVersion());
+ jsonWriter.writeStringField("targetBuildNumber", targetBuildNumber());
+ jsonWriter.writeStringField("componentName", componentName());
+ jsonWriter.writeStringField("severity", severity() == null ? null : severity().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPatchVersionUpgradeRollbackHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPatchVersionUpgradeRollbackHistoryProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPatchVersionUpgradeRollbackHistoryProperties.
+ */
+ public static ClusterPatchVersionUpgradeRollbackHistoryProperties fromJson(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPatchVersionUpgradeRollbackHistoryProperties deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ = new ClusterPatchVersionUpgradeRollbackHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withUpgradeResult(ClusterUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("sourceClusterVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withSourceClusterVersion(reader.getString());
+ } else if ("sourceOssVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withSourceOssVersion(reader.getString());
+ } else if ("sourceBuildNumber".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withSourceBuildNumber(reader.getString());
+ } else if ("targetClusterVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withTargetClusterVersion(reader.getString());
+ } else if ("targetOssVersion".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withTargetOssVersion(reader.getString());
+ } else if ("targetBuildNumber".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withTargetBuildNumber(reader.getString());
+ } else if ("componentName".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withComponentName(reader.getString());
+ } else if ("severity".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties
+ .withSeverity(ClusterUpgradeHistorySeverityType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPatchVersionUpgradeRollbackHistoryProperties.upgradeType
+ = ClusterUpgradeHistoryType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPatchVersionUpgradeRollbackHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..dc7149e5f5270
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchUpgradeHistoryProperties.java
@@ -0,0 +1,227 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster pool aks upgrade history properties.
+ */
+@Fluent
+public final class ClusterPoolAksPatchUpgradeHistoryProperties extends ClusterPoolUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolUpgradeHistoryType upgradeType = ClusterPoolUpgradeHistoryType.AKSPATCH_UPGRADE;
+
+ /*
+ * Whether upgrade cluster pool.
+ */
+ private Boolean upgradeClusterPool;
+
+ /*
+ * Whether upgrade all cluster nodes.
+ */
+ private Boolean upgradeAllClusterNodes;
+
+ /*
+ * Version before update.
+ */
+ private String originalVersion;
+
+ /*
+ * Version going to update.
+ */
+ private String newVersion;
+
+ /**
+ * Creates an instance of ClusterPoolAksPatchUpgradeHistoryProperties class.
+ */
+ public ClusterPoolAksPatchUpgradeHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterPoolUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * Get the upgradeClusterPool property: Whether upgrade cluster pool.
+ *
+ * @return the upgradeClusterPool value.
+ */
+ public Boolean upgradeClusterPool() {
+ return this.upgradeClusterPool;
+ }
+
+ /**
+ * Set the upgradeClusterPool property: Whether upgrade cluster pool.
+ *
+ * @param upgradeClusterPool the upgradeClusterPool value to set.
+ * @return the ClusterPoolAksPatchUpgradeHistoryProperties object itself.
+ */
+ public ClusterPoolAksPatchUpgradeHistoryProperties withUpgradeClusterPool(Boolean upgradeClusterPool) {
+ this.upgradeClusterPool = upgradeClusterPool;
+ return this;
+ }
+
+ /**
+ * Get the upgradeAllClusterNodes property: Whether upgrade all cluster nodes.
+ *
+ * @return the upgradeAllClusterNodes value.
+ */
+ public Boolean upgradeAllClusterNodes() {
+ return this.upgradeAllClusterNodes;
+ }
+
+ /**
+ * Set the upgradeAllClusterNodes property: Whether upgrade all cluster nodes.
+ *
+ * @param upgradeAllClusterNodes the upgradeAllClusterNodes value to set.
+ * @return the ClusterPoolAksPatchUpgradeHistoryProperties object itself.
+ */
+ public ClusterPoolAksPatchUpgradeHistoryProperties withUpgradeAllClusterNodes(Boolean upgradeAllClusterNodes) {
+ this.upgradeAllClusterNodes = upgradeAllClusterNodes;
+ return this;
+ }
+
+ /**
+ * Get the originalVersion property: Version before update.
+ *
+ * @return the originalVersion value.
+ */
+ public String originalVersion() {
+ return this.originalVersion;
+ }
+
+ /**
+ * Set the originalVersion property: Version before update.
+ *
+ * @param originalVersion the originalVersion value to set.
+ * @return the ClusterPoolAksPatchUpgradeHistoryProperties object itself.
+ */
+ public ClusterPoolAksPatchUpgradeHistoryProperties withOriginalVersion(String originalVersion) {
+ this.originalVersion = originalVersion;
+ return this;
+ }
+
+ /**
+ * Get the newVersion property: Version going to update.
+ *
+ * @return the newVersion value.
+ */
+ public String newVersion() {
+ return this.newVersion;
+ }
+
+ /**
+ * Set the newVersion property: Version going to update.
+ *
+ * @param newVersion the newVersion value to set.
+ * @return the ClusterPoolAksPatchUpgradeHistoryProperties object itself.
+ */
+ public ClusterPoolAksPatchUpgradeHistoryProperties withNewVersion(String newVersion) {
+ this.newVersion = newVersion;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPoolAksPatchUpgradeHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPoolAksPatchUpgradeHistoryProperties
+ withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeBooleanField("upgradeClusterPool", this.upgradeClusterPool);
+ jsonWriter.writeBooleanField("upgradeAllClusterNodes", this.upgradeAllClusterNodes);
+ jsonWriter.writeStringField("originalVersion", this.originalVersion);
+ jsonWriter.writeStringField("newVersion", this.newVersion);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolAksPatchUpgradeHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolAksPatchUpgradeHistoryProperties if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolAksPatchUpgradeHistoryProperties.
+ */
+ public static ClusterPoolAksPatchUpgradeHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolAksPatchUpgradeHistoryProperties deserializedClusterPoolAksPatchUpgradeHistoryProperties
+ = new ClusterPoolAksPatchUpgradeHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterPoolAksPatchUpgradeHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterPoolAksPatchUpgradeHistoryProperties
+ .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolAksPatchUpgradeHistoryProperties.upgradeType
+ = ClusterPoolUpgradeHistoryType.fromString(reader.getString());
+ } else if ("upgradeClusterPool".equals(fieldName)) {
+ deserializedClusterPoolAksPatchUpgradeHistoryProperties.upgradeClusterPool
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("upgradeAllClusterNodes".equals(fieldName)) {
+ deserializedClusterPoolAksPatchUpgradeHistoryProperties.upgradeAllClusterNodes
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("originalVersion".equals(fieldName)) {
+ deserializedClusterPoolAksPatchUpgradeHistoryProperties.originalVersion = reader.getString();
+ } else if ("newVersion".equals(fieldName)) {
+ deserializedClusterPoolAksPatchUpgradeHistoryProperties.newVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolAksPatchUpgradeHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java
index edf972fbd1dc8..a182dcf7bd7b8 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAksPatchVersionUpgradeProperties.java
@@ -5,27 +5,29 @@
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 com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolUpgradeType upgradeType = ClusterPoolUpgradeType.AKSPATCH_UPGRADE;
+
/*
* 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;
/*
@@ -34,7 +36,6 @@ public final class ClusterPoolAksPatchVersionUpgradeProperties extends ClusterPo
* upgradeClusterPool is false and upgradeAllClusterNodes is true, target version should be equal to AKS version of
* cluster pool.
*/
- @JsonProperty(value = "targetAksVersion")
private String targetAksVersion;
/**
@@ -43,6 +44,16 @@ public final class ClusterPoolAksPatchVersionUpgradeProperties extends ClusterPo
public ClusterPoolAksPatchVersionUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterPoolUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Get the upgradeClusterPool property: whether upgrade cluster pool or not. If it's true, upgradeAllClusterNodes
* should be false.
@@ -122,4 +133,53 @@ public ClusterPoolAksPatchVersionUpgradeProperties withTargetAksVersion(String t
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeBooleanField("upgradeClusterPool", this.upgradeClusterPool);
+ jsonWriter.writeBooleanField("upgradeAllClusterNodes", this.upgradeAllClusterNodes);
+ jsonWriter.writeStringField("targetAksVersion", this.targetAksVersion);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolAksPatchVersionUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolAksPatchVersionUpgradeProperties if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolAksPatchVersionUpgradeProperties.
+ */
+ public static ClusterPoolAksPatchVersionUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolAksPatchVersionUpgradeProperties deserializedClusterPoolAksPatchVersionUpgradeProperties
+ = new ClusterPoolAksPatchVersionUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolAksPatchVersionUpgradeProperties.upgradeType
+ = ClusterPoolUpgradeType.fromString(reader.getString());
+ } else if ("upgradeClusterPool".equals(fieldName)) {
+ deserializedClusterPoolAksPatchVersionUpgradeProperties.upgradeClusterPool
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("upgradeAllClusterNodes".equals(fieldName)) {
+ deserializedClusterPoolAksPatchVersionUpgradeProperties.upgradeAllClusterNodes
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("targetAksVersion".equals(fieldName)) {
+ deserializedClusterPoolAksPatchVersionUpgradeProperties.targetAksVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolAksPatchVersionUpgradeProperties;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java
index 71402a73564bd..68fd297ea328c 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.java
@@ -5,33 +5,34 @@
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 com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolAvailableUpgradeType upgradeType = ClusterPoolAvailableUpgradeType.AKSPATCH_UPGRADE;
+
/*
* 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;
/**
@@ -40,6 +41,16 @@ public final class ClusterPoolAvailableUpgradeAksPatchUpgradeProperties extends
public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterPoolAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Get the currentVersion property: Current AKS version.
*
@@ -110,4 +121,55 @@ public ClusterPoolAvailableUpgradeAksPatchUpgradeProperties withLatestVersion(St
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("currentVersion", this.currentVersion);
+ jsonWriter.writeStringField("currentVersionStatus",
+ this.currentVersionStatus == null ? null : this.currentVersionStatus.toString());
+ jsonWriter.writeStringField("latestVersion", this.latestVersion);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolAvailableUpgradeAksPatchUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolAvailableUpgradeAksPatchUpgradeProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.
+ */
+ public static ClusterPoolAvailableUpgradeAksPatchUpgradeProperties fromJson(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolAvailableUpgradeAksPatchUpgradeProperties deserializedClusterPoolAvailableUpgradeAksPatchUpgradeProperties
+ = new ClusterPoolAvailableUpgradeAksPatchUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeAksPatchUpgradeProperties.upgradeType
+ = ClusterPoolAvailableUpgradeType.fromString(reader.getString());
+ } else if ("currentVersion".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeAksPatchUpgradeProperties.currentVersion
+ = reader.getString();
+ } else if ("currentVersionStatus".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeAksPatchUpgradeProperties.currentVersionStatus
+ = CurrentClusterPoolAksVersionStatus.fromString(reader.getString());
+ } else if ("latestVersion".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeAksPatchUpgradeProperties.latestVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolAvailableUpgradeAksPatchUpgradeProperties;
+ });
+ }
}
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
index 4a09f96e9ce15..0dd8d4f05fa2c 100644
--- 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
@@ -6,25 +6,27 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolAvailableUpgradeInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* collection of cluster pool available upgrade.
*/
@Fluent
-public final class ClusterPoolAvailableUpgradeList {
+public final class ClusterPoolAvailableUpgradeList implements JsonSerializable {
/*
* 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;
/**
@@ -80,12 +82,56 @@ public ClusterPoolAvailableUpgradeList withNextLink(String nextLink) {
*/
public void validate() {
if (value() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property value in model ClusterPoolAvailableUpgradeList"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property value in model ClusterPoolAvailableUpgradeList"));
} else {
value().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolAvailableUpgradeList.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolAvailableUpgradeList from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolAvailableUpgradeList if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolAvailableUpgradeList.
+ */
+ public static ClusterPoolAvailableUpgradeList fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolAvailableUpgradeList deserializedClusterPoolAvailableUpgradeList
+ = new ClusterPoolAvailableUpgradeList();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ClusterPoolAvailableUpgradeInner.fromJson(reader1));
+ deserializedClusterPoolAvailableUpgradeList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeList.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolAvailableUpgradeList;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java
index c23a7ff298215..bd3696eb1bfe1 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.java
@@ -5,21 +5,24 @@
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 com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolAvailableUpgradeType upgradeType = ClusterPoolAvailableUpgradeType.NODE_OS_UPGRADE;
+
/*
* The latest node OS version.
*/
- @JsonProperty(value = "latestVersion")
private String latestVersion;
/**
@@ -28,6 +31,16 @@ public final class ClusterPoolAvailableUpgradeNodeOsUpgradeProperties extends Cl
public ClusterPoolAvailableUpgradeNodeOsUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterPoolAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Get the latestVersion property: The latest node OS version.
*
@@ -57,4 +70,46 @@ public ClusterPoolAvailableUpgradeNodeOsUpgradeProperties withLatestVersion(Stri
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("latestVersion", this.latestVersion);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolAvailableUpgradeNodeOsUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolAvailableUpgradeNodeOsUpgradeProperties if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.
+ */
+ public static ClusterPoolAvailableUpgradeNodeOsUpgradeProperties fromJson(JsonReader jsonReader)
+ throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolAvailableUpgradeNodeOsUpgradeProperties deserializedClusterPoolAvailableUpgradeNodeOsUpgradeProperties
+ = new ClusterPoolAvailableUpgradeNodeOsUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeNodeOsUpgradeProperties.upgradeType
+ = ClusterPoolAvailableUpgradeType.fromString(reader.getString());
+ } else if ("latestVersion".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeNodeOsUpgradeProperties.latestVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolAvailableUpgradeNodeOsUpgradeProperties;
+ });
+ }
}
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
index 9489e214d6d31..7f0369e786c5d 100644
--- 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
@@ -5,30 +5,38 @@
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;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+public class ClusterPoolAvailableUpgradeProperties implements JsonSerializable {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolAvailableUpgradeType upgradeType
+ = ClusterPoolAvailableUpgradeType.fromString("ClusterPoolAvailableUpgradeProperties");
+
/**
* Creates an instance of ClusterPoolAvailableUpgradeProperties class.
*/
public ClusterPoolAvailableUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ public ClusterPoolAvailableUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Validates the instance.
*
@@ -36,4 +44,69 @@ public ClusterPoolAvailableUpgradeProperties() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolAvailableUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolAvailableUpgradeProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolAvailableUpgradeProperties.
+ */
+ public static ClusterPoolAvailableUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("upgradeType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("AKSPatchUpgrade".equals(discriminatorValue)) {
+ return ClusterPoolAvailableUpgradeAksPatchUpgradeProperties.fromJson(readerToUse.reset());
+ } else if ("NodeOsUpgrade".equals(discriminatorValue)) {
+ return ClusterPoolAvailableUpgradeNodeOsUpgradeProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterPoolAvailableUpgradeProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolAvailableUpgradeProperties deserializedClusterPoolAvailableUpgradeProperties
+ = new ClusterPoolAvailableUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolAvailableUpgradeProperties.upgradeType
+ = ClusterPoolAvailableUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolAvailableUpgradeProperties;
+ });
+ }
}
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
index 0f678c547d0f3..0b023ee4f770d 100644
--- 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public ClusterPoolAvailableUpgradeType() {
* @param name a name to look for.
* @return the corresponding ClusterPoolAvailableUpgradeType.
*/
- @JsonCreator
public static ClusterPoolAvailableUpgradeType fromString(String name) {
return fromString(name, ClusterPoolAvailableUpgradeType.class);
}
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 fa5471f694544..902b3182c90b7 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
@@ -6,25 +6,33 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
/**
* Cluster pool compute profile.
*/
@Fluent
-public class ClusterPoolComputeProfile {
+public class ClusterPoolComputeProfile implements JsonSerializable {
/*
* The virtual machine SKU.
*/
- @JsonProperty(value = "vmSize", required = true)
private String vmSize;
/*
* The number of virtual machines.
*/
- @JsonProperty(value = "count", access = JsonProperty.Access.WRITE_ONLY)
private Integer count;
+ /*
+ * The list of Availability zones to use for AKS VMSS nodes.
+ */
+ private List availabilityZones;
+
/**
* Creates an instance of ClusterPoolComputeProfile class.
*/
@@ -60,6 +68,37 @@ public Integer count() {
return this.count;
}
+ /**
+ * Set the count property: The number of virtual machines.
+ *
+ * @param count the count value to set.
+ * @return the ClusterPoolComputeProfile object itself.
+ */
+ ClusterPoolComputeProfile withCount(Integer count) {
+ this.count = count;
+ return this;
+ }
+
+ /**
+ * Get the availabilityZones property: The list of Availability zones to use for AKS VMSS nodes.
+ *
+ * @return the availabilityZones value.
+ */
+ public List availabilityZones() {
+ return this.availabilityZones;
+ }
+
+ /**
+ * Set the availabilityZones property: The list of Availability zones to use for AKS VMSS nodes.
+ *
+ * @param availabilityZones the availabilityZones value to set.
+ * @return the ClusterPoolComputeProfile object itself.
+ */
+ public ClusterPoolComputeProfile withAvailabilityZones(List availabilityZones) {
+ this.availabilityZones = availabilityZones;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -67,10 +106,55 @@ public Integer count() {
*/
public void validate() {
if (vmSize() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property vmSize in model ClusterPoolComputeProfile"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property vmSize in model ClusterPoolComputeProfile"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolComputeProfile.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("vmSize", this.vmSize);
+ jsonWriter.writeArrayField("availabilityZones", this.availabilityZones,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolComputeProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolComputeProfile if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolComputeProfile.
+ */
+ public static ClusterPoolComputeProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolComputeProfile deserializedClusterPoolComputeProfile = new ClusterPoolComputeProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("vmSize".equals(fieldName)) {
+ deserializedClusterPoolComputeProfile.vmSize = reader.getString();
+ } else if ("count".equals(fieldName)) {
+ deserializedClusterPoolComputeProfile.count = reader.getNullable(JsonReader::getInt);
+ } else if ("availabilityZones".equals(fieldName)) {
+ List availabilityZones = reader.readArray(reader1 -> reader1.getString());
+ deserializedClusterPoolComputeProfile.availabilityZones = availabilityZones;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolComputeProfile;
+ });
+ }
}
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 fa066fa77d71a..7bba7a6949d2c 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
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* The list cluster pools operation response.
*/
@Fluent
-public final class ClusterPoolListResult {
+public final class ClusterPoolListResult implements JsonSerializable {
/*
* The list of cluster pools.
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link (url) to the next page of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -71,4 +73,43 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolListResult if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolListResult.
+ */
+ public static ClusterPoolListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolListResult deserializedClusterPoolListResult = new ClusterPoolListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> ClusterPoolInner.fromJson(reader1));
+ deserializedClusterPoolListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterPoolListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolListResult;
+ });
+ }
}
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 c071788b9c4fd..2f5d5d65b5f05 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
@@ -5,23 +5,25 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster pool log analytics profile used to enable or disable OMS agent for AKS cluster.
*/
@Fluent
-public class ClusterPoolLogAnalyticsProfile {
+public class ClusterPoolLogAnalyticsProfile implements JsonSerializable {
/*
* True if log analytics is enabled for cluster pool, otherwise false.
*/
- @JsonProperty(value = "enabled", required = true)
private boolean enabled;
/*
* Log analytics workspace to associate with the OMS agent.
*/
- @JsonProperty(value = "workspaceId")
private String workspaceId;
/**
@@ -77,4 +79,45 @@ public ClusterPoolLogAnalyticsProfile withWorkspaceId(String workspaceId) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ jsonWriter.writeStringField("workspaceId", this.workspaceId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolLogAnalyticsProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolLogAnalyticsProfile if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolLogAnalyticsProfile.
+ */
+ public static ClusterPoolLogAnalyticsProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolLogAnalyticsProfile deserializedClusterPoolLogAnalyticsProfile
+ = new ClusterPoolLogAnalyticsProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enabled".equals(fieldName)) {
+ deserializedClusterPoolLogAnalyticsProfile.enabled = reader.getBoolean();
+ } else if ("workspaceId".equals(fieldName)) {
+ deserializedClusterPoolLogAnalyticsProfile.workspaceId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolLogAnalyticsProfile;
+ });
+ }
}
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 6a934d56f6037..16fea3adbaa6c 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
@@ -6,43 +6,40 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Cluster pool networking configuration.
*/
@Fluent
-public class ClusterPoolNetworkProfile {
+public class ClusterPoolNetworkProfile implements JsonSerializable {
/*
* Cluster pool subnet resource id.
*/
- @JsonProperty(value = "subnetId", required = true)
private String subnetId;
/*
- * 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.
+ * 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.
+ * Currently, this property is not supported and please don't use it.
*/
- @JsonProperty(value = "apiServerAuthorizedIpRanges")
private List apiServerAuthorizedIpRanges;
/**
@@ -72,9 +69,7 @@ public ClusterPoolNetworkProfile withSubnetId(String subnetId) {
}
/**
- * Get the outboundType property: The outbound (egress) routing method.
- *
- * This can only be set at cluster pool creation time and cannot be changed later.
+ * Get the outboundType property: This can only be set at cluster pool creation time and cannot be changed later.
*
* @return the outboundType value.
*/
@@ -83,9 +78,7 @@ public OutboundType 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.
+ * Set the outboundType property: 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.
@@ -120,10 +113,9 @@ public ClusterPoolNetworkProfile withEnablePrivateApiServer(Boolean enablePrivat
}
/**
- * 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.
+ * Get the apiServerAuthorizedIpRanges property: 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. Currently, this property is not supported and please don't use it.
*
* @return the apiServerAuthorizedIpRanges value.
*/
@@ -132,10 +124,9 @@ public List 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.
+ * Set the apiServerAuthorizedIpRanges property: 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. Currently, this property is not supported and please don't use it.
*
* @param apiServerAuthorizedIpRanges the apiServerAuthorizedIpRanges value to set.
* @return the ClusterPoolNetworkProfile object itself.
@@ -152,10 +143,60 @@ public ClusterPoolNetworkProfile withApiServerAuthorizedIpRanges(List ap
*/
public void validate() {
if (subnetId() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property subnetId in model ClusterPoolNetworkProfile"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property subnetId in model ClusterPoolNetworkProfile"));
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolNetworkProfile.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("subnetId", this.subnetId);
+ jsonWriter.writeStringField("outboundType", this.outboundType == null ? null : this.outboundType.toString());
+ jsonWriter.writeBooleanField("enablePrivateApiServer", this.enablePrivateApiServer);
+ jsonWriter.writeArrayField("apiServerAuthorizedIpRanges", this.apiServerAuthorizedIpRanges,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolNetworkProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolNetworkProfile if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolNetworkProfile.
+ */
+ public static ClusterPoolNetworkProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolNetworkProfile deserializedClusterPoolNetworkProfile = new ClusterPoolNetworkProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("subnetId".equals(fieldName)) {
+ deserializedClusterPoolNetworkProfile.subnetId = reader.getString();
+ } else if ("outboundType".equals(fieldName)) {
+ deserializedClusterPoolNetworkProfile.outboundType = OutboundType.fromString(reader.getString());
+ } else if ("enablePrivateApiServer".equals(fieldName)) {
+ deserializedClusterPoolNetworkProfile.enablePrivateApiServer
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("apiServerAuthorizedIpRanges".equals(fieldName)) {
+ List apiServerAuthorizedIpRanges = reader.readArray(reader1 -> reader1.getString());
+ deserializedClusterPoolNetworkProfile.apiServerAuthorizedIpRanges = apiServerAuthorizedIpRanges;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolNetworkProfile;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java
index 260229fe983d7..a72f80fe4266e 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsImageUpdateProperties.java
@@ -5,22 +5,37 @@
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;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolUpgradeType upgradeType = ClusterPoolUpgradeType.NODE_OS_UPGRADE;
+
/**
* Creates an instance of ClusterPoolNodeOsImageUpdateProperties class.
*/
public ClusterPoolNodeOsImageUpdateProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterPoolUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Validates the instance.
*
@@ -30,4 +45,42 @@ public ClusterPoolNodeOsImageUpdateProperties() {
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolNodeOsImageUpdateProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolNodeOsImageUpdateProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolNodeOsImageUpdateProperties.
+ */
+ public static ClusterPoolNodeOsImageUpdateProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolNodeOsImageUpdateProperties deserializedClusterPoolNodeOsImageUpdateProperties
+ = new ClusterPoolNodeOsImageUpdateProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolNodeOsImageUpdateProperties.upgradeType
+ = ClusterPoolUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolNodeOsImageUpdateProperties;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..107fdbaaaa47f
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolNodeOsUpgradeHistoryProperties.java
@@ -0,0 +1,141 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Cluster pool node os upgrade history properties.
+ */
+@Fluent
+public final class ClusterPoolNodeOsUpgradeHistoryProperties extends ClusterPoolUpgradeHistoryProperties {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolUpgradeHistoryType upgradeType = ClusterPoolUpgradeHistoryType.NODE_OS_UPGRADE;
+
+ /*
+ * New Node Os version.
+ */
+ private String newNodeOs;
+
+ /**
+ * Creates an instance of ClusterPoolNodeOsUpgradeHistoryProperties class.
+ */
+ public ClusterPoolNodeOsUpgradeHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ @Override
+ public ClusterPoolUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * Get the newNodeOs property: New Node Os version.
+ *
+ * @return the newNodeOs value.
+ */
+ public String newNodeOs() {
+ return this.newNodeOs;
+ }
+
+ /**
+ * Set the newNodeOs property: New Node Os version.
+ *
+ * @param newNodeOs the newNodeOs value to set.
+ * @return the ClusterPoolNodeOsUpgradeHistoryProperties object itself.
+ */
+ public ClusterPoolNodeOsUpgradeHistoryProperties withNewNodeOs(String newNodeOs) {
+ this.newNodeOs = newNodeOs;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPoolNodeOsUpgradeHistoryProperties withUtcTime(String utcTime) {
+ super.withUtcTime(utcTime);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPoolNodeOsUpgradeHistoryProperties
+ withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult) {
+ super.withUpgradeResult(upgradeResult);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", utcTime());
+ jsonWriter.writeStringField("upgradeResult", upgradeResult() == null ? null : upgradeResult().toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ jsonWriter.writeStringField("newNodeOs", this.newNodeOs);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolNodeOsUpgradeHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolNodeOsUpgradeHistoryProperties if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolNodeOsUpgradeHistoryProperties.
+ */
+ public static ClusterPoolNodeOsUpgradeHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolNodeOsUpgradeHistoryProperties deserializedClusterPoolNodeOsUpgradeHistoryProperties
+ = new ClusterPoolNodeOsUpgradeHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterPoolNodeOsUpgradeHistoryProperties.withUtcTime(reader.getString());
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterPoolNodeOsUpgradeHistoryProperties
+ .withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType.fromString(reader.getString()));
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolNodeOsUpgradeHistoryProperties.upgradeType
+ = ClusterPoolUpgradeHistoryType.fromString(reader.getString());
+ } else if ("newNodeOs".equals(fieldName)) {
+ deserializedClusterPoolNodeOsUpgradeHistoryProperties.newNodeOs = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolNodeOsUpgradeHistoryProperties;
+ });
+ }
+}
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 3bdea7f8d7579..87b0639fca5e0 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
@@ -6,19 +6,27 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster pool profile.
*/
@Fluent
-public class ClusterPoolProfile {
+public class ClusterPoolProfile implements JsonSerializable {
/*
* Cluster pool version is a 2-part version.
*/
- @JsonProperty(value = "clusterPoolVersion", required = true)
private String clusterPoolVersion;
+ /*
+ * Gets or sets the IP tag for the public IPs created along with the HDInsightOnAks ClusterPools and Clusters.
+ */
+ private IpTag publicIpTag;
+
/**
* Creates an instance of ClusterPoolProfile class.
*/
@@ -45,6 +53,28 @@ public ClusterPoolProfile withClusterPoolVersion(String clusterPoolVersion) {
return this;
}
+ /**
+ * Get the publicIpTag property: Gets or sets the IP tag for the public IPs created along with the HDInsightOnAks
+ * ClusterPools and Clusters.
+ *
+ * @return the publicIpTag value.
+ */
+ public IpTag publicIpTag() {
+ return this.publicIpTag;
+ }
+
+ /**
+ * Set the publicIpTag property: Gets or sets the IP tag for the public IPs created along with the HDInsightOnAks
+ * ClusterPools and Clusters.
+ *
+ * @param publicIpTag the publicIpTag value to set.
+ * @return the ClusterPoolProfile object itself.
+ */
+ public ClusterPoolProfile withPublicIpTag(IpTag publicIpTag) {
+ this.publicIpTag = publicIpTag;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -52,10 +82,54 @@ public ClusterPoolProfile withClusterPoolVersion(String clusterPoolVersion) {
*/
public void validate() {
if (clusterPoolVersion() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property clusterPoolVersion in model ClusterPoolProfile"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property clusterPoolVersion in model ClusterPoolProfile"));
+ }
+ if (publicIpTag() != null) {
+ publicIpTag().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolProfile.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("clusterPoolVersion", this.clusterPoolVersion);
+ jsonWriter.writeJsonField("publicIpTag", this.publicIpTag);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolProfile if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolProfile.
+ */
+ public static ClusterPoolProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolProfile deserializedClusterPoolProfile = new ClusterPoolProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("clusterPoolVersion".equals(fieldName)) {
+ deserializedClusterPoolProfile.clusterPoolVersion = reader.getString();
+ } else if ("publicIpTag".equals(fieldName)) {
+ deserializedClusterPoolProfile.publicIpTag = IpTag.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolProfile;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourceProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourceProperties.java
index 19af964acef54..05b047ec6eec7 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourceProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourceProperties.java
@@ -6,23 +6,25 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster pool resource properties.
*/
@Fluent
-public final class ClusterPoolResourceProperties {
+public final class ClusterPoolResourceProperties implements JsonSerializable {
/*
* Provisioning state of the resource.
*/
- @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningStatus provisioningState;
/*
* A unique id generated by the RP to identify the resource.
*/
- @JsonProperty(value = "deploymentId", access = JsonProperty.Access.WRITE_ONLY)
private String deploymentId;
/*
@@ -30,7 +32,6 @@ public final class ClusterPoolResourceProperties {
* to generate aksManagedResourceGroupName by pattern: MC_{managedResourceGroupName}_{clusterPoolName}_{region}.
* Please make sure it meets resource group name restriction.
*/
- @JsonProperty(value = "managedResourceGroupName")
private String managedResourceGroupName;
/*
@@ -38,43 +39,36 @@ public final class ClusterPoolResourceProperties {
* is generated by cluster pool name and managed resource group name by pattern:
* MC_{managedResourceGroupName}_{clusterPoolName}_{region}
*/
- @JsonProperty(value = "aksManagedResourceGroupName", access = JsonProperty.Access.WRITE_ONLY)
private String aksManagedResourceGroupName;
/*
* CLuster pool profile.
*/
- @JsonProperty(value = "clusterPoolProfile")
private ClusterPoolResourcePropertiesClusterPoolProfile clusterPoolProfile;
/*
* CLuster pool compute profile.
*/
- @JsonProperty(value = "computeProfile", required = true)
private ClusterPoolResourcePropertiesComputeProfile computeProfile;
/*
* Properties of underlying AKS cluster.
*/
- @JsonProperty(value = "aksClusterProfile", access = JsonProperty.Access.WRITE_ONLY)
private ClusterPoolResourcePropertiesAksClusterProfile aksClusterProfile;
/*
* Cluster pool network profile.
*/
- @JsonProperty(value = "networkProfile")
private ClusterPoolResourcePropertiesNetworkProfile networkProfile;
/*
* Cluster pool log analytics profile to enable OMS agent for AKS cluster.
*/
- @JsonProperty(value = "logAnalyticsProfile")
private ClusterPoolResourcePropertiesLogAnalyticsProfile logAnalyticsProfile;
/*
* Business status of the resource.
*/
- @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
private String status;
/**
@@ -250,8 +244,9 @@ public void validate() {
clusterPoolProfile().validate();
}
if (computeProfile() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property computeProfile in model ClusterPoolResourceProperties"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property computeProfile in model ClusterPoolResourceProperties"));
} else {
computeProfile().validate();
}
@@ -267,4 +262,70 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolResourceProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("computeProfile", this.computeProfile);
+ jsonWriter.writeStringField("managedResourceGroupName", this.managedResourceGroupName);
+ jsonWriter.writeJsonField("clusterPoolProfile", this.clusterPoolProfile);
+ jsonWriter.writeJsonField("networkProfile", this.networkProfile);
+ jsonWriter.writeJsonField("logAnalyticsProfile", this.logAnalyticsProfile);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolResourceProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolResourceProperties.
+ */
+ public static ClusterPoolResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolResourceProperties deserializedClusterPoolResourceProperties
+ = new ClusterPoolResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("computeProfile".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.computeProfile
+ = ClusterPoolResourcePropertiesComputeProfile.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.provisioningState
+ = ProvisioningStatus.fromString(reader.getString());
+ } else if ("deploymentId".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.deploymentId = reader.getString();
+ } else if ("managedResourceGroupName".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.managedResourceGroupName = reader.getString();
+ } else if ("aksManagedResourceGroupName".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.aksManagedResourceGroupName = reader.getString();
+ } else if ("clusterPoolProfile".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.clusterPoolProfile
+ = ClusterPoolResourcePropertiesClusterPoolProfile.fromJson(reader);
+ } else if ("aksClusterProfile".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.aksClusterProfile
+ = ClusterPoolResourcePropertiesAksClusterProfile.fromJson(reader);
+ } else if ("networkProfile".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.networkProfile
+ = ClusterPoolResourcePropertiesNetworkProfile.fromJson(reader);
+ } else if ("logAnalyticsProfile".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.logAnalyticsProfile
+ = ClusterPoolResourcePropertiesLogAnalyticsProfile.fromJson(reader);
+ } else if ("status".equals(fieldName)) {
+ deserializedClusterPoolResourceProperties.status = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolResourceProperties;
+ });
+ }
}
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 e96e116036627..7f662fbee7506 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
@@ -5,18 +5,37 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Properties of underlying AKS cluster.
*/
@Fluent
public final class ClusterPoolResourcePropertiesAksClusterProfile extends AksClusterProfile {
+ /*
+ * AKS control plane and default node pool version of this ClusterPool
+ */
+ private String aksVersion;
+
/**
* Creates an instance of ClusterPoolResourcePropertiesAksClusterProfile class.
*/
public ClusterPoolResourcePropertiesAksClusterProfile() {
}
+ /**
+ * Get the aksVersion property: AKS control plane and default node pool version of this ClusterPool.
+ *
+ * @return the aksVersion value.
+ */
+ @Override
+ public String aksVersion() {
+ return this.aksVersion;
+ }
+
/**
* {@inheritDoc}
*/
@@ -45,4 +64,48 @@ public ClusterPoolResourcePropertiesAksClusterProfile withAksClusterAgentPoolIde
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("aksClusterResourceId", aksClusterResourceId());
+ jsonWriter.writeJsonField("aksClusterAgentPoolIdentityProfile", aksClusterAgentPoolIdentityProfile());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolResourcePropertiesAksClusterProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolResourcePropertiesAksClusterProfile if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolResourcePropertiesAksClusterProfile.
+ */
+ public static ClusterPoolResourcePropertiesAksClusterProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolResourcePropertiesAksClusterProfile deserializedClusterPoolResourcePropertiesAksClusterProfile
+ = new ClusterPoolResourcePropertiesAksClusterProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("aksClusterResourceId".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesAksClusterProfile
+ .withAksClusterResourceId(reader.getString());
+ } else if ("aksClusterAgentPoolIdentityProfile".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesAksClusterProfile.withAksClusterAgentPoolIdentityProfile(
+ AksClusterProfileAksClusterAgentPoolIdentityProfile.fromJson(reader));
+ } else if ("aksVersion".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesAksClusterProfile.aksVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolResourcePropertiesAksClusterProfile;
+ });
+ }
}
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 d9427758564ff..d3a20985bf0b9 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesClusterPoolProfile.java
@@ -5,6 +5,10 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* CLuster pool profile.
@@ -26,6 +30,15 @@ public ClusterPoolResourcePropertiesClusterPoolProfile withClusterPoolVersion(St
return this;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPoolResourcePropertiesClusterPoolProfile withPublicIpTag(IpTag publicIpTag) {
+ super.withPublicIpTag(publicIpTag);
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -35,4 +48,46 @@ public ClusterPoolResourcePropertiesClusterPoolProfile withClusterPoolVersion(St
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("clusterPoolVersion", clusterPoolVersion());
+ jsonWriter.writeJsonField("publicIpTag", publicIpTag());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolResourcePropertiesClusterPoolProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolResourcePropertiesClusterPoolProfile if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolResourcePropertiesClusterPoolProfile.
+ */
+ public static ClusterPoolResourcePropertiesClusterPoolProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolResourcePropertiesClusterPoolProfile deserializedClusterPoolResourcePropertiesClusterPoolProfile
+ = new ClusterPoolResourcePropertiesClusterPoolProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("clusterPoolVersion".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesClusterPoolProfile
+ .withClusterPoolVersion(reader.getString());
+ } else if ("publicIpTag".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesClusterPoolProfile.withPublicIpTag(IpTag.fromJson(reader));
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolResourcePropertiesClusterPoolProfile;
+ });
+ }
}
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 baf505e9af649..eac314a9a3da6 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolResourcePropertiesComputeProfile.java
@@ -5,18 +5,38 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
/**
* CLuster pool compute profile.
*/
@Fluent
public final class ClusterPoolResourcePropertiesComputeProfile extends ClusterPoolComputeProfile {
+ /*
+ * The number of virtual machines.
+ */
+ private Integer count;
+
/**
* Creates an instance of ClusterPoolResourcePropertiesComputeProfile class.
*/
public ClusterPoolResourcePropertiesComputeProfile() {
}
+ /**
+ * Get the count property: The number of virtual machines.
+ *
+ * @return the count value.
+ */
+ @Override
+ public Integer count() {
+ return this.count;
+ }
+
/**
* {@inheritDoc}
*/
@@ -26,6 +46,15 @@ public ClusterPoolResourcePropertiesComputeProfile withVmSize(String vmSize) {
return this;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ClusterPoolResourcePropertiesComputeProfile withAvailabilityZones(List availabilityZones) {
+ super.withAvailabilityZones(availabilityZones);
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -35,4 +64,50 @@ public ClusterPoolResourcePropertiesComputeProfile withVmSize(String vmSize) {
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("vmSize", vmSize());
+ jsonWriter.writeArrayField("availabilityZones", availabilityZones(),
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolResourcePropertiesComputeProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolResourcePropertiesComputeProfile if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolResourcePropertiesComputeProfile.
+ */
+ public static ClusterPoolResourcePropertiesComputeProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolResourcePropertiesComputeProfile deserializedClusterPoolResourcePropertiesComputeProfile
+ = new ClusterPoolResourcePropertiesComputeProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("vmSize".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesComputeProfile.withVmSize(reader.getString());
+ } else if ("count".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesComputeProfile.count
+ = reader.getNullable(JsonReader::getInt);
+ } else if ("availabilityZones".equals(fieldName)) {
+ List availabilityZones = reader.readArray(reader1 -> reader1.getString());
+ deserializedClusterPoolResourcePropertiesComputeProfile.withAvailabilityZones(availabilityZones);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolResourcePropertiesComputeProfile;
+ });
+ }
}
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 c10da9fdd989b..fb1e25006d4c8 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
@@ -5,6 +5,10 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster pool log analytics profile to enable OMS agent for AKS cluster.
@@ -44,4 +48,45 @@ public ClusterPoolResourcePropertiesLogAnalyticsProfile withWorkspaceId(String w
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", enabled());
+ jsonWriter.writeStringField("workspaceId", workspaceId());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolResourcePropertiesLogAnalyticsProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolResourcePropertiesLogAnalyticsProfile if the JsonReader was pointing to an
+ * instance of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolResourcePropertiesLogAnalyticsProfile.
+ */
+ public static ClusterPoolResourcePropertiesLogAnalyticsProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolResourcePropertiesLogAnalyticsProfile deserializedClusterPoolResourcePropertiesLogAnalyticsProfile
+ = new ClusterPoolResourcePropertiesLogAnalyticsProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enabled".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesLogAnalyticsProfile.withEnabled(reader.getBoolean());
+ } else if ("workspaceId".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesLogAnalyticsProfile.withWorkspaceId(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolResourcePropertiesLogAnalyticsProfile;
+ });
+ }
}
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 0818eb9fb0720..d2614cc53c75a 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,6 +5,10 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
@@ -64,4 +68,56 @@ public ClusterPoolResourcePropertiesNetworkProfile withEnablePrivateApiServer(Bo
public void validate() {
super.validate();
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("subnetId", subnetId());
+ jsonWriter.writeStringField("outboundType", outboundType() == null ? null : outboundType().toString());
+ jsonWriter.writeBooleanField("enablePrivateApiServer", enablePrivateApiServer());
+ jsonWriter.writeArrayField("apiServerAuthorizedIpRanges", apiServerAuthorizedIpRanges(),
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolResourcePropertiesNetworkProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolResourcePropertiesNetworkProfile if the JsonReader was pointing to an instance
+ * of it, or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolResourcePropertiesNetworkProfile.
+ */
+ public static ClusterPoolResourcePropertiesNetworkProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolResourcePropertiesNetworkProfile deserializedClusterPoolResourcePropertiesNetworkProfile
+ = new ClusterPoolResourcePropertiesNetworkProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("subnetId".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesNetworkProfile.withSubnetId(reader.getString());
+ } else if ("outboundType".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesNetworkProfile
+ .withOutboundType(OutboundType.fromString(reader.getString()));
+ } else if ("enablePrivateApiServer".equals(fieldName)) {
+ deserializedClusterPoolResourcePropertiesNetworkProfile
+ .withEnablePrivateApiServer(reader.getNullable(JsonReader::getBoolean));
+ } else if ("apiServerAuthorizedIpRanges".equals(fieldName)) {
+ List apiServerAuthorizedIpRanges = reader.readArray(reader1 -> reader1.getString());
+ deserializedClusterPoolResourcePropertiesNetworkProfile
+ .withApiServerAuthorizedIpRanges(apiServerAuthorizedIpRanges);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolResourcePropertiesNetworkProfile;
+ });
+ }
}
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
index dc7cd829b9692..56e67b73425eb 100644
--- 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
@@ -6,17 +6,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster Pool Upgrade.
*/
@Fluent
-public final class ClusterPoolUpgrade {
+public final class ClusterPoolUpgrade implements JsonSerializable {
/*
* Properties of upgrading cluster pool.
*/
- @JsonProperty(value = "properties", required = true)
private ClusterPoolUpgradeProperties properties;
/**
@@ -52,12 +55,49 @@ public ClusterPoolUpgrade withProperties(ClusterPoolUpgradeProperties properties
*/
public void validate() {
if (properties() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property properties in model ClusterPoolUpgrade"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property properties in model ClusterPoolUpgrade"));
} else {
properties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolUpgrade.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolUpgrade from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolUpgrade if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolUpgrade.
+ */
+ public static ClusterPoolUpgrade fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolUpgrade deserializedClusterPoolUpgrade = new ClusterPoolUpgrade();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedClusterPoolUpgrade.properties = ClusterPoolUpgradeProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolUpgrade;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistories.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistories.java
new file mode 100644
index 0000000000000..003ce6e7906b4
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistories.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 ClusterPoolUpgradeHistories.
+ */
+public interface ClusterPoolUpgradeHistories {
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String clusterPoolName);
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster pool upgrade history 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/ClusterPoolUpgradeHistory.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistory.java
new file mode 100644
index 0000000000000..e1ff4c92016a0
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistory.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.ClusterPoolUpgradeHistoryInner;
+
+/**
+ * An immutable client-side representation of ClusterPoolUpgradeHistory.
+ */
+public interface ClusterPoolUpgradeHistory {
+ /**
+ * 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 pool upgrade history.
+ *
+ * @return the properties value.
+ */
+ ClusterPoolUpgradeHistoryProperties 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.ClusterPoolUpgradeHistoryInner
+ * object.
+ *
+ * @return the inner object.
+ */
+ ClusterPoolUpgradeHistoryInner innerModel();
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryListResult.java
new file mode 100644
index 0000000000000..c78dcccafdb6d
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryListResult.java
@@ -0,0 +1,126 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolUpgradeHistoryInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents a list of cluster pool upgrade history.
+ */
+@Fluent
+public final class ClusterPoolUpgradeHistoryListResult
+ implements JsonSerializable {
+ /*
+ * The list of cluster pool upgrade history.
+ */
+ private List value;
+
+ /*
+ * The link (url) to the next page of results.
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of ClusterPoolUpgradeHistoryListResult class.
+ */
+ public ClusterPoolUpgradeHistoryListResult() {
+ }
+
+ /**
+ * Get the value property: The list of cluster pool upgrade history.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The list of cluster pool upgrade history.
+ *
+ * @param value the value value to set.
+ * @return the ClusterPoolUpgradeHistoryListResult object itself.
+ */
+ public ClusterPoolUpgradeHistoryListResult withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The link (url) to the next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property value in model ClusterPoolUpgradeHistoryListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolUpgradeHistoryListResult.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolUpgradeHistoryListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolUpgradeHistoryListResult if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolUpgradeHistoryListResult.
+ */
+ public static ClusterPoolUpgradeHistoryListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolUpgradeHistoryListResult deserializedClusterPoolUpgradeHistoryListResult
+ = new ClusterPoolUpgradeHistoryListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ClusterPoolUpgradeHistoryInner.fromJson(reader1));
+ deserializedClusterPoolUpgradeHistoryListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolUpgradeHistoryListResult;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..24c6851743b80
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryProperties.java
@@ -0,0 +1,184 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Properties of cluster pool upgrade history.
+ */
+@Fluent
+public class ClusterPoolUpgradeHistoryProperties implements JsonSerializable {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolUpgradeHistoryType upgradeType
+ = ClusterPoolUpgradeHistoryType.fromString("ClusterPoolUpgradeHistoryProperties");
+
+ /*
+ * Time when created this upgrade history.
+ */
+ private String utcTime;
+
+ /*
+ * Result of this upgrade.
+ */
+ private ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult;
+
+ /**
+ * Creates an instance of ClusterPoolUpgradeHistoryProperties class.
+ */
+ public ClusterPoolUpgradeHistoryProperties() {
+ }
+
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ public ClusterPoolUpgradeHistoryType upgradeType() {
+ return this.upgradeType;
+ }
+
+ /**
+ * Get the utcTime property: Time when created this upgrade history.
+ *
+ * @return the utcTime value.
+ */
+ public String utcTime() {
+ return this.utcTime;
+ }
+
+ /**
+ * Set the utcTime property: Time when created this upgrade history.
+ *
+ * @param utcTime the utcTime value to set.
+ * @return the ClusterPoolUpgradeHistoryProperties object itself.
+ */
+ public ClusterPoolUpgradeHistoryProperties withUtcTime(String utcTime) {
+ this.utcTime = utcTime;
+ return this;
+ }
+
+ /**
+ * Get the upgradeResult property: Result of this upgrade.
+ *
+ * @return the upgradeResult value.
+ */
+ public ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult() {
+ return this.upgradeResult;
+ }
+
+ /**
+ * Set the upgradeResult property: Result of this upgrade.
+ *
+ * @param upgradeResult the upgradeResult value to set.
+ * @return the ClusterPoolUpgradeHistoryProperties object itself.
+ */
+ public ClusterPoolUpgradeHistoryProperties
+ withUpgradeResult(ClusterPoolUpgradeHistoryUpgradeResultType upgradeResult) {
+ this.upgradeResult = upgradeResult;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (utcTime() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property utcTime in model ClusterPoolUpgradeHistoryProperties"));
+ }
+ if (upgradeResult() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property upgradeResult in model ClusterPoolUpgradeHistoryProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterPoolUpgradeHistoryProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("utcTime", this.utcTime);
+ jsonWriter.writeStringField("upgradeResult", this.upgradeResult == null ? null : this.upgradeResult.toString());
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolUpgradeHistoryProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolUpgradeHistoryProperties if the JsonReader was pointing to an instance of it,
+ * or null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPoolUpgradeHistoryProperties.
+ */
+ public static ClusterPoolUpgradeHistoryProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("upgradeType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("NodeOsUpgrade".equals(discriminatorValue)) {
+ return ClusterPoolNodeOsUpgradeHistoryProperties.fromJson(readerToUse.reset());
+ } else if ("AKSPatchUpgrade".equals(discriminatorValue)) {
+ return ClusterPoolAksPatchUpgradeHistoryProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterPoolUpgradeHistoryProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolUpgradeHistoryProperties deserializedClusterPoolUpgradeHistoryProperties
+ = new ClusterPoolUpgradeHistoryProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("utcTime".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryProperties.utcTime = reader.getString();
+ } else if ("upgradeResult".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryProperties.upgradeResult
+ = ClusterPoolUpgradeHistoryUpgradeResultType.fromString(reader.getString());
+ } else if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolUpgradeHistoryProperties.upgradeType
+ = ClusterPoolUpgradeHistoryType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolUpgradeHistoryProperties;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryType.java
new file mode 100644
index 0000000000000..8d9f3af4f7a01
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryType.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.hdinsight.containers.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Type of upgrade.
+ */
+public final class ClusterPoolUpgradeHistoryType extends ExpandableStringEnum {
+ /**
+ * Static value AKSPatchUpgrade for ClusterPoolUpgradeHistoryType.
+ */
+ public static final ClusterPoolUpgradeHistoryType AKSPATCH_UPGRADE = fromString("AKSPatchUpgrade");
+
+ /**
+ * Static value NodeOsUpgrade for ClusterPoolUpgradeHistoryType.
+ */
+ public static final ClusterPoolUpgradeHistoryType NODE_OS_UPGRADE = fromString("NodeOsUpgrade");
+
+ /**
+ * Creates a new instance of ClusterPoolUpgradeHistoryType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ClusterPoolUpgradeHistoryType() {
+ }
+
+ /**
+ * Creates or finds a ClusterPoolUpgradeHistoryType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ClusterPoolUpgradeHistoryType.
+ */
+ public static ClusterPoolUpgradeHistoryType fromString(String name) {
+ return fromString(name, ClusterPoolUpgradeHistoryType.class);
+ }
+
+ /**
+ * Gets known ClusterPoolUpgradeHistoryType values.
+ *
+ * @return known ClusterPoolUpgradeHistoryType values.
+ */
+ public static Collection values() {
+ return values(ClusterPoolUpgradeHistoryType.class);
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryUpgradeResultType.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryUpgradeResultType.java
new file mode 100644
index 0000000000000..1e4f0ec9e8e58
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolUpgradeHistoryUpgradeResultType.java
@@ -0,0 +1,52 @@
+// Copyright (c) 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 java.util.Collection;
+
+/**
+ * Result of this upgrade.
+ */
+public final class ClusterPoolUpgradeHistoryUpgradeResultType
+ extends ExpandableStringEnum {
+ /**
+ * Static value Succeed for ClusterPoolUpgradeHistoryUpgradeResultType.
+ */
+ public static final ClusterPoolUpgradeHistoryUpgradeResultType SUCCEED = fromString("Succeed");
+
+ /**
+ * Static value Failed for ClusterPoolUpgradeHistoryUpgradeResultType.
+ */
+ public static final ClusterPoolUpgradeHistoryUpgradeResultType FAILED = fromString("Failed");
+
+ /**
+ * Creates a new instance of ClusterPoolUpgradeHistoryUpgradeResultType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ClusterPoolUpgradeHistoryUpgradeResultType() {
+ }
+
+ /**
+ * Creates or finds a ClusterPoolUpgradeHistoryUpgradeResultType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ClusterPoolUpgradeHistoryUpgradeResultType.
+ */
+ public static ClusterPoolUpgradeHistoryUpgradeResultType fromString(String name) {
+ return fromString(name, ClusterPoolUpgradeHistoryUpgradeResultType.class);
+ }
+
+ /**
+ * Gets known ClusterPoolUpgradeHistoryUpgradeResultType values.
+ *
+ * @return known ClusterPoolUpgradeHistoryUpgradeResultType values.
+ */
+ public static Collection values() {
+ return values(ClusterPoolUpgradeHistoryUpgradeResultType.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
index 9d6dd3bbe8945..21345e492c550 100644
--- 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
@@ -5,30 +5,37 @@
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;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* 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 {
+public class ClusterPoolUpgradeProperties implements JsonSerializable {
+ /*
+ * Type of upgrade.
+ */
+ private ClusterPoolUpgradeType upgradeType = ClusterPoolUpgradeType.fromString("ClusterPoolUpgradeProperties");
+
/**
* Creates an instance of ClusterPoolUpgradeProperties class.
*/
public ClusterPoolUpgradeProperties() {
}
+ /**
+ * Get the upgradeType property: Type of upgrade.
+ *
+ * @return the upgradeType value.
+ */
+ public ClusterPoolUpgradeType upgradeType() {
+ return this.upgradeType;
+ }
+
/**
* Validates the instance.
*
@@ -36,4 +43,68 @@ public ClusterPoolUpgradeProperties() {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("upgradeType", this.upgradeType == null ? null : this.upgradeType.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolUpgradeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolUpgradeProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolUpgradeProperties.
+ */
+ public static ClusterPoolUpgradeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("upgradeType".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("AKSPatchUpgrade".equals(discriminatorValue)) {
+ return ClusterPoolAksPatchVersionUpgradeProperties.fromJson(readerToUse.reset());
+ } else if ("NodeOsUpgrade".equals(discriminatorValue)) {
+ return ClusterPoolNodeOsImageUpdateProperties.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ static ClusterPoolUpgradeProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolUpgradeProperties deserializedClusterPoolUpgradeProperties = new ClusterPoolUpgradeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("upgradeType".equals(fieldName)) {
+ deserializedClusterPoolUpgradeProperties.upgradeType
+ = ClusterPoolUpgradeType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolUpgradeProperties;
+ });
+ }
}
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
index 5e994c5888060..e3db56ca48da3 100644
--- 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
@@ -5,7 +5,6 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/**
@@ -37,7 +36,6 @@ public ClusterPoolUpgradeType() {
* @param name a name to look for.
* @return the corresponding ClusterPoolUpgradeType.
*/
- @JsonCreator
public static ClusterPoolUpgradeType fromString(String name) {
return fromString(name, ClusterPoolUpgradeType.class);
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionProperties.java
index 332f7e128f23f..492967f31ecb1 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterPoolVersionProperties.java
@@ -5,29 +5,30 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster pool version properties.
*/
@Fluent
-public final class ClusterPoolVersionProperties {
+public final class ClusterPoolVersionProperties implements JsonSerializable {
/*
* Cluster pool version is a 2-part version.
*/
- @JsonProperty(value = "clusterPoolVersion")
private String clusterPoolVersion;
/*
* AKS version.
*/
- @JsonProperty(value = "aksVersion")
private String aksVersion;
/*
* Indicate if this version is in preview or not.
*/
- @JsonProperty(value = "isPreview")
private Boolean isPreview;
/**
@@ -103,4 +104,46 @@ public ClusterPoolVersionProperties withIsPreview(Boolean isPreview) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("clusterPoolVersion", this.clusterPoolVersion);
+ jsonWriter.writeStringField("aksVersion", this.aksVersion);
+ jsonWriter.writeBooleanField("isPreview", this.isPreview);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolVersionProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolVersionProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolVersionProperties.
+ */
+ public static ClusterPoolVersionProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolVersionProperties deserializedClusterPoolVersionProperties = new ClusterPoolVersionProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("clusterPoolVersion".equals(fieldName)) {
+ deserializedClusterPoolVersionProperties.clusterPoolVersion = reader.getString();
+ } else if ("aksVersion".equals(fieldName)) {
+ deserializedClusterPoolVersionProperties.aksVersion = reader.getString();
+ } else if ("isPreview".equals(fieldName)) {
+ deserializedClusterPoolVersionProperties.isPreview = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolVersionProperties;
+ });
+ }
}
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 36c3dd2ce9541..f33e891759343 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
@@ -5,25 +5,27 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterPoolVersionInner;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import java.io.IOException;
import java.util.List;
/**
* Represents a list of cluster pool versions.
*/
@Fluent
-public final class ClusterPoolVersionsListResult {
+public final class ClusterPoolVersionsListResult implements JsonSerializable {
/*
* The list of cluster pool versions.
*/
- @JsonProperty(value = "value")
private List value;
/*
* The link (url) to the next page of results.
*/
- @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
private String nextLink;
/**
@@ -71,4 +73,45 @@ public void validate() {
value().forEach(e -> e.validate());
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPoolVersionsListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPoolVersionsListResult if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ClusterPoolVersionsListResult.
+ */
+ public static ClusterPoolVersionsListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPoolVersionsListResult deserializedClusterPoolVersionsListResult
+ = new ClusterPoolVersionsListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ClusterPoolVersionInner.fromJson(reader1));
+ deserializedClusterPoolVersionsListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterPoolVersionsListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPoolVersionsListResult;
+ });
+ }
}
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 3cec54a993703..6d42cd3a096cc 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
@@ -6,8 +6,11 @@
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.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -15,140 +18,120 @@
* Cluster profile.
*/
@Fluent
-public final class ClusterProfile {
+public final class ClusterProfile implements JsonSerializable {
/*
* Version with 3/4 part.
*/
- @JsonProperty(value = "clusterVersion", required = true)
private String clusterVersion;
/*
* Version with three part.
*/
- @JsonProperty(value = "ossVersion", required = true)
private String ossVersion;
/*
* Component list of this cluster type and version.
*/
- @JsonProperty(value = "components", access = JsonProperty.Access.WRITE_ONLY)
private List components;
/*
- * This property is required by Trino, Spark and Flink cluster but is optional for Kafka cluster.
+ * This is deprecated. Please use managed identity profile instead.
*/
- @JsonProperty(value = "identityProfile")
private IdentityProfile identityProfile;
+ /*
+ * This property is required by Trino, Spark and Flink cluster but is optional for Kafka cluster.
+ */
+ private ManagedIdentityProfile managedIdentityProfile;
+
/*
* Authorization profile with details of AAD user Ids and group Ids authorized for data plane access.
*/
- @JsonProperty(value = "authorizationProfile", required = true)
private AuthorizationProfile authorizationProfile;
/*
* The cluster secret profile.
*/
- @JsonProperty(value = "secretsProfile")
private SecretsProfile secretsProfile;
/*
* The service configs profiles.
*/
- @JsonProperty(value = "serviceConfigsProfiles")
private List serviceConfigsProfiles;
/*
* Cluster connectivity profile.
*/
- @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.
*/
- @JsonProperty(value = "logAnalyticsProfile")
private ClusterLogAnalyticsProfile logAnalyticsProfile;
/*
* Cluster Prometheus profile.
*/
- @JsonProperty(value = "prometheusProfile")
private ClusterPrometheusProfile prometheusProfile;
/*
* Ssh profile for the cluster.
*/
- @JsonProperty(value = "sshProfile")
private SshProfile sshProfile;
/*
- * 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.
*/
- @JsonProperty(value = "autoscaleProfile")
private AutoscaleProfile autoscaleProfile;
/*
* Cluster Ranger plugin profile.
*/
- @JsonProperty(value = "rangerPluginProfile")
private ClusterRangerPluginProfile rangerPluginProfile;
/*
* The Kafka cluster profile.
*/
- @JsonProperty(value = "kafkaProfile")
private KafkaProfile kafkaProfile;
/*
* Trino Cluster profile.
*/
- @JsonProperty(value = "trinoProfile")
private TrinoProfile trinoProfile;
/*
* LLAP cluster profile.
*/
- @JsonProperty(value = "llapProfile")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map llapProfile;
/*
* The Flink cluster profile.
*/
- @JsonProperty(value = "flinkProfile")
private FlinkProfile flinkProfile;
/*
* The spark cluster profile.
*/
- @JsonProperty(value = "sparkProfile")
private SparkProfile sparkProfile;
/*
* The ranger cluster profile.
*/
- @JsonProperty(value = "rangerProfile")
private RangerProfile rangerProfile;
/*
* Stub cluster profile.
*/
- @JsonProperty(value = "stubProfile")
- @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map stubProfile;
/*
* The script action profile list.
*/
- @JsonProperty(value = "scriptActionProfiles")
private List scriptActionProfiles;
/**
@@ -207,8 +190,7 @@ public List components() {
}
/**
- * Get the identityProfile property: This property is required by Trino, Spark and Flink cluster but is optional
- * for Kafka cluster.
+ * Get the identityProfile property: This is deprecated. Please use managed identity profile instead.
*
* @return the identityProfile value.
*/
@@ -217,8 +199,7 @@ public IdentityProfile identityProfile() {
}
/**
- * Set the identityProfile property: This property is required by Trino, Spark and Flink cluster but is optional
- * for Kafka cluster.
+ * Set the identityProfile property: This is deprecated. Please use managed identity profile instead.
*
* @param identityProfile the identityProfile value to set.
* @return the ClusterProfile object itself.
@@ -228,6 +209,28 @@ public ClusterProfile withIdentityProfile(IdentityProfile identityProfile) {
return this;
}
+ /**
+ * Get the managedIdentityProfile property: This property is required by Trino, Spark and Flink cluster but is
+ * optional for Kafka cluster.
+ *
+ * @return the managedIdentityProfile value.
+ */
+ public ManagedIdentityProfile managedIdentityProfile() {
+ return this.managedIdentityProfile;
+ }
+
+ /**
+ * Set the managedIdentityProfile property: This property is required by Trino, Spark and Flink cluster but is
+ * optional for Kafka cluster.
+ *
+ * @param managedIdentityProfile the managedIdentityProfile value to set.
+ * @return the ClusterProfile object itself.
+ */
+ public ClusterProfile withManagedIdentityProfile(ManagedIdentityProfile managedIdentityProfile) {
+ this.managedIdentityProfile = managedIdentityProfile;
+ return this;
+ }
+
/**
* Get the authorizationProfile property: Authorization profile with details of AAD user Ids and group Ids
* authorized for data plane access.
@@ -588,12 +591,12 @@ public ClusterProfile withScriptActionProfiles(List scriptA
*/
public void validate() {
if (clusterVersion() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property clusterVersion in model ClusterProfile"));
+ throw LOGGER.atError()
+ .log(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.atError()
+ .log(new IllegalArgumentException("Missing required property ossVersion in model ClusterProfile"));
}
if (components() != null) {
components().forEach(e -> e.validate());
@@ -601,9 +604,13 @@ public void validate() {
if (identityProfile() != null) {
identityProfile().validate();
}
+ if (managedIdentityProfile() != null) {
+ managedIdentityProfile().validate();
+ }
if (authorizationProfile() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property authorizationProfile in model ClusterProfile"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property authorizationProfile in model ClusterProfile"));
} else {
authorizationProfile().validate();
}
@@ -655,4 +662,115 @@ public void validate() {
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterProfile.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("clusterVersion", this.clusterVersion);
+ jsonWriter.writeStringField("ossVersion", this.ossVersion);
+ jsonWriter.writeJsonField("authorizationProfile", this.authorizationProfile);
+ jsonWriter.writeJsonField("identityProfile", this.identityProfile);
+ jsonWriter.writeJsonField("managedIdentityProfile", this.managedIdentityProfile);
+ jsonWriter.writeJsonField("secretsProfile", this.secretsProfile);
+ jsonWriter.writeArrayField("serviceConfigsProfiles", this.serviceConfigsProfiles,
+ (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeJsonField("clusterAccessProfile", this.clusterAccessProfile);
+ jsonWriter.writeJsonField("logAnalyticsProfile", this.logAnalyticsProfile);
+ jsonWriter.writeJsonField("prometheusProfile", this.prometheusProfile);
+ jsonWriter.writeJsonField("sshProfile", this.sshProfile);
+ jsonWriter.writeJsonField("autoscaleProfile", this.autoscaleProfile);
+ jsonWriter.writeJsonField("rangerPluginProfile", this.rangerPluginProfile);
+ jsonWriter.writeJsonField("kafkaProfile", this.kafkaProfile);
+ jsonWriter.writeJsonField("trinoProfile", this.trinoProfile);
+ jsonWriter.writeMapField("llapProfile", this.llapProfile, (writer, element) -> writer.writeUntyped(element));
+ jsonWriter.writeJsonField("flinkProfile", this.flinkProfile);
+ jsonWriter.writeJsonField("sparkProfile", this.sparkProfile);
+ jsonWriter.writeJsonField("rangerProfile", this.rangerProfile);
+ jsonWriter.writeMapField("stubProfile", this.stubProfile, (writer, element) -> writer.writeUntyped(element));
+ jsonWriter.writeArrayField("scriptActionProfiles", this.scriptActionProfiles,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterProfile if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterProfile.
+ */
+ public static ClusterProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterProfile deserializedClusterProfile = new ClusterProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("clusterVersion".equals(fieldName)) {
+ deserializedClusterProfile.clusterVersion = reader.getString();
+ } else if ("ossVersion".equals(fieldName)) {
+ deserializedClusterProfile.ossVersion = reader.getString();
+ } else if ("authorizationProfile".equals(fieldName)) {
+ deserializedClusterProfile.authorizationProfile = AuthorizationProfile.fromJson(reader);
+ } else if ("components".equals(fieldName)) {
+ List components
+ = reader.readArray(reader1 -> ClusterComponentsItem.fromJson(reader1));
+ deserializedClusterProfile.components = components;
+ } else if ("identityProfile".equals(fieldName)) {
+ deserializedClusterProfile.identityProfile = IdentityProfile.fromJson(reader);
+ } else if ("managedIdentityProfile".equals(fieldName)) {
+ deserializedClusterProfile.managedIdentityProfile = ManagedIdentityProfile.fromJson(reader);
+ } else if ("secretsProfile".equals(fieldName)) {
+ deserializedClusterProfile.secretsProfile = SecretsProfile.fromJson(reader);
+ } else if ("serviceConfigsProfiles".equals(fieldName)) {
+ List serviceConfigsProfiles
+ = reader.readArray(reader1 -> ClusterServiceConfigsProfile.fromJson(reader1));
+ deserializedClusterProfile.serviceConfigsProfiles = serviceConfigsProfiles;
+ } else if ("connectivityProfile".equals(fieldName)) {
+ deserializedClusterProfile.connectivityProfile = ConnectivityProfile.fromJson(reader);
+ } else if ("clusterAccessProfile".equals(fieldName)) {
+ deserializedClusterProfile.clusterAccessProfile = ClusterAccessProfile.fromJson(reader);
+ } else if ("logAnalyticsProfile".equals(fieldName)) {
+ deserializedClusterProfile.logAnalyticsProfile = ClusterLogAnalyticsProfile.fromJson(reader);
+ } else if ("prometheusProfile".equals(fieldName)) {
+ deserializedClusterProfile.prometheusProfile = ClusterPrometheusProfile.fromJson(reader);
+ } else if ("sshProfile".equals(fieldName)) {
+ deserializedClusterProfile.sshProfile = SshProfile.fromJson(reader);
+ } else if ("autoscaleProfile".equals(fieldName)) {
+ deserializedClusterProfile.autoscaleProfile = AutoscaleProfile.fromJson(reader);
+ } else if ("rangerPluginProfile".equals(fieldName)) {
+ deserializedClusterProfile.rangerPluginProfile = ClusterRangerPluginProfile.fromJson(reader);
+ } else if ("kafkaProfile".equals(fieldName)) {
+ deserializedClusterProfile.kafkaProfile = KafkaProfile.fromJson(reader);
+ } else if ("trinoProfile".equals(fieldName)) {
+ deserializedClusterProfile.trinoProfile = TrinoProfile.fromJson(reader);
+ } else if ("llapProfile".equals(fieldName)) {
+ Map llapProfile = reader.readMap(reader1 -> reader1.readUntyped());
+ deserializedClusterProfile.llapProfile = llapProfile;
+ } else if ("flinkProfile".equals(fieldName)) {
+ deserializedClusterProfile.flinkProfile = FlinkProfile.fromJson(reader);
+ } else if ("sparkProfile".equals(fieldName)) {
+ deserializedClusterProfile.sparkProfile = SparkProfile.fromJson(reader);
+ } else if ("rangerProfile".equals(fieldName)) {
+ deserializedClusterProfile.rangerProfile = RangerProfile.fromJson(reader);
+ } else if ("stubProfile".equals(fieldName)) {
+ Map stubProfile = reader.readMap(reader1 -> reader1.readUntyped());
+ deserializedClusterProfile.stubProfile = stubProfile;
+ } else if ("scriptActionProfiles".equals(fieldName)) {
+ List scriptActionProfiles
+ = reader.readArray(reader1 -> ScriptActionProfile.fromJson(reader1));
+ deserializedClusterProfile.scriptActionProfiles = scriptActionProfiles;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterProfile;
+ });
+ }
}
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 5d8c9385b8e9e..c1bf21d5bc92e 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
@@ -5,17 +5,20 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster Prometheus profile.
*/
@Fluent
-public final class ClusterPrometheusProfile {
+public final class ClusterPrometheusProfile implements JsonSerializable {
/*
* Enable Prometheus for cluster or not.
*/
- @JsonProperty(value = "enabled", required = true)
private boolean enabled;
/**
@@ -51,4 +54,41 @@ public ClusterPrometheusProfile withEnabled(boolean enabled) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterPrometheusProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterPrometheusProfile if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterPrometheusProfile.
+ */
+ public static ClusterPrometheusProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterPrometheusProfile deserializedClusterPrometheusProfile = new ClusterPrometheusProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enabled".equals(fieldName)) {
+ deserializedClusterPrometheusProfile.enabled = reader.getBoolean();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterPrometheusProfile;
+ });
+ }
}
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
index 6b1ca1d3bdaee..54f20a152d1bb 100644
--- 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
@@ -5,17 +5,20 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster Ranger plugin profile.
*/
@Fluent
-public final class ClusterRangerPluginProfile {
+public final class ClusterRangerPluginProfile implements JsonSerializable {
/*
* Enable Ranger for cluster or not.
*/
- @JsonProperty(value = "enabled", required = true)
private boolean enabled;
/**
@@ -51,4 +54,41 @@ public ClusterRangerPluginProfile withEnabled(boolean enabled) {
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeBooleanField("enabled", this.enabled);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterRangerPluginProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterRangerPluginProfile if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterRangerPluginProfile.
+ */
+ public static ClusterRangerPluginProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterRangerPluginProfile deserializedClusterRangerPluginProfile = new ClusterRangerPluginProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("enabled".equals(fieldName)) {
+ deserializedClusterRangerPluginProfile.enabled = reader.getBoolean();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterRangerPluginProfile;
+ });
+ }
}
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 2cba09175ef03..d5d94c97b2c76 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
@@ -7,7 +7,10 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.Map;
/**
@@ -18,15 +21,28 @@ public final class ClusterResizeData extends Resource {
/*
* Sets the properties. Define cluster resize specific properties.
*/
- @JsonProperty(value = "properties")
private ClusterResizeProperties properties;
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
- @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
private SystemData systemData;
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
/**
* Creates an instance of ClusterResizeData class.
*/
@@ -62,6 +78,36 @@ public SystemData systemData() {
return this.systemData;
}
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
/**
* {@inheritDoc}
*/
@@ -90,4 +136,56 @@ public void validate() {
properties().validate();
}
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterResizeData from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterResizeData if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterResizeData.
+ */
+ public static ClusterResizeData fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterResizeData deserializedClusterResizeData = new ClusterResizeData();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedClusterResizeData.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedClusterResizeData.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedClusterResizeData.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedClusterResizeData.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedClusterResizeData.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedClusterResizeData.properties = ClusterResizeProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedClusterResizeData.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterResizeData;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeProperties.java
index 9dfc66d83c115..94f6a1d274c52 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResizeProperties.java
@@ -5,17 +5,20 @@
package com.azure.resourcemanager.hdinsight.containers.models;
import com.azure.core.annotation.Fluent;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* The properties for resizing a cluster.
*/
@Fluent
-public final class ClusterResizeProperties {
+public final class ClusterResizeProperties implements JsonSerializable {
/*
* Target node count of worker node.
*/
- @JsonProperty(value = "targetWorkerNodeCount", required = true)
private int targetWorkerNodeCount;
/**
@@ -51,4 +54,41 @@ public ClusterResizeProperties withTargetWorkerNodeCount(int targetWorkerNodeCou
*/
public void validate() {
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeIntField("targetWorkerNodeCount", this.targetWorkerNodeCount);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterResizeProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterResizeProperties if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterResizeProperties.
+ */
+ public static ClusterResizeProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterResizeProperties deserializedClusterResizeProperties = new ClusterResizeProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("targetWorkerNodeCount".equals(fieldName)) {
+ deserializedClusterResizeProperties.targetWorkerNodeCount = reader.getInt();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterResizeProperties;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResourceProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResourceProperties.java
index c978bdfc06d39..e052ce230be92 100644
--- a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResourceProperties.java
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterResourceProperties.java
@@ -6,47 +6,45 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster resource properties.
*/
@Fluent
-public final class ClusterResourceProperties {
+public final class ClusterResourceProperties implements JsonSerializable {
/*
* Provisioning state of the resource.
*/
- @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private ProvisioningStatus provisioningState;
/*
* The type of cluster.
*/
- @JsonProperty(value = "clusterType", required = true)
private String clusterType;
/*
* A unique id generated by the RP to identify the resource.
*/
- @JsonProperty(value = "deploymentId", access = JsonProperty.Access.WRITE_ONLY)
private String deploymentId;
/*
* The compute profile.
*/
- @JsonProperty(value = "computeProfile", required = true)
private ComputeProfile computeProfile;
/*
* Cluster profile.
*/
- @JsonProperty(value = "clusterProfile", required = true)
private ClusterProfile clusterProfile;
/*
* Business status of the resource.
*/
- @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
private String status;
/**
@@ -149,22 +147,75 @@ public String status() {
*/
public void validate() {
if (clusterType() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property clusterType in model ClusterResourceProperties"));
+ throw LOGGER.atError()
+ .log(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.atError()
+ .log(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.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property clusterProfile in model ClusterResourceProperties"));
} else {
clusterProfile().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterResourceProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("clusterType", this.clusterType);
+ jsonWriter.writeJsonField("computeProfile", this.computeProfile);
+ jsonWriter.writeJsonField("clusterProfile", this.clusterProfile);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterResourceProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterResourceProperties if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterResourceProperties.
+ */
+ public static ClusterResourceProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterResourceProperties deserializedClusterResourceProperties = new ClusterResourceProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("clusterType".equals(fieldName)) {
+ deserializedClusterResourceProperties.clusterType = reader.getString();
+ } else if ("computeProfile".equals(fieldName)) {
+ deserializedClusterResourceProperties.computeProfile = ComputeProfile.fromJson(reader);
+ } else if ("clusterProfile".equals(fieldName)) {
+ deserializedClusterResourceProperties.clusterProfile = ClusterProfile.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedClusterResourceProperties.provisioningState
+ = ProvisioningStatus.fromString(reader.getString());
+ } else if ("deploymentId".equals(fieldName)) {
+ deserializedClusterResourceProperties.deploymentId = reader.getString();
+ } else if ("status".equals(fieldName)) {
+ deserializedClusterResourceProperties.status = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterResourceProperties;
+ });
+ }
}
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 cab411ac9a961..0fd69aa529c1b 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
@@ -6,24 +6,26 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Cluster configs per component.
*/
@Fluent
-public final class ClusterServiceConfig {
+public final class ClusterServiceConfig implements JsonSerializable {
/*
* Name of the component the config files should apply to.
*/
- @JsonProperty(value = "component", required = true)
private String component;
/*
* List of Config Files.
*/
- @JsonProperty(value = "files", required = true)
private List files;
/**
@@ -79,16 +81,57 @@ public ClusterServiceConfig withFiles(List files) {
*/
public void validate() {
if (component() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property component in model ClusterServiceConfig"));
+ throw LOGGER.atError()
+ .log(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.atError()
+ .log(new IllegalArgumentException("Missing required property files in model ClusterServiceConfig"));
} else {
files().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterServiceConfig.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("component", this.component);
+ jsonWriter.writeArrayField("files", this.files, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterServiceConfig from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterServiceConfig if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterServiceConfig.
+ */
+ public static ClusterServiceConfig fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterServiceConfig deserializedClusterServiceConfig = new ClusterServiceConfig();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("component".equals(fieldName)) {
+ deserializedClusterServiceConfig.component = reader.getString();
+ } else if ("files".equals(fieldName)) {
+ List files = reader.readArray(reader1 -> ClusterConfigFile.fromJson(reader1));
+ deserializedClusterServiceConfig.files = files;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterServiceConfig;
+ });
+ }
}
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 91a2e04cfec97..a68a2d9bb8b2a 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
@@ -6,24 +6,26 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
import java.util.List;
/**
* Cluster service configs.
*/
@Fluent
-public final class ClusterServiceConfigsProfile {
+public final class ClusterServiceConfigsProfile implements JsonSerializable {
/*
* Name of the service the configurations should apply to.
*/
- @JsonProperty(value = "serviceName", required = true)
private String serviceName;
/*
* List of service configs.
*/
- @JsonProperty(value = "configs", required = true)
private List configs;
/**
@@ -79,16 +81,60 @@ public ClusterServiceConfigsProfile withConfigs(List confi
*/
public void validate() {
if (serviceName() == null) {
- throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Missing required property serviceName in model ClusterServiceConfigsProfile"));
+ throw LOGGER.atError()
+ .log(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.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property configs in model ClusterServiceConfigsProfile"));
} else {
configs().forEach(e -> e.validate());
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterServiceConfigsProfile.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("serviceName", this.serviceName);
+ jsonWriter.writeArrayField("configs", this.configs, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterServiceConfigsProfile from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterServiceConfigsProfile if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterServiceConfigsProfile.
+ */
+ public static ClusterServiceConfigsProfile fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterServiceConfigsProfile deserializedClusterServiceConfigsProfile = new ClusterServiceConfigsProfile();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("serviceName".equals(fieldName)) {
+ deserializedClusterServiceConfigsProfile.serviceName = reader.getString();
+ } else if ("configs".equals(fieldName)) {
+ List configs
+ = reader.readArray(reader1 -> ClusterServiceConfig.fromJson(reader1));
+ deserializedClusterServiceConfigsProfile.configs = configs;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterServiceConfigsProfile;
+ });
+ }
}
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
index 86a3e29c42f97..d82a1c1884e02 100644
--- 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
@@ -6,17 +6,20 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonProperty;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
/**
* Cluster Upgrade.
*/
@Fluent
-public final class ClusterUpgrade {
+public final class ClusterUpgrade implements JsonSerializable {
/*
* Properties of upgrading cluster.
*/
- @JsonProperty(value = "properties", required = true)
private ClusterUpgradeProperties properties;
/**
@@ -52,12 +55,49 @@ public ClusterUpgrade withProperties(ClusterUpgradeProperties properties) {
*/
public void validate() {
if (properties() == null) {
- throw LOGGER.logExceptionAsError(
- new IllegalArgumentException("Missing required property properties in model ClusterUpgrade"));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property properties in model ClusterUpgrade"));
} else {
properties().validate();
}
}
private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgrade.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterUpgrade from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterUpgrade if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterUpgrade.
+ */
+ public static ClusterUpgrade fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterUpgrade deserializedClusterUpgrade = new ClusterUpgrade();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("properties".equals(fieldName)) {
+ deserializedClusterUpgrade.properties = ClusterUpgradeProperties.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterUpgrade;
+ });
+ }
}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistories.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistories.java
new file mode 100644
index 0000000000000..8b9be68121507
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistories.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 ClusterUpgradeHistories.
+ */
+public interface ClusterUpgradeHistories {
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable list(String resourceGroupName, String clusterPoolName, String clusterName);
+
+ /**
+ * Returns a list of upgrade history.
+ *
+ * @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 represents a list of cluster upgrade history 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/ClusterUpgradeHistory.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistory.java
new file mode 100644
index 0000000000000..20c234cabef90
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistory.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.ClusterUpgradeHistoryInner;
+
+/**
+ * An immutable client-side representation of ClusterUpgradeHistory.
+ */
+public interface ClusterUpgradeHistory {
+ /**
+ * 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 upgrade history.
+ *
+ * @return the properties value.
+ */
+ ClusterUpgradeHistoryProperties 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.ClusterUpgradeHistoryInner object.
+ *
+ * @return the inner object.
+ */
+ ClusterUpgradeHistoryInner innerModel();
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryListResult.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryListResult.java
new file mode 100644
index 0000000000000..465e4b1cd42ac
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryListResult.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.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.hdinsight.containers.fluent.models.ClusterUpgradeHistoryInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Represents a list of cluster upgrade history.
+ */
+@Fluent
+public final class ClusterUpgradeHistoryListResult implements JsonSerializable {
+ /*
+ * The list of cluster upgrade history.
+ */
+ private List value;
+
+ /*
+ * The link (url) to the next page of results.
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of ClusterUpgradeHistoryListResult class.
+ */
+ public ClusterUpgradeHistoryListResult() {
+ }
+
+ /**
+ * Get the value property: The list of cluster upgrade history.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The list of cluster upgrade history.
+ *
+ * @param value the value value to set.
+ * @return the ClusterUpgradeHistoryListResult object itself.
+ */
+ public ClusterUpgradeHistoryListResult withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The link (url) to the next page of results.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property value in model ClusterUpgradeHistoryListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterUpgradeHistoryListResult.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ClusterUpgradeHistoryListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ClusterUpgradeHistoryListResult if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ClusterUpgradeHistoryListResult.
+ */
+ public static ClusterUpgradeHistoryListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ClusterUpgradeHistoryListResult deserializedClusterUpgradeHistoryListResult
+ = new ClusterUpgradeHistoryListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value
+ = reader.readArray(reader1 -> ClusterUpgradeHistoryInner.fromJson(reader1));
+ deserializedClusterUpgradeHistoryListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedClusterUpgradeHistoryListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedClusterUpgradeHistoryListResult;
+ });
+ }
+}
diff --git a/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryProperties.java b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryProperties.java
new file mode 100644
index 0000000000000..591d388f59e98
--- /dev/null
+++ b/sdk/hdinsight/azure-resourcemanager-hdinsight-containers/src/main/java/com/azure/resourcemanager/hdinsight/containers/models/ClusterUpgradeHistoryProperties.java
@@ -0,0 +1,191 @@
+// Copyright (c) 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.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Properties of cluster upgrade history.
+ */
+@Fluent
+public class ClusterUpgradeHistoryProperties implements JsonSerializable